Meine Hauptbenutzeroberfläche versteckt meine Include-Benutzeroberfläche. Im ersten Bild kannst du sehen was ich will. Es gibt Registerkarten in meiner Benutzeroberfläche und ich möchte danach Tabs, sollte es eine kleine UI werden Details davon haben. Also habe ich eine andere kleine Benutzeroberfläche erstellt und diese in meine Hauptbenutzeroberfläche aufgenommen. Auf der Registerkarte Meine Hauptregisterkarte wird die Benutzeroberfläche zum Einschließen ausgeblendet. Bitte hilf mir dabei.DrawerLayout ein anderes Layout ausblenden
, was ich unter dem Bild in möchten
Problem mit meinem Layout in Bild unten
hier ist der Code für die gleiche ..
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/backgroundimage"
android:fitsSystemWindows="true"
android:orientation="vertical">
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/drawerLayout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
<android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:layout_scrollFlags="scroll|enterAlways"
app:title="Test">
</android.support.v7.widget.Toolbar>
<FrameLayout
android:id="@+id/containerView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
</FrameLayout>
</LinearLayout>
<android.support.design.widget.NavigationView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/navigation_view"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
android:layout_marginTop="-24dp"
app:headerLayout="@layout/nav_header_navigation_drawer"
app:itemTextColor="@color/black"
app:menu="@menu/drawermenu"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light">
</android.support.design.widget.NavigationView>
</android.support.v4.widget.DrawerLayout>
<include layout="@layout/bottom_nowplaying_card" ></include>
</LinearLayout>
bottom_nowplaying_card Code unten ist
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/topContainer"
android:layout_width="wrap_content"
android:layout_height="60dp"
android:layout_gravity="top"
android:background="@color/graybackcolor">
<ImageView
android:id="@+id/slide_bottom_song_image"
android:layout_width="55dp"
android:layout_height="55dp"
android:layout_alignParentLeft="true"
android:background="@drawable/musicicon"
android:paddingTop="10dp"
android:scaleType="centerCrop" />
<LinearLayout
android:id="@+id/bottom_songsdetails"
android:layout_width="230dp"
android:layout_height="wrap_content"
android:layout_marginRight="10dp"
android:layout_toRightOf="@+id/slide_bottom_song_image"
android:orientation="vertical"
android:paddingLeft="10dp"
android:paddingTop="5dp">
<TextView
android:id="@+id/song_title_bar"
style="@style/AppTheme"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:singleLine="true"
android:text="Please select song"
android:textColor="@color/textcolor"
android:textSize="16sp" />
<TextView
android:id="@+id/song_artist_bar"
style="@style/AppTheme"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:paddingTop="3dp"
android:singleLine="true"
android:text="sub Title"
android:textColor="@color/textcolor"
android:textSize="13sp" />
</LinearLayout>
<LinearLayout
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="wrap_content"
android:layout_height="50dp"
android:orientation="horizontal"
android:layout_alignBottom="@+id/slide_bottom_song_image"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:layout_toRightOf="@+id/bottom_songsdetails"
android:layout_toEndOf="@+id/bottom_songsdetails">
<net.steamcrafted.materialiconlib.MaterialIconView
android:id="@+id/play_pause_bottom"
android:layout_width="23dp"
android:layout_height="23dp"
android:layout_gravity="center"
android:layout_weight="0.6"
android:background="?attr/selectableItemBackgroundBorderless"
android:scaleType="center"
app:materialIcon="play"
app:materialIconColor="?attr/iconColor"
app:materialIconSize="35dp" />
<net.steamcrafted.materialiconlib.MaterialIconView
android:id="@+id/playlist"
android:layout_width="23dp"
android:layout_height="23dp"
android:layout_gravity="center"
android:layout_weight="0.6"
android:background="?attr/selectableItemBackgroundBorderless"
android:scaleType="center"
app:materialIcon="playlist_plus"
app:materialIconColor="?attr/iconColor"
app:materialIconSize="35dp" />
</LinearLayout>
</RelativeLayout>
Fehler unterschritten. Fehler: (17, 68) Es wurde keine Ressource gefunden, die mit dem angegebenen Namen übereinstimmt (bei 'layout_above' mit dem Wert '@ id/abc'). Auch warum du NavigationView kommentiert hast. Ich will das auch. Tut mir leid, aber ich bin neu in android, warum ich Sily Qus –
seine Include-ID frage ... Bitte überprüfen Sie das Include-Tag. –
Es ist nur da. Ich habe deinen Code einfach kopiert und übersprungen. Aber denselben Fehler bekommen. Weiß nicht, aber es erhält denselben Fehler :( –