如题 我是要做个标题。。类似新浪那样的。。左右分别是按钮,,中间一个textview的文字放具中,,麻烦大虾教下
左边已经设置了android:layout_alignParentLeft="true"
中间android:layout_centerHorizontal="true"
右边android:layout_alignParentRight="true"
不过中间的没有效果,还是靠右放着
左边已经设置了android:layout_alignParentLeft="true"
中间android:layout_centerHorizontal="true"
右边android:layout_alignParentRight="true"
不过中间的没有效果,还是靠右放着
解决方案 »
- httppost 代码编写问题...
- audioTrack问题播放不出声音
- build sdk 不通过You are attempting to build with the incorrect version of java.
- 求助
- Android通过代码打开如下界面
- android 布局 <include>标签 属性值丢失的问题
- android添加多媒体文件后及时更新媒体库?
- LCD 调试同时出现上下两个相同的界面???????????????
- 很诡异的报错,点着点着突然就shuting down了,求救!!!
- android音乐播放器播放列表如何实现?
- 小菜一个简单的问题,莫鄙视,求回答,谢谢!
- 如何使某一个activity 不出现在最近打开程序列表里?
左右两个RelativeLayout的layout_width设置wrap_content或者定值,中间一个layout_width设置fill_parent并且layout_weight设置成1ps:实际完全不需要用三个RelativeLayout,直接用linearlayout水平布局就行了吧
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<RelativeLayout
android:layout_width="wrap_contentl"
android:layout_height="fill_parent"
android:layout_weight="1"
android:background="@color/red_bg"
></RelativeLayout>
<RelativeLayout
android:layout_width="wrap_contentl"
android:layout_height="fill_parent"
android:layout_weight="1"
android:background="@color/blue_text"
></RelativeLayout>
<RelativeLayout
android:layout_width="wrap_contentl"
android:layout_height="fill_parent"
android:layout_weight="1"
android:background="@color/red_bg"
></RelativeLayout>
</LinearLayout>