Android 仿 WP7 布局
01.<?xml version="1.0" encoding="utf-8"?> 02.<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 03. android:layout_width="fill_parent" 04. android:layout_height="fill_parent" 05. android:background="#000000" 06. android:orientation="vertical" > 论文网 07. 08. <com.markupartist.android.widget.ActionBar 09. android:id="@+id/actionbar" 10. style="@style/ActionBar" /> 11. 12. <RelativeLayout 13. android:layout_width="fill_parent" 14. android:layout_height="fill_parent" 15. android:background="#000000" 16. android:orientation="vertical" > 17. 18. <LinearLayout 19. android:id="@+id/linearLayout3" 20. android:layout_width="140sp" 21. android:layout_height="140sp" 22. android:layout_alignParentRight="true" 23. android:layout_alignTop="@+id/linearLayout2" 24. android:layout_marginLeft="8sp" 25. android:layout_marginRight="15dp" 26. android:background="#FF0033" 27. android:orientation="vertical" > 28. 29. <ImageView 30. android:id="@+id/bikeView" 31. android:layout_width="80sp" 32. android:layout_height="80sp" 33. android:layout_marginLeft="30sp" 34. android:layout_marginTop="30sp" 35. android:src="@drawable/clock" 36. android:textColor="#CCFFCC" /> 37. 38. <TextView 39. android:id="@+id/TextView01" 40. android:layout_width="wrap_content" 41. android:layout_height="wrap_content" 42. android:layout_marginLeft="5sp" 43. android:layout_marginTop="10sp" 44. android:text="自行车查询" 45. android:textColor="#CCFFCC" /> 46. </LinearLayout> 47. 48. <LinearLayout 49. android:id="@+id/linearLayout2" 50. android:layout_width="140sp" 51. android:layout_height="140sp" 52. android:layout_above="@+id/linearLayout1" 53. android:layout_marginBottom="8sp" 54. android:layout_marginLeft="15sp" 55. android:background="#0000FF" 56. android:orientation="vertical" > 57. 58. <ImageView 59. android:id="@+id/busView" 60. android:layout_width="80sp" 61. android:layout_height="80sp" 62. android:layout_marginLeft="30sp" 63. android:layout_marginTop="30sp" 64. android:src="@drawable/contacts" 65. android:textColor="#CCFFCC" /> 66. 67. <TextView 68. android:id="@+id/textView1" 69. android:layout_width="wrap_content" 70. android:layout_height="wrap_content" 71. android:layout_marginLeft="5sp" 72. android:layout_marginTop="10sp" 73. android:text="公交车查询" 74. android:textColor="#CCFFCC" /> 75. </LinearLayout> 76. 77. <LinearLayout 78. android:id="@+id/linearLayout1" 79. android:layout_width="140sp" 80. android:layout_height="140sp" 81. android:layout_alignLeft="@+id/linearLayout2" 82. android:layout_alignParentBottom="true" 83. android:layout_alignRight="@+id/linearLayout2" 84. android:layout_marginBottom="60dp" 85. android:background="#FFCC00" 86. android:orientation="vertical" > 87. 88. <ImageView 89. android:id="@+id/carView" 90. android:layout_width="80sp" 91. android:layout_height="80sp" 92. android:layout_marginLeft="30sp" 93. android:layout_marginTop="30sp" 94. android:src="@drawable/maps" 95. android:textColor="#CCFFCC" /> 96. 97. <TextView 98. android:id="@+id/TextView02" 99. android:layout_width="wrap_content" 100. android:layout_height="wrap_content" 101. android:layout_marginLeft="5sp" 102. android:layout_marginTop="10sp" 103. android:text="私家车防盗" 104. android:textColor="#CCFFCC" /> 105. </LinearLayout> 106. 107. <LinearLayout 108. android:layout_width="140sp" 109. android:layout_height="140sp" 110. android:layout_alignLeft="@+id/linearLayout3" 111. android:layout_alignRight="@+id/linearLayout3" 112. android:layout_below="@+id/linearLayout2" 113. android:background="#33FF33" 114. android:orientation="vertical" > 115. 116. <ImageView 117. android:id="@+id/groupView" 118. android:layout_width="80sp" 119. android:layout_height="80sp" 120. android:layout_marginLeft="30sp" 121. android:layout_marginTop="30sp" 122. android:src="@drawable/gmail" 123. android:textColor="#CCFFCC" /> 124. 125. <TextView 126. android:id="@+id/TextView03" 127. android:layout_width="wrap_content" 128. android:layout_height="wrap_content" 129. android:layout_marginLeft="5sp" 130. android:layout_marginTop="10sp" 131. android:text="集体出行" 132. android:textColor="#CCFFCC" /> 133. </LinearLayout> 134. 135. <ImageView 136. android:id="@+id/arrow" 137. android:layout_width="wrap_content" 138. android:layout_height="wrap_content" 139. android:layout_alignParentTop="true" 140. android:layout_alignRight="@+id/linearLayout3" 141. android:layout_marginRight="24dp" 142. android:layout_marginTop="27dp" 143. android:src="@drawable/arrow" /> 144. 145. </RelativeLayout> 146. 147.</LinearLayout>
|