2016-11-14 67 views
0

我需要建議如何創建佈局,該應用程序底部會顯示應用程序版本的文本框的橫幅(揮動線條)。這樣 enter image description here如何創建沒有循環依賴關係的佈局

一個什麼東西管理東陽它跨越了所有的屏幕上創建的佈局像這樣,這顯然不是好:enter image description here

因爲我有循環依賴那裏,這裏說明:enter link description here

所以我已刪除的依賴關係 來實現更好的東西: enter image description here

XML的重要組成部分,是在這裏:

<RelativeLayout 
    android:id="@+id/footer" 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    android:visibility="visible" 
    android:layout_alignParentBottom="true"> 
    <ImageView 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" 
     android:layout_alignParentStart="true" 
     android:layout_alignParentEnd="true" 
     android:src="@drawable/ic_devicescreenlogo" 
     /> 
    <TextView 
     android:id="@+id/version" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:layout_alignParentStart="true" 
     android:paddingBottom="5dp" 
     android:paddingStart="5dp" 
     android:textAppearance="?android:attr/textAppearanceSmall" 
     android:textColor="@color/textunselected" 
     android:text="Version"/> 
</RelativeLayout> 

感謝您的幫助。

回答

0

您可以使用FrameLayout而不是RelativeLayout來獲得一個視圖在另一個之上。