Android 台灣中文網
標題:
如何使設置的imageview對齊框界
[打印本頁]
作者:
kansas73
時間:
2014-2-13 17:15
標題:
如何使設置的imageview對齊框界
大家好,最近在學習設計UI
我設置一張imageview,但是我發現他與上方狀態列(就是電量、訊號強度、時間那一列)
之間還有一條空格無法緊密起來
就連我下方另設置的ImageSwitcher與上方這張中間也是有空隙無法緊密
以下是我的XML,希望大家可以提點一下,或者可以跟我講關鍵字就好我會自己GOOGLE學習謝謝!!
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:src="@drawable/titlebar" />
<ImageSwitcher
android:id="@+id/switcher"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/imageView1"/>
</RelativeLayout>
複製代碼
作者:
CarolHsieh
時間:
2014-4-23 16:59
可以用LinearLayout把兩個物件包起來
並給兩個物件設定
android:layout_weight="1"
登錄/註冊後可看大圖
歡迎光臨 Android 台灣中文網 (https://apk.tw/)
Powered by Discuz! X3.1