Navigation Drawer Below Toolbar

You should move DrawerLayout as top parent and move Toolbar out of DrawerLayout content container. In short this looks like: RelativeLayout —-Toolbar —-DrawerLayout —ContentView —DrawerList <RelativeLayout xmlns:android=”http://schemas.android.com/apk/res/android” xmlns:tools=”http://schemas.android.com/tools” android:id=”@+id/top_parent” android:layout_width=”match_parent” android:layout_height=”match_parent” android:fitsSystemWindows=”true” tools:context=”.MainActivity”> <include android:id=”@+id/toolbar” layout=”@layout/toolbar” /> <android.support.v4.widget.DrawerLayout android:id=”@+id/drawer_layout” android:layout_width=”match_parent” android:layout_height=”match_parent” android:layout_below=”@+id/toolbar”> <FrameLayout android:id=”@+id/content_frame” android:layout_width=”match_parent” android:layout_height=”match_parent” android:background=”@color/background_color” /> <ListView android:id=”@+id/drawer” android:layout_width=”260dp” android:layout_height=”match_parent” android:layout_below=”@+id/toolbar” android:layout_gravity=”start” android:layout_marginTop=”56dp” … Read more

Change color of Navigation Drawer Icon in Android Studio default template

Based on @MD’s comment, all I needed to do was add: app:itemIconTint=”@color/my_desired_colour” to NavigationView (it is located in activity_main.xml layout file) The default tint is black but you can use an even darker shade of black by using #000000 <android.support.design.widget.NavigationView android:id=”@+id/nav_view” android:layout_width=”wrap_content” android:layout_height=”match_parent” android:layout_gravity=”start” android:fitsSystemWindows=”true” app:headerLayout=”@layout/nav_header_main” app:itemIconTint=”#000000″ app:menu=”@menu/activity_main_drawer” />

How to create a custom navigation drawer in android

The tutorial Android Custom Navigation Drawer (via archive.org) contains a basic and a custom project. The latter shows how to setup a Navigation Drawer as shown in the screenshot: The source code of the projects (via archive.org) is available for download. The is also the Navigation Drawer – Live-O project … The source code of … Read more

Android NavigationView menu group divider [duplicate]

Just give a unique id to each group. It will create a separator automatically. <?xml version=”1.0″ encoding=”utf-8″?> <menu xmlns:android=”http://schemas.android.com/apk/res/android”> <group android:id=”@+id/group_feature” android:checkableBehavior=”single”> <item android:id=”@+id/navdrawer_item_map” android:checked=”true” android:icon=”@drawable/ic_drawer_map” android:title=”@string/navdrawer_item_map”/> </group> <group android:id=”@+id/group_settings” android:checkableBehavior=”single”> <item android:id=”@+id/navdrawer_item_settings” android:icon=”@drawable/ic_drawer_settings” android:title=”@string/navdrawer_item_settings”/> </group> </menu>

How can I change the NavigationView’s item text size?

Create new style at the file app/src/main/res/values/styles.xml <style name=”NavigationDrawerStyle”> <item name=”android:textSize”>20sp</item><!– text size in menu–> <!– item size in menu–> <item name=”android:listPreferredItemHeightSmall”>40dp</item> <item name=”listPreferredItemHeightSmall”>40dp</item> <!– item padding left in menu–> <item name=”android:listPreferredItemPaddingLeft”>8dp</item> <item name=”listPreferredItemPaddingLeft”>8dp</item> <!– item padding right in menu–> <item name=”android:listPreferredItemPaddingRight”>8dp</item> <item name=”listPreferredItemPaddingRight”>8dp</item> </style> Add it to your main_layout.xml <android.support.design.widget.NavigationView … app:theme=”@style/NavigationDrawerStyle” ….> </android.support.design.widget.NavigationView> … Read more

Hide a Navigation Drawer Menu Item – Android

NavigationView navigationView; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); hideItem(); } private void hideItem() { navigationView = (NavigationView) findViewById(R.id.nav_view); Menu nav_Menu = navigationView.getMenu(); nav_Menu.findItem(R.id.nav_settings).setVisible(false); }

How to set Navigation Drawer to be opened from right to left

In your main layout set your ListView gravity to right: android:layout_gravity=”right” Also in your code : mDrawerToggle = new ActionBarDrawerToggle(this, mDrawerLayout, R.drawable.ic_drawer, R.string.drawer_open, R.string.drawer_close) { @Override public boolean onOptionsItemSelected(MenuItem item) { if (item != null && item.getItemId() == android.R.id.home) { if (mDrawerLayout.isDrawerOpen(Gravity.RIGHT)) { mDrawerLayout.closeDrawer(Gravity.RIGHT); } else { mDrawerLayout.openDrawer(Gravity.RIGHT); } } return false; } }; hope … Read more

Navigation Drawer semi-transparent over status bar not working

Your status bar background is white, the background of your drawer LinearLayout. Why? You are settings fitsSystemWindows=”true” for your DrawerLayout and the LinearLayout inside it. This causes your LinearLayout to expand behind the status bar (which is transparent). Thus, making the background for the drawer part of the status bar white. If you don’t want … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)