Is it possible to change the App Drawer Action bar color through scripts?
Is it possible to change the App Drawer Action bar color through scripts?
]]>
« TrianguloY I’m getting this error when using home page changer script. (Previous Post)
(Next Post) V12.6b3 beta »
< ![CDATA[
Yes, through the modification of the background image. This is the PNG file “pages/99/icon/a”. For a single color you can use a 1×1 pixel image.
The text color can be set using the integer “adActionBarTextColor” property (not documented, sorry, will be fixed soon)
]]>
< ![CDATA[
Thanks for the rapid answer! But how can i modify that png and what is the exactly path?
]]>
< ![CDATA[
Maybe in this way(?):
var path=”png path”;
var img=LL.createImage(path);
[create a bitmap with solid color]
img.draw().drawBitmap(“solid color”,0,0,null);
img.save();
]]>
< ![CDATA[
Use img.draw().drawARGB instead of drawBitmap
Or you can also try something like this (best if the image doesn’t already exist):
(not tested)
var img = LL.createImage(1,1);
img.draw().drawARGB(a, r, g, b);
// check that the path is right, I write this without checking
var path = LL.getContext().getFilesDir()+”/pages/99/icon/a”;
var os = new FileOutputStream(path);
img.getBitmap().compress(Bitmap.CompressFormat.PNG, 100, os);
os.close();
]]>
< ![CDATA[
I guess that works also drawColor method, is more useful if I use a variable.
Anyway, what happen if the image already exists? It will be replaced?
]]>
< ![CDATA[
yes
]]>
< ![CDATA[
Good, I’ll try your script sample 🙂
]]>