Dose not show menu drawer item

mohammadalian

i have use https://github.com/lewisjdeane/L-Navigation-Drawer

but in menu in my phone dose not show item in my phone when i open the menu dose not show item and blank (White)

code in MainActivty.java

protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        toolbar = (Toolbar) findViewById(R.id.toolbar);
        setSupportActionBar(toolbar);
        getSupportActionBar().setDisplayHomeAsUpEnabled(true);


        vorod=(Button) findViewById(R.id.main_vorod);

        NavigationListView navigationListView = (NavigationListView) findViewById(R.id.navigation_list_view);

        int[] images = new int[]{
         R.drawable.setting,
         R.drawable.like
      };


        new NavigationItem("setting",images[1],true);
        new NavigationItem("setting2",images[1],false);
        new NavigationItem("setting3",images[1],false);
        new NavigationItem("setting4",images[1],false);
        navigationListView.setSelectedItem(0);

and actvity_main.xml

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 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:id="@+id/activity_main"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context="com.sayeben.karagah.MainActivity"
    android:background="@mipmap/bg">

    <android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:local="http://schemas.android.com/apk/res-auto"
        android:id="@+id/toolbar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:minHeight="?attr/actionBarSize"
        android:background="?attr/colorPrimary"
        local:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
        local:popupTheme="@style/ThemeOverlay.AppCompat.Light" />


    <android.support.v4.widget.DrawerLayout
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/drawer_layout"
        android:layout_width="match_parent"
        android:layout_height="match_parent">
        <!-- The main content view -->
        <FrameLayout
            android:id="@+id/content_frame"
            android:layout_width="match_parent"
            android:layout_height="match_parent">

            <!-- Put your layout design in here -->

        </FrameLayout>
        <!-- The navigation list view -->
        <uk.me.lewisdeane.lnavigationdrawer.NavigationListView
            android:id="@+id/navigation_list_view"
            android:layout_width="240dp"
            android:layout_height="match_parent"
            android:layout_gravity="end"
            android:choiceMode="singleChoice"
            android:divider="@android:color/transparent"
            android:dividerHeight="0dp"
            android:background="#FFFFFF"/>
    </android.support.v4.widget.DrawerLayout>
</RelativeLayout>
Tabish Hussain

Please use

navigationListView.addNavigationItem(String title, int imgRes, boolean selected); 

to add item to NavigationView

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Show menu item icons in actionbar while having navigation drawer

From Dev

Reference menu item in Java menu drawer

From Dev

Show chosen menu item

From Dev

Show click menu item

From Java

Change the color of a checked menu item in a navigation drawer

From Java

Changing text color of menu item in navigation drawer

From Java

Hide a Navigation Drawer Menu Item - Android

From Dev

Underline menu item in navigation drawer list

From Dev

Navigation drawer menu item with titles and sub titles

From Dev

How to hide a navigation drawer menu item programmatically?

From Dev

Navigation Drawer Menu Item Title Color in Android

From Dev

SlidingTabLayout getCurrentItem() on onClick() drawer menu item

From Dev

Android Navigation drawer menu item icon color

From Dev

Navigation drawer menu item with titles and sub titles

From Dev

Android draw a rectangle to navigation drawer menu item

From Dev

show navigation drawer on physical menu button

From Dev

Show clicked Item highlighted in Navigation Drawer Android

From Dev

How to close drawer menu when click on item menu?

From Dev

Get selected menu item's index value in the navigation drawer

From Dev

Open new Activity after click item in navigation drawer menu

From Dev

How to start an activity on material navigation drawer menu item clicked

From Dev

How to add a collapsible menu item inside navigation drawer in android?

From Dev

How to draw a line between menu item in navigation drawer

From Dev

Change drawer gap between header group and first item menu

From Dev

NullPointerException when trying to set title of item in drawer menu

From Dev

Change the color of a checked menu item in a navigation drawer in different menus

From Dev

How to draw a line between menu item in navigation drawer

From Dev

Selecting item of sliding tabs menu from navigation drawer with some fragment

From Dev

How can I make hyperlink item menu drawer?

Related Related

  1. 1

    Show menu item icons in actionbar while having navigation drawer

  2. 2

    Reference menu item in Java menu drawer

  3. 3

    Show chosen menu item

  4. 4

    Show click menu item

  5. 5

    Change the color of a checked menu item in a navigation drawer

  6. 6

    Changing text color of menu item in navigation drawer

  7. 7

    Hide a Navigation Drawer Menu Item - Android

  8. 8

    Underline menu item in navigation drawer list

  9. 9

    Navigation drawer menu item with titles and sub titles

  10. 10

    How to hide a navigation drawer menu item programmatically?

  11. 11

    Navigation Drawer Menu Item Title Color in Android

  12. 12

    SlidingTabLayout getCurrentItem() on onClick() drawer menu item

  13. 13

    Android Navigation drawer menu item icon color

  14. 14

    Navigation drawer menu item with titles and sub titles

  15. 15

    Android draw a rectangle to navigation drawer menu item

  16. 16

    show navigation drawer on physical menu button

  17. 17

    Show clicked Item highlighted in Navigation Drawer Android

  18. 18

    How to close drawer menu when click on item menu?

  19. 19

    Get selected menu item's index value in the navigation drawer

  20. 20

    Open new Activity after click item in navigation drawer menu

  21. 21

    How to start an activity on material navigation drawer menu item clicked

  22. 22

    How to add a collapsible menu item inside navigation drawer in android?

  23. 23

    How to draw a line between menu item in navigation drawer

  24. 24

    Change drawer gap between header group and first item menu

  25. 25

    NullPointerException when trying to set title of item in drawer menu

  26. 26

    Change the color of a checked menu item in a navigation drawer in different menus

  27. 27

    How to draw a line between menu item in navigation drawer

  28. 28

    Selecting item of sliding tabs menu from navigation drawer with some fragment

  29. 29

    How can I make hyperlink item menu drawer?

HotTag

Archive