2013-11-20 8 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> 

I Layout xml machen, in dem ich einen Knopf in center.And habe ich diesen Knopf nach vorne will immer. Ich füge etwas Textansicht, Bildansicht usw. dynamisch in dieses Layout ein und das eine zentrierte Schaltfläche sollte nach vorne gebracht werden. Dies ist in iOS möglich und ich möchte in android.Any Vorschlag für diese Gedanken? Ich habe oben topHeaderlayout.xml In diesem XML, ich dynamisch hinzugefügt view.Und eine Schaltfläche sollte vor der Ansicht sein.Ich mag Taste bringen (subview) nach vorne in android

Antwort

4

Um beide zusammenfassen und noch klären:

yourView.bringToFront(); 
Verwandte Themen