获取文件: public void Init() { noScrollgridview = (GridView) findViewById(R.id.noScrollgridview); noScrollgridview.setSelector(new ColorDrawable(Color.TRA...
分类:
移动开发 时间:
2015-06-27 09:41:04
阅读次数:
140
一、利用Android提供的左右移动工具类:AnimationUtils LinearLayout ll_first = (LinearLayout) findViewById(R.id.ll_first); LinearLayout ll_second = (LinearLayout)...
分类:
移动开发 时间:
2015-06-26 19:29:57
阅读次数:
141
final TextView txtTitle = (TextView) findViewById(R.id.txtTitle); final WebView webView = (WebView)findViewById(R.id.btnWebView); WebChromeClient wv.....
分类:
移动开发 时间:
2015-06-25 20:54:53
阅读次数:
150
网络上查阅,ListView长按菜单有两种方式可以实现 第一种方式,需要三步 一、先定义ListView的长按菜单 ListView listView = (ListView) findViewById(R.id.main_listview); registerForContextMenu(list...
分类:
其他好文 时间:
2015-06-25 20:51:24
阅读次数:
135
private RelativeLayout relativeLayout;
relativeLayout = (RelativeLayout)findViewById(R.id.relativeLayout);player_View.getLayoutParams().height = 240;
player_View.getLayoutParams().width = 320;...
分类:
移动开发 时间:
2015-06-24 16:25:05
阅读次数:
149
LayoutInflater.inflate()的作用就是将一个xml定义的布局文件实例化为view控件对象;与findViewById区别:LayoutInflater.inflate是加载一个布局文件;findViewById则是从布局文件中查找一个控件;一.获取LayoutInflater对象...
分类:
移动开发 时间:
2015-06-24 14:14:38
阅读次数:
137
1、在布局文件中声明2、在Activity中使用// 1,找到这个ViewmRecyclerView = (RecyclerView)findViewById(R.id.my_recycler_view);// 2,设置布局管理LayoutManagermLayoutManager = new Li...
分类:
其他好文 时间:
2015-06-23 13:25:22
阅读次数:
92
昨天qq该小组被要求类别似QQ聊天窗口是如何实现的抖动效果。在这里,我只是意识到了什么,贴上代码: final View decorView = ((ViewGroup) findViewById(android.R.id.content)).getChildAt(0)...
分类:
移动开发 时间:
2015-06-22 22:09:54
阅读次数:
148
在实际开发中LayoutInflater这个类还是非常有用的,它的作用类似于findViewById()。不同点是LayoutInflater是用来找res/layout/下的xml布局文件,并且实例化;而findViewById()是找xml布局文件下的具体widget控件(如Button、Tex...
分类:
移动开发 时间:
2015-06-22 22:08:49
阅读次数:
127
1.碰到了人生第一个闪退闪退问题:原来是button绑定监听器之后,监听的内容ProgressBar忘记findviewbyid出来了~~06-20 14:30:01.879: E/AndroidRuntime(11040): FATAL EXCEPTION: main06-20 14:30:01....
分类:
其他好文 时间:
2015-06-20 15:33:27
阅读次数:
106