User Tools

Site Tools


script_app_drawer

====== Differences ====== This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
script_app_drawer [2015/03/21 17:32]
lm13
script_app_drawer [2015/04/23 14:49] (current)
lm13
Line 2: Line 2:
   * Purpose : This script will fill any container with all of your apps, like an App Drawer   * Purpose : This script will fill any container with all of your apps, like an App Drawer
   * Author : [[https://​plus.google.com/​+LukasMorawietz|LM13]]   * Author : [[https://​plus.google.com/​+LukasMorawietz|LM13]]
-  * Current Version : 3.1+  * Current Version : 3.2
   * Link: https://​plus.google.com/​115366157037831519359/​posts/​4F9TpMfz2fv   * Link: https://​plus.google.com/​115366157037831519359/​posts/​4F9TpMfz2fv
 +  * Video: https://​plus.google.com/​+LukasMorawietz/​posts/​L8r6qKajirq
   * Download available! (Check repository)   * Download available! (Check repository)
  
Line 13: Line 14:
   * Version 3.0 (21/​3/​2015):​ Doesn'​t rely on LLs drawer anymore, hiding items improved   * Version 3.0 (21/​3/​2015):​ Doesn'​t rely on LLs drawer anymore, hiding items improved
   * Version 3.1 (21/​3/​2015):​ Fix crash on pre-lollipop devices, added reload   * Version 3.1 (21/​3/​2015):​ Fix crash on pre-lollipop devices, added reload
 +  * Version 3.2 (23/​4/​2015):​ Fix compatibility with latest Lightning Versions
  
  
Line 73: Line 75:
  
 var sourceItem = LL.getEvent().getItem();​ var sourceItem = LL.getEvent().getItem();​
-var menuRoot=LL.getContext().getWindow().getDecorView().findViewById(R.id.content).getChildAt(0).getChildAt(2).getChildAt(2); +var context ​= LL.getContext()
-var menu = menuRoot.getChildAt(0);+var pkg = context.getPackageName()
 +var rsrc = context.getResources()
 +var id = rsrc.getIdentifier("​bubble_content",​ "id", ​ pkg)
 +var menu =context.getWindow().getDecorView().findViewById(id); 
 +var menuRoot ​= menu.getParent();
 var version = Build.VERSION.SDK_INT;​ var version = Build.VERSION.SDK_INT;​
  
Line 80: Line 86:
 var l=new ViewTreeObserver.OnGlobalLayoutListener(){ var l=new ViewTreeObserver.OnGlobalLayoutListener(){
     onGlobalLayout:​function(){     onGlobalLayout:​function(){
-        var list=menu.getChildAt(0);+        var list=menu;
         var first=list.getChildAt(0);​         var first=list.getChildAt(0);​
         list.removeAllViews();​         list.removeAllViews();​
script_app_drawer.1426959125.txt.gz · Last modified: 2015/03/21 17:32 by lm13