Lil something I’m working on nowt special but its the most complicated custom view I’ve ever made.

Lil something I’m working on nowt special but its the most complicated custom view I’ve ever made.

]]>

21 Commentsto Lil something I’m working on nowt special but its the most complicated custom view I’ve ever made.

  1. Anonymous says:

    < ![CDATA[

    What browser is it?

    ]]>

  2. Anonymous says:

    < ![CDATA[

    Mine, its scripted

    ]]>

  3. Anonymous says:

    < ![CDATA[

    Holy lordy that’s sick! What handset do you use? It’s way faster than any of the experiments I’ve tried in a similar vein

    ]]>

  4. Anonymous says:

    < ![CDATA[

    Thnx its inspired/ripped of lucid launcher 😀 I’m using a Sony Xperia Z5 and speaking of experiments this isn’t the first time I’ve tried this I tried it last year with Tasker https://youtu.be/aLgk-xQmvbw

    ]]>

  5. Anonymous says:

    < ![CDATA[

    Nice

    ]]>

  6. Anonymous says:

    < ![CDATA[

    Nice thing. Do you like pizzas ?

    ]]>

  7. Anonymous says:

    < ![CDATA[

    Everyone likes pizza, especially ninja turtles 🐢🐢🐢🐢

    ]]>

  8. Anonymous says:

    < ![CDATA[

    Jay M could you share your code please ?

    ]]>

  9. Anonymous says:

    < ![CDATA[

    shaking intensifies

    ]]>

  10. Anonymous says:

    < ![CDATA[

    /*


    * QuickSurf


    *Jay M


    * Friday 25th December 2015


    * 06:14


    */



    LL.bindClass(“android.view.View”);


    LL.bindClass(“android.webkit.WebView”);


    LL.bindClass(“android.webkit.WebSettings”);


    LL.bindClass(“android.webkit.WebViewClient”);


    LL.bindClass(“android.view.Gravity”);


    LL.bindClass(“android.widget.LinearLayout”);


    LL.bindClass(“android.widget.LinearLayout.LayoutParams”);


    //LL.bindClass(“android.view.ViewGroup.LayoutParams”);


    LL.bindClass(“android.widget.EditText”);


    LL.bindClass(“android.widget.Button”);


    LL.bindClass(“android.text.InputType”);


    LL.bindClass(“android.app.AlertDialog”);


    LL.bindClass(“android.app.AlertDialog.Builder”);


    LL.bindClass(“android.content.DialogInterface”);


    LL.bindClass(“android.widget.ListView”);


    LL.bindClass(“android.widget.ArrayAdapter”);


    LL.bindClass(“android.R”);


    LL.bindClass(“android.widget.AdapterView”);



    var mctx = LL.getContext();


    var homepage = “https://www.google.co.uk“;


    var orange = “0xffff5722”;


    var white = “0xffffffff”;


    var grey = “0xffd3d3d3”;


    var transparent = 0x00000000;


    var red = “0xffff0000”;


    var textSize = 10; //


    var links = [“Youtube”,”Lightning Wiki”,”Imdb”,”Test 4″];



    var listener = new View.OnClickListener({


    onClick:function(view){


    switch(view){


    case b1:


    if (wv.canGoBack()){


    wv.goBack();


    break;


    }else{


    // dunno yet


    }


    case b2:


    goHome();


    break;


    case b3:


    wv.reload();


    break;


    case b4:


    if (wv.canGoForward()){


    wv.goForward();


    break;


    }


    case bMark:


    bookmarks();


    break;


    case bSearch:


    var url = urlbar.getText().toString().trim();


    wv.loadUrl(url);


    break;


    }


    }


    });



    var main = new LinearLayout(mctx);


    main.setOrientation(LinearLayout.VERTICAL);


    main.setBackgroundColor(orange);


    var mlp = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT,LinearLayout.LayoutParams.MATCH_PARENT);


    main.setLayoutParams(mlp);



    // topContainer



    var tc = new LinearLayout(mctx);


    tc.setOrientation(LinearLayout.HORIZONTAL);


    tc.setBackgroundColor(white);


    //tc.setPadding(20,2,20,20);


    var tclp = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT,LinearLayout.LayoutParams.WRAP_CONTENT);


    tc.setLayoutParams(tclp);


    main.addView(tc);



    var bMark = new Button(mctx);


    bMark.setText(“★”);


    bMark.setTextSize(textSize);


    //bMark.setBackgroundColor(transparent);


    var bmarklp = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT,LinearLayout.LayoutParams.WRAP_CONTENT,0);


    bMark.setLayoutParams(bmarklp);


    tc.addView(bMark);


    bMark.setOnClickListener(listener);



    // searchbar



    var urlbar = new EditText(mctx);


    urlbar.setHint(“Will probably scrap the urlbar”);


    urlbar.setTextSize(textSize);


    urlbar.setInputType(InputType.TYPE_TEXT_VARIATION_URI);


    urlbar.setBackgroundColor(grey);


    //urlbar.setPadding(20,5,10,5);


    var urlbarlp = new LinearLayout.LayoutParams(0,LinearLayout.LayoutParams.WRAP_CONTENT,1);


    urlbar.setLayoutParams(urlbarlp);


    tc.addView(urlbar);



    var bSearch = new Button(mctx);


    bSearch.setText(“Go”);


    bSearch.setTextSize(textSize);


    //bSearch.setBackgroundColor(transparent);


    var bSearchlp = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT,LinearLayout.LayoutParams.WRAP_CONTENT,0);


    bSearch.setLayoutParams(bSearchlp);


    tc.addView(bSearch);


    bSearch.setOnClickListener(listener);



    /////////// ALL OK UP TO THIS POINT WTF 😠 //////////



    var wv = new WebView(mctx);


    var wvlp = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT,LinearLayout.LayoutParams.MATCH_PARENT,1);


    wv.setLayoutParams(wvlp);


    wv.loadUrl(homepage);


    wv.getSettings().setJavaScriptEnabled(true);


    wv.getSettings().setLoadWithOverviewMode(true);


    wv.getSettings().setUseWideViewPort(true);


    wv.getSettings().setDisplayZoomControls(true);


    wv.getSettings().setSupportZoom(true);


    wv.setWebViewClient(new WebViewClient());


    wv.setInitialScale(100);


    main.addView(wv);



    // button container layout


    var buttoncontainer = new LinearLayout(mctx);


    buttoncontainer.setOrientation(LinearLayout.HORIZONTAL);


    buttoncontainer.setBackgroundColor(white);


    // button container params


    var buttoncontainerparams = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT,LinearLayout.LayoutParams.WRAP_CONTENT);


    // set layout params for button container layout


    buttoncontainer.setLayoutParams(buttoncontainerparams);



    // button 1



    var b1 = new Button(mctx);


    var b1p = new LinearLayout.LayoutParams(0,LinearLayout.LayoutParams.WRAP_CONTENT,1);


    // set layout params for b1


    b1.setLayoutParams(b1p);


    b1.setText(“< ");


    b1.setTextSize(textSize);


    b1.setOnClickListener(listener);



    // button 2



    var b2 = new Button(mctx);


    var b2p = new LinearLayout.LayoutParams(0,LinearLayout.LayoutParams.WRAP_CONTENT,1);


    // set layout params for b2


    b2.setLayoutParams(b2p);


    b2.setText(“Home”);


    b2.setTextSize(textSize);


    b2.setOnClickListener(listener);



    // button 3



    var b3 = new Button(mctx);


    var b3p = new LinearLayout.LayoutParams(0,LinearLayout.LayoutParams.WRAP_CONTENT,1);


    // set layout params for b3


    b3.setLayoutParams(b3p);


    b3.setText(“Reload”);


    b3.setTextSize(textSize);


    b3.setOnClickListener(listener);



    // button 4



    var b4 = new Button(mctx);


    var b4p = new LinearLayout.LayoutParams(0,LinearLayout.LayoutParams.WRAP_CONTENT,1);


    // set layout params for b4


    b4.setLayoutParams(b2p);


    b4.setText(“>”);


    b4.setTextSize(textSize);


    b4.setOnClickListener(listener);



    buttoncontainer.addView(b1);


    buttoncontainer.addView(b2);


    buttoncontainer.addView(b3);


    buttoncontainer.addView(b4);



    main.addView(buttoncontainer);



    item.setHorizontalGrab(true);


    item.setVerticalGrab(true);



    return main;



    function goHome(){


    wv.loadUrl(homepage);


    }



    function bookmarks(){


    var adb = new AlertDialog.Builder(mctx);


    adb.setCancelable(false);


    adb.setTitle(“Quick Links”);


    var lv = new ListView(mctx);


    var adapter = new ArrayAdapter(mctx, R.layout.simple_list_item_1, links);


    lv.setAdapter(adapter);


    lv.setOnItemClickListener(new AdapterView.OnItemClickListener(){


    onItemClick:function(parent,view,position,id){


    Android.makeNewToast(parent.getItemAtPosition(position), false).show();


    }


    });


    adb.setView(lv);


    adb.setPositiveButton(“Add New”, new DialogInterface.OnClickListener(){


    onClick:function(dialog,which){


    }



    });



    adb.setNeutralButton(“Dunno Yet”, new DialogInterface.OnClickListener(){


    onClick:function(dialog,which){


    }



    });



    adb.setNegativeButton(“Close”, new DialogInterface.OnClickListener(){


    onClick:function(dialog,which){


    dialog.dismiss();


    }



    });



    var alert = adb.create();


    alert.show();


    }

    ]]>

  11. Anonymous says:

    < ![CDATA[

    wow thank



    i’ll try

    ]]>

  12. Anonymous says:

    < ![CDATA[

    error on line 186?


    sorry im noob

    ]]>

  13. Anonymous says:

    < ![CDATA[

    How are you trying to use the script? You need to add a custom view to your home screen 1st then in its properties you will find “create script” set my script there.

    ]]>

  14. Anonymous says:

    < ![CDATA[

    Fronz Ferdi you have to set the script in events property


    Under Create

    ]]>

  15. Anonymous says:

    < ![CDATA[

    :))))

    ]]>

  16. Anonymous says:

    < ![CDATA[

    Bad ass man… I’ve always liked that part of lucid, flip the app drawer and browser around with the browser on the left and screw gnl… Now this on lightning is way better.. Damn I guess I’m gonna have to learn all this scripting stuff too now lol

    ]]>

  17. Anonymous says:

    < ![CDATA[

    Corey Spell lol

    ]]>

  18. Anonymous says:

    < ![CDATA[

    I’ve been using this… Pretty cool.


    On a fresh load of launcher (like after a power on) just touching the upper left open position of floating desktop crashes the launcher (Lightning Launcher has stopped) every time.



    If I go to that desktop via 2 finger swipe, and let the home page load, it works as expected after that.



    If I kill LL, it will start to crash again, until I swipe over to the actual desktop. After that, it works as expected again.

    ]]>

  19. Anonymous says:

    < ![CDATA[

    Cheers Chris I use it a lot probably more than my actual browser, even though I didn’t make it to replace that. I can reproduce that crash but i got no idea how to fix it or whats causing it.

    ]]>

  20. Anonymous says:

    < ![CDATA[

    Jay M, Pierre Hébert​ fixed this, so maybe in the next update? 🙂

    ]]>

  21. Anonymous says:

    < ![CDATA[

    Yes it will be.

    ]]>

Leave a Reply

Your email address will not be published. Required fields are marked *