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

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -