Android Up button with appcompat on Gingerbread, title not clickable -
we using appcompat library use actionbar down gingerbread , enabling home button on activities (also including both versions of parentactivityname setting in manifest).
but 1 thing testers have reported different "size" of button. on newer devices can click on arrow, logo, or title of activity. on gingerbread smaller area of arrow , logo clickable. title not clickable.
is there way behavior same , have title clickable on gingerbread?
afaik, there no native way of doing it.
making both title , logo clickable feature introduced in later versions.
but yeah, can make custom view , set view of actionbar.
actionbar actionbar = getactionbar(); actionbar.setdisplayshowcustomenabled(true); actionbar.setdisplayshowtitleenabled(false); actionbar.sethomebuttonenabled(false); actionbar.setdisplayhomeasupenabled(false); layoutinflater inflator = (layoutinflater) getsystemservice(context.layout_inflater_service); view v = inflator.inflate(r.layout.custom_action_bar, null); actionbar.setcustomview(v);
Comments
Post a Comment