Android TabActivity with Toolbar - setSupportActionBar() unknow -


is possible use setsupportactionbar() in tabactivity? extending appcompatactivity not possible...

public class tabhost extends tabactivity {      public void oncreate(bundle savedinstancestate) {         super.oncreate(savedinstancestate);         setcontentview(r.layout.tabhost);           toolbar toolbar = (toolbar) findviewbyid(r.id.toolbar);         setsupportactionbar(toolbar); // unkown         getsupportactionbar().setdisplayhomeasupenabled(true); //also 

do have switch tabactivity fragmenttabhost? thanks

no can't. have extend appcompatactivity, , shouldn't use tabactivity in first place. deprecated long time ago. should use solution based on viewpager , fragments achieve same behavior


Comments

Popular posts from this blog

javascript - three.js lot of meshes optimization -

smartface.io - Proper way to change color scheme for whole application -

Email notification in google apps script -