my_day_model = (RelativeLayout) v.findViewById(R.id.my_day_model);my_day_pic = (ImageView) v.findViewById(R.id.my_day_pic);my_day_text = (TextView) v. ...
分类:
移动开发 时间:
2016-09-28 10:19:37
阅读次数:
400
本文实现当从splash界面进入hone界面的时候,产生一种渐进淡入的动画效果,在onCreate中调用一个方法initAnimation(),代码如下: 其中rl_root在类中定义 private RelativeLayout rl_root; 其中rl_root为splash界面相对布局的id ...
分类:
移动开发 时间:
2016-09-25 18:40:31
阅读次数:
186
1.布局优化 首先删除布局中无用的控件和层级,其次有选择地使用性能较低的viewgroup,比如布局中既可以使用RelativeLayout和LinearLayout,那我们就采用LinearLayout,因为RelativeLayout的功能比较复杂,它的布局需要花费 风度哦的CPU实际。 布局优 ...
分类:
移动开发 时间:
2016-09-19 19:31:34
阅读次数:
159
1. 使用ListView在两种单元格模式下的重用,效果见下图 其中黑色的横杠是一种单元格模式,其他的是一种单元格模式,这两种格式的单元格交替出现并重用,不做一定的判断就会在重用的时候出现混乱。其中黑条单元格是纯文本,其他的是RelativeLayout布局。 ...
分类:
其他好文 时间:
2016-09-18 23:30:43
阅读次数:
213
转载请注明出处:http://blog.csdn.net/hejjunlin/article/details/51159419 如何优化你的布局层级结构之RelativeLayout和Linear...
分类:
其他好文 时间:
2016-09-13 10:14:35
阅读次数:
250
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_ ...
分类:
其他好文 时间:
2016-09-09 20:30:28
阅读次数:
211
模拟新闻 APP 的界面 1)写 ListView 之前先写布局: 这里有两种 Item 的布局: 1 <?xml version="1.0" encoding="utf-8"?> 2 <RelativeLayout xmlns:android="http://schemas.android.com ...
分类:
移动开发 时间:
2016-09-09 14:55:01
阅读次数:
309
@、 1、自定义了一个RelativeLayout类MyCustomLayout,然后在onDraw(...)中,画一个圆canvas.drawCircle(...)。 2、自定义了一个Dialog类MyDialog,其中xml中是RelativeLayout,并且layout_height和lay ...
分类:
其他好文 时间:
2016-09-07 19:07:39
阅读次数:
129
LinearLayout和RelativeLayout 共有属性:java代码中通过btn关联次控件android:id="@+id/btn" 控件宽度: android:layout_width="80px" //"80dip"或"80dp"android:layout_width =“wrap_ ...
分类:
移动开发 时间:
2016-09-07 12:40:20
阅读次数:
189
最近在学习drawerLayout时,遇到这个bug。如下示: java.lang.ClassCastException: android.widget.RelativeLayout cannot be cast to android.widget.TextView 原因: 可能是没有在适配器参数内 ...
分类:
移动开发 时间:
2016-09-05 16:42:57
阅读次数:
669