getSupportActionBar error during android tutorial -
until now, able solve problems faced google search, can't find possible solutions problem.
(people sherlockactivity think these irrelevant mine, since looks independent api or library)
i assume it's library import, i'm not sure fix.
the error code prints: method getsupportactionbar() undefined type displaymessageactivity
on code: getsupportactionbar().setdisplayhomeasupenabled(true);
and added "android-support-v7-appcompat" library project , assured 1. it's library 2. it's in same physical location 3. yes there green tick.
like following: http://i.stack.imgur.com/jawwm.jpg
and build path of library set follows: http://i.stack.imgur.com/kex7i.jpg
if know how fix it, please me.
solution: getsupportactionbar() method getsupportactionbar() undefined type taskactivity. why?
your class needs extend actionbaractivity, rather plain activity in order use getsupport*() methods.
Comments
Post a Comment