actionbar setnavigationmode deprecated
setNavigationMode it's deprecated because on Lollipop it has being replaced by a new paradigm.
You have two options, at least:
Ignore it unless you are targeting 21+ API and developing only for Lollipop.
Use AppCompat; samples here: https://github.com/google/iosched
Personally, I went for option 1.
Vihaan Verma
Updated on June 14, 2022Comments
-
Vihaan Verma almost 2 years
Hi I'm making an app in which I plan on showing floor & category wise listing of stores inside a mall.
Below snap show an activity showing floor wise listing of stores
I was thinking of adding a spinner in the ActionBar showing "by Floor" and "by Category" as options. Clicking on "by Category" would arrange the stores according to the category in which they belong. After googling a bit I found
getActionBar().setNavigationMode(ActionBar.NAVIGATION_MODE_LIST);
would be apt but now I see that its deprecated, putting it as an action item in the activity menu doesn't look like a very good idea. Any suggestions ?
-
Vihaan Verma over 9 yearsJust checked the google play music app. They have one option in activity menu for showing the list of currently playing songs. On toggle it shows a viewpager with current song. I think activity menu toggle action would be an okay way to implement it.