2013-11-20 25 views
5
<?xml version="1.0" encoding="utf-8"?> 
    <RelativeLayout 
     xmlns:android="http://schemas.android.com/apk/res/android" 
     xmlns:tools="http://schemas.android.com/tools" 
     android:id="@+id/topHeader" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" > 


     <!-- Header aligned to top --> 
    <!-- <include layout="@layout/header_layout" /> --> 

     <!-- Footer aligned to bottom --> 
    <!-- <include layout="@layout/footer_layout" /> --> 

     <!-- Content below header and above footer --> 
    <!-- <include layout="@layout/intermediate_layout" /> --> 
     <RelativeLayout 
     android:layout_width="fill_parent" 
     android:layout_height="fill_parent" 
     android:gravity="center"> 

     <ImageView 
     android:id="@+id/imgLogo" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:layout_centerInParent="true" 
     android:src="@drawable/header" /> 
     </RelativeLayout> 

    </RelativeLayout> 

我做布局的xml,在我把一个按钮,在center.And我想要那个按钮前始终。 我在这个布局上动态地添加了一些textview,imageview等,并且应该把一个中心化的按钮带到前面。 这是可能的iOS和我想在android.Any建议这个想法? 我有以上topHeaderlayout.xml 在这个XML中,我动态地添加view.And一个按钮应该是视图的前面。我想带按钮(子视图)到前面的Android

回答

4

既总结和尚未澄清:

yourView.bringToFront();