When using the ActionBar with Tabs the Actionbar overlaps the Tabs and it looks bodged.
When using the ActionBar with Tabs the Actionbar overlaps the Tabs and it looks bodged.
]]>« I’m new to lightning launcher (downloaded it yesterday). (Previous Post)
< ![CDATA[
Actionbar with Tabs?
Does that run by script, right?
(I can’t find that setting in LL..)
]]>
< ![CDATA[
yeah
]]>
< ![CDATA[
Is it due to the recent changes or was the problem already present in the previous release ? Could you share the script please ?
]]>
< ![CDATA[
im not sure tbh i used tabs before but the ActionBar and the Tabs were the same color so i wouldnt of noticed it if it was.
btw if you ever need to update the icon font can you add the icon with 3 horizontal lines the 4 looks weird (home button icon on ActionBar ↑)
]]>
< ![CDATA[
bindClass(“android.view.MenuItem“);
bindClass(“android.app.ActionBar“);
bindClass(“android.graphics.drawable.ColorDrawable“);
var tabLabels = [“Home”,”Music”,”Social”,”News”,”Work”];
function create(menu){
var item;
var settings = menu.add(“Settings”);
settings.setShowAsAction(MenuItem.SHOW_AS_ACTION_NEVER);
var camera = menu.add(“Camera”);
camera.setIcon(Image.createTextIcon(“L”, 460, 0xffffffff, 0x00000000, null).toDrawable());
camera.setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS);
return true;
}
function select(item){
alert(item.getTitle());
return true;
}
getEvent().getScreen().showActionBar(create, select);
var ab = getActiveScreen().getContext().getActionBar();
with(ab){
setTitle(“Jay M”);
setDisplayHomeAsUpEnabled(true);
setHomeAsUpIndicator(Image.createTextIcon(“=”, 460, 0xffffffff, 0x00000000, null).toDrawable());
setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
setBackgroundDrawable(new ColorDrawable(0xff33b5e5));
var listener = new ActionBar.TabListener(){
onTabSelected: function(tab, ft){
Android.makeNewToast(“Tab ” + tab.getPosition() + 1 + ” selected”, false).show();
},
onTabUnselected: function(tab, ft){
Android.makeNewToast(“Tab ” + tab.getPosition() + 1 + ” unselected”, false).show();
},
onTabReselected: function(tab, ft){
},
};
for(var i = 0; i < = tabLabels.length; i++){
ab.addTab(ab.newTab().setText(tabLabels[i]).setTabListener(listener));
}
}
]]>
< ![CDATA[
Thanks, I think I got it. It will work in the home screen, but not in the app drawer.
]]>
< ![CDATA[
thats cool i only want it for the homescreen anyways.
]]>
< ![CDATA[
fixed thanks!
]]>
< ![CDATA[
Sorry I forgot about the icon…
]]>
< ![CDATA[
its alryt maybe just include it next update or whenever you need to add more icons no rush.
]]>