How to do something like Drop Down Navigation in Android (since it looks like it's out of date?)

Edit: I also asked a related question: Android: how can I go from the same part? to another "detail", with "Up" click the "Wizard" button. list?


How to make one of them in my application? In my specific case, I want to use the drop-down menu to filter the screens on my "Detailed" view of my "Master Detail" design template, and the presence of the box seems strange for this case, although it looks like drop-down menus, are outdated and replaced with navigation boxes.

enter image description here

I found a foggy tutorial here http://developer.android.com/guide/topics/ui/actionbar.html , but I can't find any good stack overflow questions or any good web tutorials that demonstrate this.

I am also worried that it is really out of date. I went to my Google Calendar application and found out that it was replaced with a β€œbox” as follows: enter image description here

enter image description here

I just want something that β€œfilters” what to display on the screen, similar to this idea.

On an outdated Google webpage, he says:

Deploy an ActionBar.OnNavigationListener to determine the behavior that occurs when a user selects an item from a list.

And it links to http://developer.android.com/reference/android/support/v7/app/ActionBar.OnNavigationListener.html ,

which reads:

This interface is out of date. The navigation modes of the action bar are outdated and not supported by the built-in toolbar action panels. Browse using other common navigation patterns instead.

I went to the link http://developer.android.com/design/patterns/navigation.html and could not find anything like a drop-down menu. Mostly they talked about whether you should press the "Up" and "Back" buttons.

So, How do I do something like Drop Down Navigation in Android (since it looks like it's out of date?) Do I just need to start using boxes? In my specific case, I want to use the drop-down menu to filter the screens on my "Detailed" view of my "Master Detail" design template, and the presence of the box seems strange for this case.

0
source share
1 answer

With API 21, the setNavigationMode method (ActionBar.NAVIGATION_MODE_LIST) is deprecated.

The best way to work with the spinner is to use the toolbar as follows:

<android.support.v7.widget.Toolbar android:id="@+id/toolbar_actionbar" android:layout_height="?attr/actionBarSize" android:layout_width="match_parent" android:background="?attr/colorPrimary"> <Spinner android:id="@+id/spinner_toolbar" android:layout_width="wrap_content" android:layout_height="wrap_content" /> 

You can find an example in Google IO 2014

0
source

All Articles