码迷,mamicode.com
首页 >  
搜索关键字:inflater    ( 130个结果
价格布局
public class MyListView extends LinearLayout{ private LayoutInflater inflater; private ToggleButton toggle; private LinearLayout linear; public MyList...
分类:其他好文   时间:2015-05-10 21:56:53    阅读次数:146
LayoutInflater的inflate函数用法详解
LayoutInflater的inflate函数用法详解 LayoutInflater作用是将layout的xml布局文件实例化为View类对象。 获取LayoutInflater的方法有如下三种: ? LayoutInflater inflater=(LayoutInflater)context.getSyste...
分类:其他好文   时间:2015-05-03 10:41:12    阅读次数:121
Viewpager实现滑动引导页原理
首先需要一个layout作为主界面,layout里面放一个viewpager作为容器盛放不同的页面。再建三个layout文件分别盛放三张图片 Activity里利用findViewByID找到viewpager容器 利用LayoutInflater获取一个inflater,通过inflater找到盛...
分类:其他好文   时间:2015-05-01 16:05:50    阅读次数:330
环信UI开源Demo情景分析十二、聊天界面(四)
在这一章咱们来分析一下聊天界面中消息的显示,MessageAdapter。 public MessageAdapter(Context context, String username, int chatType) { this.username = username; this.context = context; inflater = LayoutInflater.from(c...
分类:其他好文   时间:2015-04-30 16:16:29    阅读次数:150
android开发步步为营之57:UncaughtExceptionHandler未捕获的异常处理器
写程序的时候,大部分的时候,我们都会知道添加try,catch的代码块,比如 try { mRoot = inflater.inflate(R.layout.fragment_setting, container, false); initView(mRoot); } catch (Exception e) {...
分类:移动开发   时间:2015-04-28 16:17:20    阅读次数:186
Android中LayoutInflater实例
LayoutInflater与findViewById的用法有很多可比较之处。如:他们都可以通过id返回View。LayoutInflater inflater = getLayoutInflater();View layout = inflater.inflate(R.layout.custom_...
分类:移动开发   时间:2015-04-24 00:46:15    阅读次数:326
使用fragmenttabhost后,子fragment怎么获取ID?怎么用getSharedPreferences
使用fragmenttabhost后,子fragment怎么获取ID?怎么用getSharedPreferencespublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle sav...
分类:其他好文   时间:2015-04-15 12:47:36    阅读次数:244
安卓之listview和textview争抢焦点的解决办法
查找了网上很多文章,说是在XML文件设置textview的focus为false ,简直是一派胡言,那样连文本都输入不了了,有何用 网上查找无果,改用java代码控制listview的longclick方法,实现弹出复制和删除listview的办法 自定义一个popWindow  private void initPopupWindow(LayoutInflater inflater) {...
分类:移动开发   时间:2015-04-13 20:59:58    阅读次数:192
Android之LayoutInflater三种方式分析
获取LayoutInflater有三种不同的方式,那么这三种方式有什么区别呢? 源码: ① LayoutInflater inflater = LayoutInflater.from(context);  (LayoutInflater类) public static LayoutInflater from(Context context) { LayoutInflater Lay...
分类:移动开发   时间:2015-04-10 18:07:17    阅读次数:130
fragment The specified child already has a parent. You must call removeView()
在切换Fragment的时候出现:The specified child already has a parent. You must call removeView()异常。错误主要出在Fragment中的oncreateview方法中。可能引起错误的写法:View view = inflater...
分类:其他好文   时间:2015-04-10 17:15:52    阅读次数:114
130条   上一页 1 ... 5 6 7 8 9 ... 13 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!