2
A
回答
2
这里你会如何做布局的例子:你是如何试图使这个简单的布局
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/layout_main"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<View
android:id="@+id/middle_separator"
android:layout_width="0dp"
android:layout_height="fill_parent"
android:layout_centerHorizontal="true" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_alignRight="@id/middle_separator"
android:orientation="vertical" >
<FrameLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:background="#000000" >
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:src="@drawable/ic_launcher" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Stuff"
android:textColor="#ffffff" />
</FrameLayout>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:background="#220000" >
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:src="@drawable/ic_launcher" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Stuff"
android:textColor="#ffffff" />
</FrameLayout>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:background="#440000" >
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:src="@drawable/ic_launcher" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Stuff"
android:textColor="#ffffff" />
</FrameLayout>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:background="#660000" >
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:src="@drawable/ic_launcher" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Stuff"
android:textColor="#ffffff" />
</FrameLayout>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@id/middle_separator"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:orientation="vertical" >
<FrameLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:background="#880000" >
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:src="@drawable/ic_launcher" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Stuff"
android:textColor="#ffffff" />
</FrameLayout>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:background="#aa0000" >
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:src="@drawable/ic_launcher" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Stuff"
android:textColor="#ffffff" />
</FrameLayout>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:background="#cc0000" >
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:src="@drawable/ic_launcher" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Stuff"
android:textColor="#ffffff" />
</FrameLayout>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:background="#ee0000" >
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:src="@drawable/ic_launcher" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Stuff"
android:textColor="#ffffff" />
</FrameLayout>
</LinearLayout>
</RelativeLayout>
相关问题
- 1. 如何使布局适合计算器的整个屏幕?
- 2. 表格布局不适合屏幕
- 3. android表格布局不适合屏幕
- 4. 布局不适合屏幕
- 5. 哪个android布局最适合设计邀请朋友屏幕?
- 6. 如何设置适合任何屏幕高度的布局?
- 7. UIImageView适合整个屏幕
- 8. 布局不适合所有屏幕
- 9. Android布局不适合屏幕
- 10. 如何让精灵适合多个设备的整个屏幕
- 11. xaml网格布局不在整个屏幕上延伸
- 12. 支持多屏幕的设计布局
- 13. Android的网格布局四溢屏幕
- 14. 将网页调整为适合屏幕
- 15. 适合所有屏幕的Android设计
- 16. 如何找出特定屏幕适合的布局?
- 17. 如何设置framelayout以适合整个屏幕?
- 18. 聊天屏幕/窗口布局设计
- 19. Galaxy S4屏幕布局设计
- 20. 制作屏幕填充网格布局
- 21. 如何为android布局设计支持多个屏幕
- 22. Android桌面布局格式问题不适合屏幕
- 23. 如何让画布100%适合屏幕?
- 24. 适合多个屏幕分辨率的布局ImageView元素
- 25. 如何调整TableLayout的单元格以适合屏幕?
- 26. 问题在滚动布局下的表格布局屏幕设计。
- 27. 只有一种布局设计,适合所有iPhone屏幕尺寸的屏幕尺寸
- 28. 适合网页到屏幕
- 29. 什么建议图形设计师设计布局和图像以适合多个屏幕?
- 30. 如何让网格布局占据屏幕的1/2?
? – Luksprog
我试图在ImageView中使用网格布局和相对布局。但没有得到确切的结果。在大屏幕上也不适合整个屏幕。 – jquery404