-2
A
回答
0
以下是带TextView的代码。
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:id="@+id/upparLayout1"
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="#9DAD0C"
android:orientation="horizontal"
android:weightSum="3">
<TextView
android:layout_width="0dp"
android:layout_height="50dp"
android:layout_weight="1"
android:background="#9DAD0C"
android:text="Tab1" />
<TextView
android:layout_width="0dp"
android:layout_height="50dp"
android:layout_weight="1"
android:background="#717D11"
android:text="Tab2" />
</LinearLayout>
<TextView
android:id="@+id/screen1"
android:layout_width="match_parent"
android:layout_height="120dp"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_below="@+id/upparLayout1"
android:background="#CD5E93"
android:text="Screen1" />
<LinearLayout
android:id="@+id/middleLayout"
android:layout_width="match_parent"
android:layout_height="120dp"
android:layout_below="@+id/screen1"
android:background="#9F165A"
android:orientation="horizontal"
android:weightSum="2">
<TextView
android:layout_width="0dp"
android:layout_height="120dp"
android:layout_weight="1"
android:text="SubTab1" />
<TextView
android:layout_width="0dp"
android:layout_height="120dp"
android:layout_weight="1"
android:text="SubTab2" />
</LinearLayout>
<TextView
android:id="@+id/textView2"
android:layout_width="match_parent"
android:layout_height="120dp"
android:layout_below="@+id/middleLayout"
android:background="#A9BB2B"
android:text="List Based on Sub Tab" />
<TextView
android:id="@+id/textView3"
android:layout_width="match_parent"
android:layout_height="120dp"
android:layout_below="@+id/textView2"
android:layout_centerHorizontal="true"
android:background="#A9BB2B"
android:text="List Based on Sub Tab" />
<Button
android:id="@+id/button"
android:layout_width="wrap_content"
android:layout_height="50dp"
android:layout_alignParentBottom="true"
android:layout_below="@+id/textView3"
android:layout_centerHorizontal="true"
android:background="#A9BB2B"
android:text="Button" />
</RelativeLayout>
0
你可以找到所有你在创造以下链接,布局需要:
至于每个你可以做标签的布局像这样(作为结构)
<RelativeLayout>
<LinearLayout> // or you can use a fragment
//Screen 1 content
</LinearLayout>
<SubTabs>
<SubTabs>
</RelativeLayout>
对于子标签内容:
<?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"
android:weightSum="2">
<ListView
android:id="@+id/list1"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:layout_marginBottom="10dp"/> //replace margin with your value
<ListView
android:id="@+id/list2"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:layout_marginBottom="10dp"/> //replace margin with your value
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"/>
</LinearLayout>
相关问题
- 1. UI屏幕设计
- 2. Android UI LinearLayout出“手机屏幕”
- 3. J2ME UI屏幕设计
- 4. Android多屏幕
- 5. Android多屏幕
- 6. 多屏幕Android
- 7. 屏蔽xlarge屏幕android
- 8. 如何将现有的UI屏幕更改为我自己的UI屏幕?
- 9. android来电屏幕
- 10. Android屏幕取向
- 11. Android屏幕尺寸
- 12. Android屏幕超时
- 13. 捕获android屏幕
- 14. Android屏幕尺寸
- 15. Android:调暗屏幕
- 16. Android屏幕录制
- 17. android-屏幕跟踪
- 18. Android - 屏幕事件
- 19. Android:解锁屏幕
- 20. 的Android:主屏幕
- 21. Android屏幕太宽?
- 22. 流的Android屏幕
- 23. 滑动屏幕Android
- 24. android(调整屏幕)
- 25. 的Android流屏幕
- 26. Android屏幕取向
- 27. Android不同屏幕
- 28. Android关闭屏幕
- 29. Android屏幕管理
- 30. Android白色屏幕
请注意,如果有帮助的话。 – Dhruv