跪求一个布局,高手,大牛啥的都请进

Juchiyufei 2015-04-14 12:20:35
加精

求一个布局,要求,见草图。


...全文
2965 41 打赏 收藏 转发到动态 举报
写回复
用AI写文章
41 条回复
切换为时间正序
请发表友善的回复…
发表回复
万剑 2015-05-06
  • 打赏
  • 举报
回复
<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="match_parent" tools:context=".MainActivity" android:id="@+id/root"> <TextView android:id="@+id/head" android:gravity="center" android:textSize="30sp" android:layout_width="match_parent" android:layout_height="50dp" android:text="头"/> <LinearLayout android:id="@+id/bottomContainer" android:layout_width="match_parent" android:layout_height="50dp" android:orientation="horizontal" android:layout_alignParentBottom="true" android:background="#d8d8d8"> <Button android:layout_width="0dp" android:layout_weight="1.0" android:layout_height="match_parent" android:text="1"/> <Button android:layout_width="0dp" android:layout_weight="1.0" android:layout_height="match_parent" android:text="1"/> <Button android:layout_width="0dp" android:layout_weight="1.0" android:layout_height="match_parent" android:text="1"/> <Button android:layout_width="0dp" android:layout_weight="1.0" android:layout_height="match_parent" android:text="1"/> <Button android:layout_width="0dp" android:layout_weight="1.0" android:layout_height="match_parent" android:text="1"/> </LinearLayout> <LinearLayout android:layout_below="@id/head" android:layout_above="@id/bottomContainer" android:layout_width="match_parent" android:layout_height="match_parent" android:background="#000088"></LinearLayout> </RelativeLayout>
yanfazhongxin012 2015-04-28
  • 打赏
  • 举报
回复
这个不难吧。
晨林大师兄 2015-04-27
  • 打赏
  • 举报
回复
title和区域2高度固定在activity里面 区域2一个布局.设置weight=1(有id,用来填充fragment),根据相应的条件切换相应fragment,每个fragment的布局不一样。 可以是包含listview viewpage......的fragment。fragment 填充切换那个布局你应该会。不会搜吧。
工匠若水 2015-04-27
  • 打赏
  • 举报
回复
easy, linearlayout里下面的控件指定大小或者wrapcontent后上面部分的widget设置为1就可以了,如果想优化布局,上面的除过设置widget=1以外设置hight=0dp,这样可以优化加载效率。
ssse1 2015-04-27
  • 打赏
  • 举报
回复
andriod初学者~~ 看帖子路过!!!!
Evan_Cao 2015-04-21
  • 打赏
  • 举报
回复
GOOD,学习下。
南瓜挵电子 2015-04-21
  • 打赏
  • 举报
回复
给大神跪了!!!
秒了 2015-04-21
  • 打赏
  • 举报
回复
andriod初学者~~ 看帖子路过!!!!
laoer_2002 2015-04-20
  • 打赏
  • 举报
回复
学习!
伊顺鸣 2015-04-20
  • 打赏
  • 举报
回复
可以了解的呢
xuebatian 2015-04-19
  • 打赏
  • 举报
回复
前来向高手学习
天命王子 2015-04-18
  • 打赏
  • 举报
回复
用QT做啊,挺简单的布局
if_lee 2015-04-17
  • 打赏
  • 举报
回复
这就跪了
a_tuzi 2015-04-17
  • 打赏
  • 举报
回复
混点积分。。。
budworm 2015-04-16
  • 打赏
  • 举报
回复
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <LinearLayout android:layout_width="match_parent" android:layout_height="40dp" android:background="#aa0000" android:orientation="vertical"> <TextView android:layout_width="match_parent" android:layout_height="match_parent" android:gravity="center" android:text="Title Bar" android:textColor="#ffffff" android:textSize="16sp"/> </LinearLayout> <FrameLayout android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1" android:background="#00aa00"> <TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:text=" ViewPager or listView" android:textColor="#ffffff" android:textSize="30sp"/> <android.support.v4.view.ViewPager android:id="@+id/my_viewpager" android:layout_width="match_parent" android:layout_height="match_parent"/> <ListView android:id="@+id/my_listview" android:layout_width="match_parent" android:layout_height="match_parent"/> </FrameLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="60dp" android:background="#0000aa" android:orientation="vertical"> <TextView android:layout_width="match_parent" android:layout_height="match_parent" android:gravity="center" android:text="Bottom" android:textColor="#ffffff" android:textSize="16sp"/> </LinearLayout> </LinearLayout>
button_search 2015-04-16
  • 打赏
  • 举报
回复

觉得满意找我要源码
黄小楼 2015-04-16
  • 打赏
  • 举报
回复
楼主新手么。。这个好简单的哦。。
雪月弦歌 2015-04-14
  • 打赏
  • 举报
回复
要得奖的节奏么?关注下
nettman 2015-04-14
  • 打赏
  • 举报
回复
呵呵,进来关注下
s_wenze 2015-04-14
  • 打赏
  • 举报
回复
引用 3 楼 Juchiyufei 的回复:
[quote=引用 2 楼 s715575807 的回复:] title和区域2高度固定在activity里面 区域2为fragment 可以是包含listview viewpage......的fragment
有简单的代码么?[/quote] 又见伸手党.......http://blog.csdn.net/loongggdroid/article/details/9469935
加载更多回复(7)

80,337

社区成员

发帖
与我相关
我的任务
社区描述
移动平台 Android
androidandroid-studioandroidx 技术论坛(原bbs)
社区管理员
  • Android
  • yechaoa
  • 失落夏天
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧