2015-07-20 13 views
1

有没有办法将imageView带到linearLayout中的另一个imageView的前端?我尝试把一个小球像在面前的形象,它一点儿也不工作,因为图像是在LinearLayout中:( 有没有什么办法让这可能吗?如何将视图带到linearLayout的前端

<LinearLayout 
    android:id="@+id/HolesPlayer1" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:layout_alignBottom="@+id/tvGoolot13" 
    android:layout_centerHorizontal="true" > 

    <ImageButton 
     android:id="@+id/imgBtn0" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:layout_marginRight="5dp" 
     android:background="@android:color/transparent" 
     android:src="@drawable/hole0" /> 

    <ImageButton 
     android:id="@+id/imgBtn1" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:layout_marginRight="5dp" 
     android:background="@android:color/transparent" 
     android:src="@drawable/hole0" /> 

    <ImageButton 
     android:id="@+id/imgBtn2" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:layout_marginRight="5dp" 
     android:background="@android:color/transparent" 
     android:src="@drawable/hole0" /> 

    <ImageButton 
     android:id="@+id/imgBtn3" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:layout_marginRight="5dp" 
     android:background="@android:color/transparent" 
     android:src="@drawable/hole0" /> 

    <ImageButton 
     android:id="@+id/imgBtn4" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:layout_marginRight="5dp" 
     android:background="@android:color/transparent" 
     android:src="@drawable/hole0" /> 

    <ImageButton 
     android:id="@+id/imgBtn5" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:layout_marginRight="5dp" 
     android:background="@android:color/transparent" 
     android:src="@drawable/hole0" /> 
</LinearLayout> 
+0

发布你的布局 – tyczj

+0

你想要重叠的图像?如果是的话,然后使用它的相对布局目的线性名称说它的线性和直线:)...如果你可以发布的布局,它是最好的程序员回答... – Ahmad

回答

0

怎么样在你的包裹的LinearLayout一个FrameLayout里或RelativeLayout的,然后将图像上面呢?

1

在你的情况我会使用FrameLayout,其中一个它的目的是堆叠在彼此商品的能力。它只是谷歌,你会发现很多教程。

+0

你应该提供一些例子。本网站旨在帮助其他人解答问题。 – blueware

相关问题