//初始化地图 MapViewmMapView = (MapView) findViewById(R.id.map);BaiduMapmBaidumap = mMapView.getMap();//设定中心点坐标 LatLng cenpt = new LatLng(29.806651,121...
分类:
其他好文 时间:
2014-07-22 22:51:36
阅读次数:
393
editText_SerialCode?=?(EditText)?findViewById(R.id.editText_SerialCode);
editText_SerialCode.addTextChangedListener(textWatcher);
private?TextWatcher?textWatcher?=?new?TextWatcher()
{
...
分类:
移动开发 时间:
2014-07-21 10:09:41
阅读次数:
280
//1.利用LayoutInflater的inflate动态加载XML mLinearLayout = (LinearLayout)findViewById(R.id.LinearLayout_ID); LayoutInflater layoutInflater = LayoutInflater.....
分类:
移动开发 时间:
2014-07-21 00:13:14
阅读次数:
422
XMl文件中:添加android:scrollbars="vertical"添加android:maxLines="10" //设置一页最多显示10行activity文件中:textview = (TextView)findViewById(R.id.httpCLient_textView); .....
分类:
移动开发 时间:
2014-07-19 16:36:18
阅读次数:
197
一: 声明控件。
TextView hasnumTV;
TextView hasnum;// 用来显示剩余字数
int num = 50;// 限制的最大字数
二: 主要的方法:
hasnumTV = (TextView) findViewById(R.id.tv_num);
...
分类:
移动开发 时间:
2014-07-18 18:13:21
阅读次数:
284
如果是在资源文件里: phone:0123456 MyLink如果是代码里:TextView textView = (TextView)findViewById(R.id.tv_test); textView.setText(Html.fromHtml(""+"0123456"+"")...
分类:
移动开发 时间:
2014-07-16 21:12:01
阅读次数:
168
ListView作用:1、将数据填充到布局实例:下载>>在布局文件中加入一个ListView控件: 程序中:适配器的作用是数据和视图之间的桥梁list = (ListView)findViewById(R.id.list);//定义数据源作为ListView内容String [] arr_data ...
分类:
移动开发 时间:
2014-07-16 16:05:08
阅读次数:
276
一、布局申明二、Activity中代码private ImageView headImageView; private BitmapUtil bitmapUtil = new BitmapUtil(this);headImageView = (ImageView) findViewById(R...
分类:
移动开发 时间:
2014-07-06 19:21:02
阅读次数:
274
Inflater英文意思是膨胀,在Android中应该是扩展的意思吧。 LayoutInflater的作用类似于 findViewById(),不同点是LayoutInflater是用来找layout文件夹下的xml布局文件,并且实例化!而 findViewById()是找具体某一个xml下的具体 ...
分类:
移动开发 时间:
2014-07-03 10:26:09
阅读次数:
176
butterknife
让我们从繁琐的 findViewById 中解救出来。下面直接是使用方法
Activity
class ExampleActivity extends Activity {
@InjectView(R.id.title) TextView title;
@InjectView(R.id.subtitle) TextView subtitle;
...
分类:
其他好文 时间:
2014-07-02 11:37:30
阅读次数:
471