码迷,mamicode.com
首页 >  
搜索关键字:match_parent    ( 614个结果
android基础(9):xml文件的序列化
一:界面设计     xmlns:tools="http://schemas.android.com/tools"     android:layout_width="match_parent"     android:layout_height="match_parent"     android:paddingBottom="@dimen/activity_vertical_mar...
分类:移动开发   时间:2015-08-18 19:35:18    阅读次数:201
RecyclerView android:layout_width="match_parent"无效
使用RecyclerView 时,在xml文件中设置宽度match_parent无效,发现在Adapter中要如下填充view(注释掉的填充方式会导致match_parent无效) /** * 创建新View,被LayoutManager所调用 */ @Override ...
分类:移动开发   时间:2015-08-17 19:58:42    阅读次数:357
安卓开发 xml添加滑动条
在layout上显示文字时,因为字数过多不能全部显示,可以添加一个滚动条在layout中<TextViewandroid:id="@+id/tv"android:layout_width="match_parent"android:layout_height="match_parent"android:scrollbars="vertical"//加滚动条android:singleLine="false"android:text=..
分类:移动开发   时间:2015-08-16 23:31:03    阅读次数:297
在控件的任意位置显示图片
在控件的任意位置显示图片 效果图xml代码 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:l...
分类:其他好文   时间:2015-08-14 01:11:10    阅读次数:154
RecyclerView高度随Item自适应 GridLayoutManager和LinearLayoutManager都适用
ScrollView嵌套RecyclerView时,android:layout_height=”wrap_content”并不起作用,RecyclerView会填充剩余的整个屏幕空间,也就相当于android:layout_height=”match_parent”,通过重写GridLayoutManager或LinearLayoutManager 的onMeasure方法进行可重置Recycle...
分类:其他好文   时间:2015-08-13 15:56:16    阅读次数:671
侧滑删除进阶(七、八)
activity_main.xml <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:lay...
分类:其他好文   时间:2015-08-13 12:18:59    阅读次数:86
android基础(8):SharedPreferences原理
一:界面设计    xmlns:tools="http://schemas.android.com/tools"    android:layout_width="match_parent"    android:layout_height="match_parent"     android:orientation="vertical"     tools:context=".Ma...
分类:移动开发   时间:2015-08-13 12:15:30    阅读次数:173
android listview的item布局中含有button,不会响应listview的onitemclick监听 以及 onitemlongclick监听问题解决
效果图: activity的布局xml: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" andro...
分类:移动开发   时间:2015-08-12 13:23:34    阅读次数:162
为什么relativelayout.layoutParams的width为-1
源码里看下就知道了。。 -1不代表宽度,代表MATCH_PARENT常量的值public static final int FILL_PARENT = -1;public static final int MATCH_PARENT = -1;public static final int WRAP_...
分类:其他好文   时间:2015-08-11 13:36:16    阅读次数:136
消息机制3
消息机制 main.xml文件代码。 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" androi...
分类:其他好文   时间:2015-08-10 22:14:40    阅读次数:154
614条   上一页 1 ... 24 25 26 27 28 ... 62 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!