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

相关问题