yandex
loader

please wait

  • Priya Roy Feb-12-2019 06:30:05 AM ( 1 month ago )

     want to open navigation view with bottom app bar click. But navigation view always visible .

    My layout xml :

    xml version="1.0" encoding="utf-8"?>
     xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:app="http://schemas.android.com/apk/res-auto"
        xmlns:tools="http://schemas.android.com/tools"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:id="@+id/drawer_layout"
        android:theme="@style/ThemeOverlay.MaterialComponents.Light"
        >
    
    
        
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            >
    
    
        
            android:id="@+id/relativeLayout2"
            android:layout_width="match_parent"
            android:layout_height="132dp"
            android:background="@drawable/login_bg2_gradient"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent">
    
            
                android:layout_width="match_parent"
                android:layout_height="match_parent">
    
    
                
                    android:id="@+id/imageView5"
                    android:layout_width="45dp"
                    android:layout_height="44dp"
                    android:layout_alignParentStart="true"
                    android:layout_alignParentEnd="true"
                    android:layout_alignParentBottom="true"
                    android:layout_marginStart="8dp"
                    android:layout_marginTop="24dp"
                    android:layout_marginEnd="8dp"
                    app:layout_constraintBottom_toTopOf="@+id/textView"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toTopOf="parent"
                    app:layout_constraintVertical_chainStyle="spread_inside"
                    app:srcCompat="@drawable/logo" />
    
                
                    android:id="@+id/textView"
                    android:layout_width="91dp"
                    android:layout_height="23dp"
                    android:layout_alignParentStart="true"
                    android:layout_alignParentEnd="true"
                    android:layout_alignParentBottom="true"
                    android:layout_marginStart="8dp"
                    android:layout_marginEnd="8dp"
                    android:text="SAMET DAĞ"
                    app:layout_constraintBottom_toTopOf="@+id/textView7"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toBottomOf="@+id/imageView5" />
    
                
                    android:id="@+id/textView7"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_alignParentStart="true"
                    android:layout_alignParentEnd="true"
                    android:layout_alignParentBottom="true"
                    android:layout_marginStart="8dp"
                    android:layout_marginEnd="8dp"
                    android:layout_marginBottom="22dp"
                    android:text="8 Şubat 2019 11:05"
                    app:layout_constraintBottom_toBottomOf="parent"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toBottomOf="@+id/textView" />
    
                
                    android:id="@+id/textView8"
                    android:layout_width="69dp"
                    android:layout_height="wrap_content"
                    android:layout_alignParentStart="true"
                    android:layout_marginStart="4dp"
                    android:layout_marginTop="8dp"
                    android:layout_marginBottom
  • Ekta Singhania Feb-12-2019 06:31:50 AM ( 1 month ago )

    You are opening it when you start activity. Please remove the line in onCreate method

    drawerLayout.openDrawer(GravityCompat.START);

    and change

    android:layout_gravity="end"

    to

    android:layout_gravity="start"

Please login

Similar Discussion

Recommended For You