android-drawer

Android Google Search Bar with Drawer

眉间皱痕 提交于 2021-01-28 19:39:47
问题 My app is currently implemented with the Single activity approach (Using navigation architecture component with one main activity and several fragments). I am currently using a toolbar with a drawer. My app currently look like this: However in the modern google apps (Google photos, gmail etc..), Google has implemented a new way of navigating using a search field with an implemented drawer in it as shown below: I want to replace this toolbar with a search bar and the drawer menu exactly like

Right Drawer - how to add Toolbar button?

╄→гoц情女王★ 提交于 2020-01-14 05:33:41
问题 I have extended the well-known Google Navigation Drawer Example by adding Toolbar and right-side Drawer in a simple test project at GitHub: How to add a "burger" button to the Toolbar - which would open the right Drawer (currently you can only swipe it with a finger)? The "burger" button for the left Drawer is already there and works well (probably added by ActionBarDrawerToggle?) Here is my current activity_main.xml: <android.support.v4.widget.DrawerLayout xmlns:android="http://schemas

DrawerLayout must be measured with MeasureSpec.EXACTLY. at android.support.v4.widget.DrawerLayout.onMeasure(DrawerLayout.java:994)

喜夏-厌秋 提交于 2019-12-08 04:15:57
问题 Here is the my mainlayout file . This is the main layout file where I write the code related to navigation drawer,also include the toolbar by using include. <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" xmlns:tools="http://schemas.android.com/tools" xmlns:android="http://schemas.android.com/apk/res/android"> <android.support.v4.widget.DrawerLayout android:id="@+id/navigation_Drawerlayout" android:layout_width="wrap

DrawerLayout must be measured with MeasureSpec.EXACTLY. at android.support.v4.widget.DrawerLayout.onMeasure(DrawerLayout.java:994)

冷暖自知 提交于 2019-12-06 15:58:09
Here is the my mainlayout file . This is the main layout file where I write the code related to navigation drawer,also include the toolbar by using include. <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" xmlns:tools="http://schemas.android.com/tools" xmlns:android="http://schemas.android.com/apk/res/android"> <android.support.v4.widget.DrawerLayout android:id="@+id/navigation_Drawerlayout" android:layout_width="wrap_content" android:layout_height="match_parent" android:fitsSystemWindows="true" tools:openDrawer="start">

How to use custom fonts in DrawerLayout and NavigationView

拥有回忆 提交于 2019-11-30 20:38:22
I want to use Android's DrawerLayout and NavigationView for menus, but I don't know how to have the menu items use a custom font. Does anyone have a successful implementation? use this method passing the base view in your drawer public static void overrideFonts(final Context context, final View v) { Typeface typeface=Typeface.createFromAsset(context.getAssets(), context.getResources().getString(R.string.fontName)); try { if (v instanceof ViewGroup) { ViewGroup vg = (ViewGroup) v; for (int i = 0; i < vg.getChildCount(); i++) { View child = vg.getChildAt(i); overrideFonts(context, child); } }

How to use custom fonts in DrawerLayout and NavigationView

你说的曾经没有我的故事 提交于 2019-11-30 17:00:35
问题 I want to use Android's DrawerLayout and NavigationView for menus, but I don't know how to have the menu items use a custom font. Does anyone have a successful implementation? 回答1: use this method passing the base view in your drawer public static void overrideFonts(final Context context, final View v) { Typeface typeface=Typeface.createFromAsset(context.getAssets(), context.getResources().getString(R.string.fontName)); try { if (v instanceof ViewGroup) { ViewGroup vg = (ViewGroup) v; for

CoordinatorLayout + AppBarLayout + NavigationDrawer

眉间皱痕 提交于 2019-11-28 15:47:04
I have a layouting problem when combining CoordinatorLayout with an AppBarLayout and a NavigationDrawer . The problem is, that the NavigationDrawer and it's content are hidden behind the toolbar. I have already did a lot of research and tried a lot of restructuring, but none of the "solutions" fixed my issue. A demonstration can be found in this little Webm video: https://www.dropbox.com/s/i5zfc2x2ts2fws7/navigation_drawer_stackoverflow32523188.webm?dl=0 The base style is Theme.AppCompat.Light.NoActionBar . My activity_overview.xml looks like this: <?xml version="1.0" encoding="utf-8"?>

How to add Three Level ListView in ExpandableListView in android

梦想与她 提交于 2019-11-27 12:11:53
I want to add one more level of in ExpandableListView.In current ExpandableListView is two level how can i add one more level. I am new in android developing please help me. Thanks in advance! My MainActivity.java:- private Toolbar mToolbar; ExpandableListAdapter listAdapter; ExpandableListView expListView; List<String> listDataHeader; HashMap<String, List<String>> listDataChild; // private FragmentDrawer drawerFragment; ArrayList<String> arraylist1,arraylist2,arraylist3,arrayList4,arrayList5; int cnt = 0; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate

CoordinatorLayout + AppBarLayout + NavigationDrawer

好久不见. 提交于 2019-11-27 09:23:23
问题 I have a layouting problem when combining CoordinatorLayout with an AppBarLayout and a NavigationDrawer . The problem is, that the NavigationDrawer and it's content are hidden behind the toolbar. I have already did a lot of research and tried a lot of restructuring, but none of the "solutions" fixed my issue. A demonstration can be found in this little Webm video: https://www.dropbox.com/s/i5zfc2x2ts2fws7/navigation_drawer_stackoverflow32523188.webm?dl=0 The base style is Theme.AppCompat

How to add Three Level ListView in ExpandableListView in android

无人久伴 提交于 2019-11-26 15:58:21
问题 I want to add one more level of in ExpandableListView.In current ExpandableListView is two level how can i add one more level. I am new in android developing please help me. Thanks in advance! My MainActivity.java:- private Toolbar mToolbar; ExpandableListAdapter listAdapter; ExpandableListView expListView; List<String> listDataHeader; HashMap<String, List<String>> listDataChild; // private FragmentDrawer drawerFragment; ArrayList<String> arraylist1,arraylist2,arraylist3,arrayList4,arrayList5