android - Use Toolbar.OnClickListener instead of ActionBar.TabListener? -


i new android , used android template (tabbed activity - viewpager , fragments) , noticed actionbar , actionbar.tablistener deprecated. replaced actionbar appcompatactivity recommended, wondering should use instead of tablistener. can use onclicklistener nested class in toolbar class ?

node: app works fine deprecated interface, want use interface not.

public class mainactivity extends appcompatactivity implements actionbar.tablistener { 

this screenshot of app enter image description here

i recommend use material design tabs. use viewpager , same. advantage is, material tabs actual tabs.

when use actionbar.tablistener (deprecated), not tabs. actionbar tabs, which.. if rotate screen, place automatically on actionbar on top. read documentation here

adding navigation tabs

so implement material design, new , best solution tabs. started, guess best tutorial

material design tabs


Comments

Popular posts from this blog

Java 3D LWJGL collision -

spring - SubProtocolWebSocketHandler - No handlers -

methods - python can't use function in submodule -