2017-07-28 5 views

答えて

1

RelativeLayoutを使用すると、相互にビューをオーバーレイすることができます。 RelativeLayouts hereについて詳しく読むことができます。それが動作

<?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

ありがとう:

これは、あなたがあなたのコードのいずれかを投稿していなかったとして、あなたのためにそれを調整する必要がありますが、あなたは、RelativeLayoutを使うことができる方法の一例です。 – Zippon

関連する問題