最终实现的效果:
先看上面的怎么实现:
分为三个部分,一是返回的按钮,二是中间聊天的用户名或者聊天的群名,三是删除按钮或者群详情的按钮。
整体使用相对布局。
<RelativeLayout
android:id="@+id/top_bar"
android:layout_width="match_parent"
...
分类:
其他好文 时间:
2014-12-16 19:22:32
阅读次数:
321
1.LinearLayout
orention 水平和垂直
weight 分割闲置空间
水平布局 分割宽度
垂直布局 分割的高度
分割的时候 指定的高度或者宽度不能用fill_parent/match_parent
2.Tablayout
一行
缺陷 第一行的列级关系 会影响下面所有的列
3.RelativeL...
分类:
移动开发 时间:
2014-12-16 10:07:58
阅读次数:
201
http://www.cnblogs.com/lijunamneg/archive/2013/01/10/2855446.html先明确几个概念的区别:padding margin都是边距的含义,关键问题得明白是什么相对什么的边距.padding是控件的内容相对控件的边缘的边距.margin是控件边...
分类:
其他好文 时间:
2014-12-15 17:05:37
阅读次数:
135
布局:1、帧布局 FrameLayout:是最简单的一个布局对象。在他里面的的所有显示对象爱你过都将固定在屏幕的左上角,不能指定位置,但允许有多个显示对象,只是后一个会直接覆盖在前一个之上显示,会把前面的组件部分或全部挡住。但我们可以使用android:marginTop来布局。2、线性布局 Lin...
分类:
移动开发 时间:
2014-12-15 15:16:50
阅读次数:
202
引自http://blog.csdn.net/lamp_zy/article/details/8035161http://my.oschina.net/honeyming/blog/130761
分类:
移动开发 时间:
2014-12-12 11:39:33
阅读次数:
143
public class BaseView extends RelativeLayout{
public Context context;
public BaseView(Context context) {
super(context);
this.context = context;
}
public BaseView(Context context, Attrib...
分类:
移动开发 时间:
2014-12-11 17:27:15
阅读次数:
144
废话不多说,先上效果图:
布局文件:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:define="http://schemas.android.com/apk/res/com.example.circleview"
xmlns:t...
分类:
移动开发 时间:
2014-12-11 15:59:08
阅读次数:
162
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:la...
分类:
其他好文 时间:
2014-12-10 16:21:25
阅读次数:
141
RelativeLayout布局本文地址:http://blog.csdn.net/caroline_wendyRelativeLayout是一种相对布局方式,是根据属性进行对齐;A Layout where the positions of the children can be described in relation to each other or to the parent.在布局中,...
分类:
移动开发 时间:
2014-12-10 09:18:22
阅读次数:
246
1.relativeLayout布局的新属性4.22.相对布局练习//==================android:layout_alignStartandroid:layout_alignEndandroid:layout_alignParentStartandroid:layout_ali...
分类:
移动开发 时间:
2014-12-09 09:14:23
阅读次数:
191