码迷,mamicode.com
首页 >  
搜索关键字:findviewbyid    ( 816个结果
百度地图初始化时设置地图的状态(转)
//初始化地图 MapViewmMapView = (MapView) findViewById(R.id.map);BaiduMapmBaidumap = mMapView.getMap();//设定中心点坐标 LatLng cenpt = new LatLng(29.806651,121...
分类:其他好文   时间:2014-07-22 22:51:36    阅读次数:393
备忘: Android中把EditText的输入内容转为大写
editText_SerialCode?=?(EditText)?findViewById(R.id.editText_SerialCode); editText_SerialCode.addTextChangedListener(textWatcher); private?TextWatcher?textWatcher?=?new?TextWatcher() { ...
分类:移动开发   时间:2014-07-21 10:09:41    阅读次数:280
Android动态添加布局
//1.利用LayoutInflater的inflate动态加载XML mLinearLayout = (LinearLayout)findViewById(R.id.LinearLayout_ID); LayoutInflater layoutInflater = LayoutInflater.....
分类:移动开发   时间:2014-07-21 00:13:14    阅读次数:422
Android 学习心得 TextView 添加垂直滚动条
XMl文件中:添加android:scrollbars="vertical"添加android:maxLines="10" //设置一页最多显示10行activity文件中:textview = (TextView)findViewById(R.id.httpCLient_textView); .....
分类:移动开发   时间:2014-07-19 16:36:18    阅读次数:197
Android实现限制EditText输入文字的数量
一: 声明控件。          TextView hasnumTV;         TextView hasnum;// 用来显示剩余字数         int num = 50;// 限制的最大字数 二: 主要的方法:                 hasnumTV = (TextView) findViewById(R.id.tv_num);   ...
分类:移动开发   时间:2014-07-18 18:13:21    阅读次数:284
android里TextView加下划线的几种方式
如果是在资源文件里: phone:0123456 MyLink如果是代码里:TextView textView = (TextView)findViewById(R.id.tv_test); textView.setText(Html.fromHtml(""+"0123456"+"")...
分类:移动开发   时间:2014-07-16 21:12:01    阅读次数:168
Android:ListView和适配器的使用
ListView作用:1、将数据填充到布局实例:下载>>在布局文件中加入一个ListView控件: 程序中:适配器的作用是数据和视图之间的桥梁list = (ListView)findViewById(R.id.list);//定义数据源作为ListView内容String [] arr_data ...
分类:移动开发   时间:2014-07-16 16:05:08    阅读次数:276
android 头像选择以及裁剪
一、布局申明二、Activity中代码private ImageView headImageView; private BitmapUtil bitmapUtil = new BitmapUtil(this);headImageView = (ImageView) findViewById(R...
分类:移动开发   时间:2014-07-06 19:21:02    阅读次数:274
Android中LayoutInflater的使用
Inflater英文意思是膨胀,在Android中应该是扩展的意思吧。 LayoutInflater的作用类似于 findViewById(),不同点是LayoutInflater是用来找layout文件夹下的xml布局文件,并且实例化!而 findViewById()是找具体某一个xml下的具体 ...
分类:移动开发   时间:2014-07-03 10:26:09    阅读次数:176
butterknife的使用
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
816条   上一页 1 ... 76 77 78 79 80 ... 82 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!