一: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
很多人表示对于很多工程中的MATCH_PARENT出现在layout中感到不明白,过去只有FILL_PARENT和WRAP_CONTENT那么 match_parent到底是什么类型呢? 其实从Android 2.2开始FILL_PARENT改名为MATCH_PARENT ,从API Level为8...
分类:
其他好文 时间:
2015-07-26 10:54:26
阅读次数:
96
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
启动第二个Activityactivity_main.xml文件:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:la...
分类:
其他好文 时间:
2015-07-23 23:53:43
阅读次数:
138
今天在尝试自定义一个控件后,在布局文件中使用的时候报错
xmlns:tools="http://schemas.android.com/tools"
xmlns:carrey="http://schemas.android.com/apk/res/com.example.customview"
android:layout_width="match_parent"...
分类:
其他好文 时间:
2015-07-23 12:08:27
阅读次数:
143
效果图:
代码部分main_activity.xml<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
android:...
分类:
移动开发 时间:
2015-07-22 16:10:30
阅读次数:
231
1.添加水平线
2.添加垂直线
<View
android:layout_height="match_parent"
android:background="#686868"
a...
分类:
移动开发 时间:
2015-07-22 00:06:09
阅读次数:
465