drawer

Android: Expandable Navigation Drawer with custom row views

人盡茶涼 提交于 2019-12-22 18:02:17
问题 I'm trying to do a navigation drawer menu with expandable elements like this --> http://goo.gl/SkMU8N I had no idea so I started by doing something like this one (not mine). https://github.com/PrashamTrivedi/DrawerLayoutTest The problem is that those rows are simple text and they looks horrible. I want to know how to modify the Adapter (or whatever) to attach my own xml files like you do with the normal drawer (example here --> http://goo.gl/phAJy). Thanks a lot!! 回答1: Here an example of

How to Disable drawer in fragment and back back to correct fragment

拜拜、爱过 提交于 2019-12-21 12:43:28
问题 I have a main Activity with a Fragment layout. The drawer has 3 option: Fragment[1], Fragment[2], Fragment[3]. Inside Fragment[2] and Fragment[3] is one button. This button open other fragment. Fragment[4]. I want Fragment[4] without drawer but with a back button. This is the onClick code in Fragment[2] Fragment fragment = new InstalacionesEncontradasFragment(); Bundle bundle = new Bundle(); bundle.putSerializable("key", this.instalacionesConCategorias); fragment.setArguments(bundle);

How can I use the Navigation Drawer without fragments?

和自甴很熟 提交于 2019-12-20 14:19:07
问题 I'm trying to follow this tutorial on how to create a Navigation Drawer, but I don't want to use Fragments to show new content after the user select an item from the drawer list. What's the best aproach to get around this problem? I'm using API 10 which doesn't implements Fragments. 回答1: First, API 10 has access to fragments via the same Android Support package that contains the DrawerLayout . This has been around for over two years, and you should not be trying to mess with new things like

What is the difference between the SlidingMenu library and the Android Navigation Drawer?

偶尔善良 提交于 2019-12-20 10:31:38
问题 The SlidingMenu library is an excellent third party library and I've already used it for a long time. Now I know Android provides a new navigation pattern using Navigation Drawer. It looks like the sliding menu. So is there anyone who already uses these two both? What is the difference and what are the pros and cons? Thanks a lot. 回答1: SlidingMenu library is a third party api which uses a RelativeLayout inside. The main advantage is customization according to your requirement. Buy your

AngularDart Material Design 应用布局

↘锁芯ラ 提交于 2019-12-18 19:48:09
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 自述 应用布局 应用程序布局是一个样式,指令和组件系统,当它们一起使用时,可以提供材质外观和感知应用程序的层叠关系。 它根据材料规格提供应用栏,抽屉和导航样式。 构建 样式由包提供:angular_components/app_layout / layout.scss.css。 要在Angular组件中使用这些样式,只需将其添加为Component注解中的styleUrls值即可。 建议在任何特定于组件的样式之前添加样式,以便您可以根据需要轻松覆盖样式值。 @Component( selector: 'my-component', templateUrl: 'my_component.html', styleUrls: const [ 'package:angular_components/app_layout/layout.scss.css', 'my_component.scss.css']) class MyComponent {} 应用栏 应用栏具有以下类,可以一起使用来创建标题: class 描述 material-header 头部标题的容器元素。 shadow 材质标题上的修饰符可以将阴影应用于标题。 dense-header 使主要使用鼠标和键盘界面的应用栏更加密集。 material

Android: Navigation Drawer SubMenu: How to Collapsible navigation items

眉间皱痕 提交于 2019-12-18 10:36:06
问题 I have a Navigation Drawer with 10 options Option #5 shoudl have another 7 options (like a sub menu) of some sort that is expandable/collapsible How do I create a "Collapsible navigation items" like it is described here? 回答1: Here is a sample application which makes it: PrashamTrivedi / DrawerLayoutTest : Link is dead EDIT: Simple Navigational Drawer Layout in Android @Override public View getGroupView(int groupPosition, boolean isExpanded, View convertView, ViewGroup parent) { if

Add (open/close) button to activity for (opening/closing) the navigation drawer

試著忘記壹切 提交于 2019-12-18 02:39:37
问题 I am currently learning about the Navigation Drawer from the android site, and I am using their example http://developer.android.com/training/implementing-navigation/nav-drawer.html What I want is to add a button in the MainActivity which would be able to open the NavigationDrawer . I need to do it programmatically, not in XML. How can I do that? 回答1: Create a method in MainActivity which contains your drawerLayout. public void open() { mDrawerLayout.openDrawer(Gravity.LEFT); } and from Your

Animate drawer icon into arrow on setDisplayHomeAsUpEnabled?

*爱你&永不变心* 提交于 2019-12-17 17:32:15
问题 I'm using setDisplayHomeAsUpEnabled in order to show the arrow instead of the drawer "burger" icon but it's not getting animated or anything. Instead it shows the arrow drawable instantaneously. Home screen: (Album 1) When you tap a movie: (Album 2) The thing is, the icon does the animation just fine when I slide the drawer, which makes me think that maybe I'm not supposed to use setDisplayHomeAsUpEnabled for this: (Album 3) Album: http://imgur.com/a/LkXbh Here's my drawer toggle code:

Possible problematic style of Toolbar

允我心安 提交于 2019-12-13 06:16:52
问题 This case is related to the following problem. In the case I believe it may be a problem with the style I'm trying to use the toolbar. I need you to stay in the Toolbar overlay, it has a drawer menu, and the lollipop operate normally, lower some versions. style.xml v21 <style name="AppTheme" parent="AppTheme.Base"> <item name="android:colorPrimary">@color/primary</item> <item name="android:colorPrimaryDark">@color/primary_dark</item> <item name="android:colorAccent">@color/accent</item> <item

Android Navigation Drawer with multiple activites

天涯浪子 提交于 2019-12-11 22:43:07
问题 I'm trying to to use a Navigation Drawer with a few activites and no fragments. I read me through a few answers here and ended up in this and I'v got the same Problem as the user Dediqated, here is my Code: BaseActivity.java: import android.app.Activity; import android.content.res.Configuration; import android.content.res.Resources.NotFoundException; import android.os.Bundle; import android.support.v4.app.ActionBarDrawerToggle; import android.support.v4.widget.DrawerLayout; import android