//rl_pager 是RelativeLayout findViewById(R.id.rl_pager).setLayoutParams(new RelativeLayout.LayoutParams(width, width));当我这么设置layoutparams的时候报错了,原因:set....
分类:
其他好文 时间:
2015-05-27 20:49:47
阅读次数:
195
使用通知管理者 NotificationManager <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_pare...
分类:
其他好文 时间:
2015-05-27 16:10:38
阅读次数:
226
下面介绍一下RelativeLayout用到的一些重要的属性: ??? 第一类:属性值为true或false ??? android:layout_centerHrizontal???????????????????????????????????????...
分类:
其他好文 时间:
2015-05-27 12:37:00
阅读次数:
96
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...
简介相对布局的组件是由兄弟组件和父组价决定的,因此这种布局被称为相对布局。属性设置介绍RelativeLayout.Layoutparam中只能设置为true和false的属性是:
需要依赖其他组件Id设置的属性:
除此之外,RelativeLayout还可以使用viewGroup.MarginLayoutparams的属性。梅花布局的实例<LinearLayout xmlns:an...
分类:
移动开发 时间:
2015-05-26 09:25:19
阅读次数:
158
布局:
<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="ma...
分类:
其他好文 时间:
2015-05-26 09:15:07
阅读次数:
153
1.主布局<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:background="@drawa...
分类:
移动开发 时间:
2015-05-25 16:48:31
阅读次数:
211
效果如下:
布局文件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"...
分类:
移动开发 时间:
2015-05-25 14:31:57
阅读次数:
239
一.扇形菜单的实现:
借鉴了大神们的源码,那我们来看一下扇形菜单是怎么实现的:
效果图:
主界面布局:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
and...
分类:
移动开发 时间:
2015-05-24 10:12:52
阅读次数:
299
本文参考了:http://greenrobot.me/devpost/android-custom-layout/
Android SDK中提供了很多UI组件,如RelativeLayout, LinearLayout等,使用自定义控件有两大优点:
1、通过减少View的使用来增加UI的显示效率
2、构建SDK中没有的控件
原文总结了4种自定义View,分别是Compo...
分类:
移动开发 时间:
2015-05-23 16:57:20
阅读次数:
288