2017-07-28 125 views

回答

1

您可以通過使用RelativeLayout來實現此目的,它允許您覆蓋彼此的視圖。你可以閱讀更多關於RelativeLayouts here

這是你如何可以使用RelativeLayout的,雖然你將不得不調整它爲你,你沒有張貼任何代碼的一個例子:

<?xml version="1.0" encoding="utf-8"?> 
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" > 

    <ImageView 
     android:id="@+id/image" 
     android:layout_width="30dip" 
     android:layout_height="30dip" 
     android:adjustViewBounds="true" 
     android:scaleType="centerCrop" /> 

    <ImageView 
     android:id="@+id/image2" 
     android:layout_width="30dip" 
     android:layout_height="30dip" 
     android:adjustViewBounds="true" 
     android:scaleType="centerCrop" /> 

    <ImageView 
     android:id="@+id/imagef" 
     android:layout_width="100dp" 
     android:layout_height="100dp" 
     android:layout_centerInParent="true" 
     android:background="@drawable/ph_bg" /> 

</RelativeLayout> 
+0

由於它的工作原理。 – Zippon

相關問題