Android Blitz: implementation of Panellayout

Source: Internet
Author: User

Example of a combination of relative layout and linear layout
  
  1. <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  2. android:layout_width="fill_parent"
  3. android:layout_height="fill_parent" >
  4. <!-- 顶部 -->
  5. <RelativeLayout
  6. android:id="@+id/relativelayout_top"
  7. android:layout_width="fill_parent"
  8. android:layout_height="50dp"
  9. android:layout_alignParentTop="true"
  10. android:background="#FF0000"
  11. android:gravity="center" >
  12. <TextView
  13. android:id="@+id/view_top"
  14. android:layout_width="wrap_content"
  15. android:layout_height="wrap_content"
  16. android:text="顶部标题"
  17. android:textColor="#FFFF00" />
  18. </RelativeLayout>
  19. <!-- 底部 -->
  20. <RelativeLayout
  21. android:id="@+id/relativelayout_bottom"
  22. android:layout_width="fill_parent"
  23. android:layout_height="50dp"
  24. android:background="#00FFFF"
  25. android:layout_alignParentBottom="true"
  26. android:gravity="center" >
  27. <TextView
  28. android:id="@+id/view_top"
  29. android:layout_width="wrap_content"
  30. android:layout_height="wrap_content"
  31. android:text="底部标题"
  32. android:textColor="#0000FF" />
  33. </RelativeLayout>
  34. <!-- 中部 -->
  35. <LinearLayout
  36. android:layout_width="fill_parent"
  37. android:layout_height="fill_parent"
  38. android:layout_above="@id/relativelayout_bottom"
  39. android:layout_below="@+id/relativelayout_top"
  40. android:orientation="horizontal" >
  41. <!-- 中部左侧栏 -->
  42. <RelativeLayout
  43. android:id="@+id/relativelayout_middleleft"
  44. android:layout_width="200dp"
  45. android:layout_height="fill_parent"
  46. android:layout_alignParentLeft="true"
  47. android:background="#FF00FF"
  48. android:gravity="center"
  49. android:orientation="vertical" >
  50. <TextView
  51. android:id="@+id/view_middleleft"
  52. android:layout_width="wrap_content"
  53. android:layout_height="wrap_content"
  54. android:text="左侧标题"
  55. android:textColor="#FFFFFF" />
  56. </RelativeLayout>
  57. <!-- 中部主框架 -->
  58. <LinearLayout
  59. android:layout_width="fill_parent"
  60. android:layout_height="fill_parent"
  61. android:layout_toRightOf="@id/relativelayout_middleleft"
  62. android:background="#eeccee"
  63. android:gravity="center"
  64. android:orientation="vertical" >
  65. <TextView
  66. android:layout_width="wrap_content"
  67. android:layout_height="wrap_content"
  68. android:text="右侧标题"
  69. android:textColor="#000066" />
  70. </LinearLayout>
  71. </LinearLayout>
  72. </RelativeLayout>



From for notes (Wiz)

Android Blitz: implementation of Panellayout

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.