2017-06-30 5 views
-2

Ich möchte 4 Registerkarten unten auf dem Bildschirm entwerfen, aber mein Problem ist Tabs sind am unteren Rand des Bildschirms versteckt.Aber in einer leeren Aktivität werden die Registerkarten angezeigt. Siehe die Bilder. this image is showing tabs with and without activityBottom Tabs sind versteckt

here is my code, xml and java

+1

Es ist immer versteckt? Wird es beim Scrollen nach oben/unten wieder sichtbar? –

+0

Bitte beschreiben Sie Ihr Problem mit vollständigen Details! –

+0

Ja stimme zu @PareshMayani –

Antwort

0

Versuchen-Eigenschaft android:layout_above="@id/tabs" zu FrameLayout

Edit:

<TabHost xmlns:android="http://schemas.android.com/apk/res/android" 
    android:id="@android:id/tabhost" 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content"> 

    <RelativeLayout 
     android:layout_width="match_parent" 
     android:layout_height="match_parent"> 

     <TabWidget 
      android:id="@android:id/tabs" 
      android:layout_width="match_parent" 
      android:layout_height="wrap_content" 
      android:layout_alignParentBottom="true" /> 

     <FrameLayout 
      android:id="@android:id/tabcontent" 
      android:layout_width="match_parent" 
      android:layout_height="match_parent" 
      android:layout_above="@android:id/tabs" 
      android:layout_alignParentTop="true" /> 
    </RelativeLayout> 
</TabHost> 
+0

Nein, es funktioniert nicht. –

+0

@NehaSingh Überprüfen Sie die bearbeitete Antwort. – Shrikant