V14a9 alpha
V14a9 alpha
Yet another update 🙂
This time, in addition to bug fixes, this version adds an experimental API to configure and display the android action bar (sample script here: http://www.lightninglauncher.com/wiki/doku.php?id=script_action_bar_sample). Remember, this is experimental, but have fun anyway!
Full ChangeLog: http://www.lightninglauncher.com/wordpress/change-log/
]]>« Hello (Previous Post)
< ![CDATA[
Had a feeling this was gunna drop today 😁
]]>
< ![CDATA[
Sample script doesn’t work for me I had to comment out both setIcon lines to get it to work.
https://lh3.googleusercontent.com/cbOXJT32DDe5zMOSYntGO26R0Sq20Rr_E57XwBDVZ4vwvb-QzmXCIwmWRYqcwf5swSZFb80MiQ
]]>
< ![CDATA[
Jay M same here, but on my phone it is line 15 and 19. Same error.
]]>
< ![CDATA[
I have this error on line 19
🙊
]]>
< ![CDATA[
Sorry I couldn’t copy/paste the script from the device where I wrote the script and I had to type it again in the wiki… with typos of course. Typos fixed now.
]]>
< ![CDATA[
Hehe, working. Can you add to this script new function? For hiding this action menu from desktop… 😇
]]>
< ![CDATA[
Danbar Danbar this one includes a hide button in the overflow menu comment out the alert if you don’t want it to show.
]]>
< ![CDATA[
bindClass(“android.view.MenuItem“);
getEvent().getScreen().showActionBar(create, select);
function create(menu)
{
var item; item = menu.add(“Hello action bar!”); item.setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS); item.setIcon(Image.createTextIcon(“q”, 96, 0xffffffff, 0, null).toDrawable()); item = menu.add(“Another sample button”); item.setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS); item.setIcon(Image.createTextIcon(“v”, 96, 0xffffffff, 0, null).toDrawable()); item = menu.add(“Settings”); item.setShowAsAction(MenuItem.SHOW_AS_ACTION_NEVER);
item = menu.add(“Hide”); item.setShowAsAction(MenuItem.SHOW_AS_ACTION_NEVER);
return true;
}
function select(item)
{
if (item.getTitle() == “Hide”)
{
alert(item.getTitle());
hideBar();
return true;
}
}
function hideBar()
{
getEvent().getScreen().hideActionBar();
}
]]>
< ![CDATA[
Thanks
]]>
< ![CDATA[
Thank you Pierre
Load event is fine now on Desktop
Only when set at “once”
If “Always” and reboot it’s not fine.
Sorry for the update, could you recheck Pierre Hébert
]]>
< ![CDATA[
Trying to bring scripts to new API. Pierre Hébert is Screen. getOpenFolders() returning an array? I get error that this array has no method getlength(). It seems to return only a folder object. LL.getOpenFolders() is working.
]]>
< ![CDATA[
Bruno-Isa LAMOUR-ARNOULD I don’t understand what you mean by once or always? Be careful at the reboot sequence, things may not be started in the order you think. In particular the launcher (and any other app you launch) may be started before the user can interact with the screen, as a consequence it may be difficult to see what happens. Also Lightning doesn’t see reboots, it only see when it is started, hence I think the load action works, but the final result may vary depending on when it is executed.
Mirko Kohler this is a standard javascript array, not the custom “Array” object, use length” instead of getLength and use your_array[index] to get elements.
]]>