摘要:
<LinearLayout> <Button android:layout_height="wrap_content" android:layout_width="fill_parent" android:layout_weight="1"/> <Button android:layout_height="wrap_content" android:layout_width="fill_parent" android:layout_weight="1&qu 阅读全文
摘要:
<LinearLayout android:focusable="true" android:focusableInTouchMode="true" android:layout_width="0px" android:layout_height="0px"/>//必须写这里 <EditText android:layout_width="fill_parent" android:id="@+id/showlrcet" android:layout_heig 阅读全文
摘要:
1.值由A.class传递到B.classA.class中:Java代码Intentintent=newIntent();//设置传递方向intent.setClass(A.this,B.class);//绑定数据intent.putExtra("username1",username);intent.putExtra("userpwd1"userpwd);/*或者绑定成一捆数据Bundledata=newBundle();data.putString("username1",username);data.putString(&quo 阅读全文
摘要:
在实现拍照的功能时遇到了很多问题,搜索了很多资料,尝试了很多办法,终于解决了,下面简要的描述下在开发过程中遇到的问题。虽然之前看过android开发的书,但是没有做过东西,这次也是临时决定让我做一个android采集系统的演示程序。拍照是其中一个功能,让网搜索了下拍照有两种方式,其中一种就是调用系统相机实现拍照功能。启动照相机进行拍照,代码如下:[java]view plaincopybtnCamera.setOnClickListener(newButton.OnClickListener(){publicvoidonClick(Viewv){Intenti=newIntent(" 阅读全文
摘要:
//主要用到了java io 的基本知识 和 正则表达式package com.su; import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamRe. 阅读全文
摘要:
protected String login(String username, String passwd) { // TODO Auto-generated method stub String strResult = null; Toast.makeText(LoginActivity.this, username+"\n"+passwd, Toast.LENGTH_SHORT).show(); String uriAPI = "http://www.qdta.cn:91/json/Json.aspx?Action=Users&Oper=Login&a 阅读全文
摘要:
网络状态 <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />网络连接<uses-permission android:name="android.permission.INTERNET" />手机状态 <uses-permission android:name="android.permission.READ_PHONE_STATE" />读取权限 <uses-permission android 阅读全文
摘要:
package data; import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Vector;
import java.util.regex.Matcher;
import java.util.regex.Pattern; class Statement{ private double time=0.0; //时间, 单位为s, 精确到0.01s... 阅读全文