navigation-drawer

Can I overlap the AppBarLayout with a persistant bottomsheet

感情迁移 提交于 2020-01-14 05:46:08
问题 I want to overlap a AppBarLayout which contains a toolbar with a persistent bottomsheet(when it is in expanded state only).Please tell me at least a hint if it is possible. This is my layout file where my AppBarLayout is defined <android.support.design.widget.CoordinatorLayout 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=

How to set up Navigation Component with Navigation Drawer in Android?

放肆的年华 提交于 2020-01-14 04:41:04
问题 How do I set up navigation component with navigation drawer? How do I use it in my app? Can everything be done with one Activity? How do I handle toolbar visibility with just one Activity and fragments which have a dynamic toolbar visibility. Also, there are fragments which I need to close the drawer and make it inaccessible. This question is a self answered question and works more as a tutorial than a real-life QA. 回答1: How do I set up navigation component with navigation drawer? How do I

Best approach to show network error in android in Android with Tap to Retry option

偶尔善良 提交于 2020-01-13 19:09:09
问题 I have Navigation Drawer in my application with several Fragments and few new Activity also apart from main application flow. Current Functionality For navigating to each Fragment , Network is required and in case of any network error, I used to show Dialog . User needs to click on "OK" button and again go back to navigation drawer to retry. New Approach I am trying User should be shown and error screen similar to LinkedIn android app with option to retry. As inner Fragments and handling call

Removing left margin from android navigation drawer icon

纵饮孤独 提交于 2020-01-13 09:45:18
问题 Can anybody help me to find the way to remove the left margin of the navigation drawer icon (mentioned by red rectangle below )? I am using toolbar here. 回答1: This removes the left margin from toolbar. mainToolbar.setContentInsetsAbsolute(0, 0); Or you can set left inset to 0dp in toolbar xml: android:contentInsetLeft="0dp" Other way is to define that padding in the styles.xml: <style name="ToolbarStyle" parent="@style/Widget.AppCompat.Toolbar"> <item name="contentInsetStart">0dp</item> <item

Background image dimension for Navigation Drawer header

独自空忆成欢 提交于 2020-01-12 00:39:33
问题 Basically I liked the background used by Mr. Jonathan Lee for Navigation Drawer header back ground in google official link http://www.google.com/design/spec/patterns/navigation-drawer.html#navigation-drawer-content So I wanted to reproduce something similar inspired by that. I believe that I need to make a similar design in photoshop and set it as the background image. But the question is, what should be the dimensions and pixels so that it matches different kind of devices? The above link

can I add an image header in navigation drawer layout

狂风中的少年 提交于 2020-01-11 12:14:07
问题 how can i add an image header to my navigation drawer layout like this one and this is my code : MainActivity.java package com.webileapps.navdrawer; import android.app.AlarmManager; import android.app.AlertDialog; import android.app.PendingIntent; import android.content.Context; import android.content.DialogInterface; import android.content.res.Configuration; import android.graphics.drawable.Drawable; import android.os.Bundle; import android.support.v4.app.ActionBarDrawerToggle; import

Creating a navigation drawer over action bar with header

Deadly 提交于 2020-01-11 12:02:10
问题 I have a translation app that helps people to learn a language and play games to check their learning. The app already has a navigation drawer but it appears under the action bar with items. I want to change the navigation drawer to make it appear over the action bar. Very much preferred that the navigation drawer has a google play store style header. I have tried many solutions but I am not able to get it done. Here are some examples : [1]Android Navigation Drawer on top ActionBar 1st and

Creating a navigation drawer over action bar with header

六月ゝ 毕业季﹏ 提交于 2020-01-11 12:01:12
问题 I have a translation app that helps people to learn a language and play games to check their learning. The app already has a navigation drawer but it appears under the action bar with items. I want to change the navigation drawer to make it appear over the action bar. Very much preferred that the navigation drawer has a google play store style header. I have tried many solutions but I am not able to get it done. Here are some examples : [1]Android Navigation Drawer on top ActionBar 1st and

Navigation bar hides but leaves space when using navigation drawer in android 5+

假如想象 提交于 2020-01-11 06:25:10
问题 I am trying to develop a full-screen app with 2 main activities: LoginActivity and DashboardActivity. LoginActivity has only the UI for user input to login like Username and password. In this screen the nav and status bar gets hidden completely without leaving any space. After login in the DashboardActivity I have a toolbar with Navigation drawer. In this activity I did all things I did in LoginActivity. What happens is the Nav and status bar gets hidden but the space occupied by Nav bar

Change drawer icon back to back arrow

限于喜欢 提交于 2020-01-10 06:44:08
问题 I'm using the new DrawerLayout to have side navigation. I'm using the drawer icon (the 'hamburger') like this: @Override protected void onStart() { super.onStart(); mDrawerLayout = (DrawerLayout) findViewById(R.id.activity_main_drawerlayout); mDrawerToggle = new ActionBarDrawerToggle( this, mDrawerLayout, R.drawable.ic_navigation_drawer, R.string.app_name, R.string.app_name); mDrawerLayout.setDrawerListener(mDrawerToggle); getActionBar().setDisplayHomeAsUpEnabled(true); getActionBar()