<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_pa...
分类:
其他好文 时间:
2016-05-07 01:10:11
阅读次数:
191
1.常见控件的使用: TextView Button EditText ImageView 1.TextView <TextView android:id="@+id/text_view" android:layout_width="match_parent" android:layout_heig ...
分类:
移动开发 时间:
2016-05-06 20:31:39
阅读次数:
196
ScrollView标签要放到最外层,事例:
<ScrollViewxmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
androi..
分类:
移动开发 时间:
2016-05-03 20:35:05
阅读次数:
224
传统方法是继承现有View再重写方法,这种方式缺点很多: 1.往往不能在xml编辑器中预览效果; 2.比较难实现预期效果,比如设置宽度为wrap_content,实际显示为match_parent等; 3.需要在xml代码中声明自定义View的全路径,经常无法自动补全,需要手动复制粘贴路径; 4.一 ...
分类:
微信 时间:
2016-05-03 12:45:45
阅读次数:
334
<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" and ...
分类:
其他好文 时间:
2016-05-02 14:21:52
阅读次数:
166
ConversationFragment的布局:
首先我们找到我们要写的Fragment布局文件。
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_p...
分类:
移动开发 时间:
2016-04-29 19:04:01
阅读次数:
257
使用HttpClient方式请求网络
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
andr...
分类:
移动开发 时间:
2016-04-29 18:55:34
阅读次数:
293
样式效果
1、创建底部的布局 layout_footer.xml
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
...
分类:
移动开发 时间:
2016-04-29 17:23:11
阅读次数:
231
之前一直没有区别好 fill_parent 和 match_parent, 其实,在 api 8 以后,两者的作用几乎一样,都是填充控件 在这里延伸到android 的版本变化导致方法的变化问题 我对于android l、android m 、 android n之间的演变,感觉还不算很大。 我接下 ...
分类:
其他好文 时间:
2016-04-29 00:01:52
阅读次数:
385
1、android:layout_height属性: 必须将ListView的布局高度属性设置为非“wrap_content”(可以是“match_parent / fill_parent / 400dp等绝对数值”),如果ListView的布局高度为“wrap_content”,那么getView ...
分类:
其他好文 时间:
2016-04-28 21:21:12
阅读次数:
208