Frage

habe ich einen Bildschirm, dass Anwendungen Registerkarten in meiner Android-Anwendung. Es gibt eine Linie (wie eine Grenze), das zeigt, zwischen dem und dem TabWidget framelayout. Ich möchte von dieser Linie, um loszuwerden, aber kann nicht scheinen zu finden, was es ist. Ich habe festgestellt, dass es einen Teil der FrameLayout indem sein visibilty zu gegangen ist. Bitte beachten Sie den Code unten:

<?xml version="1.0" encoding="utf-8"?>
<TabHost xmlns:android="http://schemas.android.com/apk/res/android" 
    android:id="@android:id/tabhost"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">

<LinearLayout
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"        
    android:background="#fb8c10"
    >

    <ImageView
    android:id="@+id/img_confirm_header"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:src="@drawable/confirm_header"                 
    />

    <TabWidget
        android:id="@android:id/tabs"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content" 
        android:layout_marginBottom="0dip"
        android:background="#fb8c10"                              
        android:tabStripEnabled="false"                         
        />

    <FrameLayout
        android:id="@android:id/tabcontent"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"            
        android:background="@drawable/tab_bg"                                                
         />
</LinearLayout>
</TabHost>

Dies ist ein Link des aktuellen Layout und was ich versuche zu tun http://img441.imageshack.us/g/screenshot20110116at513.png/

Das orange Layout ist meine app, und das Grau ist, was ich versuche zu tun.

Beachten Sie, wie in der grauen Screenshot der Registerkarte fließt in den Rahmen.

Wir entschuldigen uns für die Links, ich kann nicht senden Sie Bilder noch: p

Danke!

War es hilfreich?

Lösung

ich es geschaffen, dieses Problem zu lösen, indem Sie den Z-Index mit relativem Layout zu manipulieren. Ich konnte die Laschen leicht über den Rahmen-Layout positionieren. Siehe Code unten:

<?xml version="1.0" encoding="utf-8"?>
<TabHost xmlns:android="http://schemas.android.com/apk/res/android" 
    android:id="@android:id/tabhost"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">

    <LinearLayout
        android:orientation="vertical"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"        
        android:background="#fb8c10"
        >
        <ImageView
        android:id="@+id/img_confirm_header"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:src="@drawable/tab_header"

        />
        <RelativeLayout
        android:id="@+id/widget77"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:background="@android:color/transparent"
        >                    
            <FrameLayout
            android:id="@android:id/tabcontent"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"            
            android:background="@android:color/transparent"                             
            android:layout_marginTop="33dip"                                                   
             />
             <TabWidget
            android:id="@android:id/tabs"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"            
            android:background="#fb8c10"                              
            android:tabStripEnabled="true"  
            android:layout_above="@android:id/tabcontent"
            android:layout_marginBottom="40dip"                                            
            />
        </RelativeLayout>
    </LinearLayout>
</TabHost>

Andere Tipps

Gerade jetzt bin ich auf dieses Problem. Allerdings habe ich auch versucht, die obere Grenze von FrameLayout zu entfernen. Ich habe es gemacht. aber ich glaube nicht, es ist ein Weg, um die obere Grenze zu entfernen. sowieso FYI,

Sie etwas Textview mit Hintergrund weiß auf Border und AbsoluteLayout verwenden.

Beispiel:

<AbsoluteLayout>

<TabHost 
    android:layout_x="0dip"
    android:layout_y="5dip" ...>

    <AbsoluteLayout android:padding="5dip" android:background="#ffffff">
        <TabWidget/>
        <FrameLayout ....
        android:layout_x="0dip" android:layout_y="65dip" />
    </AbsoluteLayout>

</TabHost>

  <TextView 
    android:layout_width="fill_parent" android:layout_height="25dip" 
    android:layout_x="0dip" android:layout_y="65dip" 
    android:background="#ffffff"/>

</AbsoluteLayout>
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top