记录一下看《安卓开发必知的50个技巧》觉得有用的一下技巧。include标签使用注意事项如果想在标签中覆盖被包含布局所指定的任何android:layout_*属性,必须在标签中同时指定android:layout_width和android:layout_height属性,我们可以通过指定被包含布局的layout_width和layout_height属性都为0dp,这样做的目的是由被包含布局的使...
分类:
移动开发 时间:
2015-08-02 13:45:13
阅读次数:
142
关于xml中经常用到边框及边框效果,在此进行一下总结。
3.border(边框及边框效果)
(1)直角边框线
android:layout_width="200dp"
android:layout_height="30dp"
android:layout_margin="10dp"
android:orient...
分类:
移动开发 时间:
2015-07-30 19:34:39
阅读次数:
286
1、新建share.xml布局文件
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_p...
分类:
移动开发 时间:
2015-07-29 16:00:05
阅读次数:
196
一:ViewPager和导航点的实现:
主布局为guide.xml
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
...
分类:
移动开发 时间:
2015-07-28 21:05:57
阅读次数:
135
Spinner即下拉菜单。在android中实现Spinner组件需要以下三个步骤:1.在XML文件中定义标签Spinner<Spinner
android:id="@+id/spinner"
android:layout_width="match_parent"
android:layout_height="wrap_content"
/>2.在Str...
分类:
其他好文 时间:
2015-07-28 00:53:53
阅读次数:
110
关于xml中margin和padding的内容,在刚接触xml的时候会有些混淆和模糊,在此进行总结,希望能帮助到有需要的人。
2.xml中margin和padding
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin...
分类:
移动开发 时间:
2015-07-27 19:12:32
阅读次数:
116
1.头部布局文件top.xml:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="40dp"
android:background="@drawable/tit...
分类:
微信 时间:
2015-07-24 14:23:24
阅读次数:
337
1.头部布局文件top.xml:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="40dp"
android:background="@drawable/tit...
分类:
微信 时间:
2015-07-24 14:22:10
阅读次数:
236
问题描述出错代码如下:<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"...
分类:
其他好文 时间:
2015-07-24 10:54:11
阅读次数:
108
1.添加水平线
2.添加垂直线
<View
android:layout_height="match_parent"
android:background="#686868"
a...
分类:
移动开发 时间:
2015-07-22 00:06:09
阅读次数:
465