Skip to content

Commit a16cdf2

Browse files
committed
布局优化
1 parent 3b6cf5c commit a16cdf2

File tree

3 files changed

+26
-23
lines changed

3 files changed

+26
-23
lines changed
712 Bytes
Loading
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<shape xmlns:android="http://schemas.android.com/apk/res/android">
2-
<stroke android:width="1dp" android:color="@android:color/white"/>
2+
<stroke android:width="3dp" android:color="@android:color/white"/>
33
</shape>

app/src/main/res/layout/draw_navigation_bar_layout.xml

Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -82,29 +82,30 @@
8282
android:layout_weight="1"
8383
android:orientation="horizontal">
8484
<RelativeLayout
85-
85+
android:id="@+id/line"
8686
android:layout_width="0dp"
8787
android:layout_height="match_parent"
8888
android:layout_weight="1">
89-
<ImageView
89+
<ImageView android:id="@+id/lineIcon"
9090
android:layout_width="100px"
9191
android:layout_height="100px"
9292
android:layout_centerInParent="true"
9393
android:scaleType="fitXY"
94-
/>
94+
android:src="@drawable/line"
95+
/>
9596
</RelativeLayout>
9697

9798
<RelativeLayout
98-
99+
android:id="@+id/rect"
99100
android:layout_width="0dp"
100101
android:layout_height="match_parent"
101102
android:layout_weight="1">
102-
<ImageView
103+
<ImageView android:id="@+id/rectIcon"
103104
android:layout_width="100px"
104105
android:layout_height="100px"
105-
android:layout_centerInParent="true"
106-
android:scaleType="fitXY"
107-
/>
106+
android:background="@drawable/border_shape_white"
107+
android:scaleType="fitXY" android:layout_centerVertical="true"
108+
android:layout_centerHorizontal="true"/>
108109
</RelativeLayout>
109110
</LinearLayout>
110111

@@ -138,11 +139,10 @@
138139
android:layout_height="100px"
139140
android:layout_centerInParent="true"
140141
android:scaleType="fitXY"
141-
/>
142+
/>
142143
</RelativeLayout>
143144
</LinearLayout>
144145

145-
146146
<View android:layout_width="match_parent" android:layout_height="1px"
147147
android:background="#11161d"/>
148148

@@ -160,7 +160,7 @@
160160
android:layout_height="100px"
161161
android:layout_centerInParent="true"
162162
android:scaleType="fitXY"
163-
/>
163+
/>
164164
</RelativeLayout>
165165

166166
<RelativeLayout
@@ -173,10 +173,11 @@
173173
android:layout_height="100px"
174174
android:layout_centerInParent="true"
175175
android:scaleType="fitXY"
176-
/>
176+
/>
177177
</RelativeLayout>
178178
</LinearLayout>
179179

180+
180181
<View android:layout_width="match_parent" android:layout_height="1px"
181182
android:background="#11161d"/>
182183

@@ -194,7 +195,7 @@
194195
android:layout_height="100px"
195196
android:layout_centerInParent="true"
196197
android:scaleType="fitXY"
197-
/>
198+
/>
198199
</RelativeLayout>
199200

200201
<RelativeLayout
@@ -211,7 +212,6 @@
211212
</RelativeLayout>
212213
</LinearLayout>
213214

214-
215215
<View android:layout_width="match_parent" android:layout_height="1px"
216216
android:background="#11161d"/>
217217

@@ -220,35 +220,38 @@
220220
android:layout_weight="1"
221221
android:orientation="horizontal">
222222
<RelativeLayout
223-
android:id="@+id/line"
223+
224224
android:layout_width="0dp"
225225
android:layout_height="match_parent"
226226
android:layout_weight="1">
227-
<ImageView android:id="@+id/lineIcon"
227+
<ImageView
228228
android:layout_width="100px"
229229
android:layout_height="100px"
230230
android:layout_centerInParent="true"
231231
android:scaleType="fitXY"
232-
/>
232+
/>
233233
</RelativeLayout>
234234

235235
<RelativeLayout
236-
android:id="@+id/rect"
236+
237237
android:layout_width="0dp"
238238
android:layout_height="match_parent"
239239
android:layout_weight="1">
240-
<ImageView android:id="@+id/rectIcon"
240+
<ImageView
241241
android:layout_width="100px"
242242
android:layout_height="100px"
243-
android:background="@drawable/border_shape_white"
244-
android:scaleType="fitXY" android:layout_centerVertical="true"
245-
android:layout_centerHorizontal="true"/>
243+
android:layout_centerInParent="true"
244+
android:scaleType="fitXY"
245+
/>
246246
</RelativeLayout>
247247
</LinearLayout>
248248

249+
249250
<View android:layout_width="match_parent" android:layout_height="1px"
250251
android:background="#11161d"/>
251252

253+
254+
252255
<LinearLayout android:layout_width="match_parent"
253256
android:layout_height="0dp"
254257
android:layout_weight="1"

0 commit comments

Comments
 (0)