綁定帳號登入

Android 台灣中文網

打印 上一主題 下一主題

[求助] 如何使設置的imageview對齊框界

[複製連結] 查看: 1475|回覆: 1|好評: 0
跳轉到指定樓層
樓主
kansas73 | 收聽TA | 只看該作者 回帖獎勵 |倒序瀏覽 |閱讀模式
發表於 2014-2-13 17:15

馬上加入Android 台灣中文網,立即免費下載應用遊戲。

您需要 登錄 才可以下載或查看,沒有帳號?註冊

x
大家好,最近在學習設計UI
我設置一張imageview,但是我發現他與上方狀態列(就是電量、訊號強度、時間那一列)
之間還有一條空格無法緊密起來
就連我下方另設置的ImageSwitcher與上方這張中間也是有空隙無法緊密
以下是我的XML,希望大家可以提點一下,或者可以跟我講關鍵字就好我會自己GOOGLE學習謝謝!!
  1. <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  2.     xmlns:tools="http://schemas.android.com/tools"
  3.     android:layout_width="match_parent"
  4.     android:layout_height="match_parent">
  5.     <ImageView
  6.         android:id="@+id/imageView1"
  7.         android:layout_width="wrap_content"
  8.         android:layout_height="wrap_content"
  9.         android:layout_alignParentTop="true"
  10.         android:src="@drawable/titlebar" />
  11.     <ImageSwitcher
  12.         android:id="@+id/switcher"
  13.         android:layout_width="wrap_content"
  14.         android:layout_height="wrap_content"
  15.         android:layout_below="@+id/imageView1"/>
  16. </RelativeLayout>
複製代碼
「用Android 就來APK.TW」,快來加入粉絲吧!
Android 台灣中文網(APK.TW)
收藏收藏 分享分享 分享專題
用Android 就來Android 台灣中文網(https://apk.tw)
回覆

使用道具 舉報

沙發
CarolHsieh | 收聽TA | 只看該作者
發表於 2014-4-23 16:59
可以用LinearLayout把兩個物件包起來
並給兩個物件設定
android:layout_weight="1"
用Android 就來Android 台灣中文網(https://apk.tw)
回覆 支持 反對

使用道具 舉報

您需要登錄後才可以回帖 登錄 | 註冊

本版積分規則