Skip to content

Latest commit

 

History

History
36 lines (25 loc) · 1.1 KB

README.md

File metadata and controls

36 lines (25 loc) · 1.1 KB

Quick Settings Tiles Demo

Demo quick settings tiles in android 7+

alt text

#Usage

comment and uncomment code in onClick function in MyTileService.class

 @Override
    public void onClick() {
        super.onClick();
        Log.i("TileService", "onClick");

        //Start main activity but Quick Settings Panel still open
        startActivity(new Intent(this, MainActivity.class));

        //Start main activity and close Quick Settings Panel
        startActivityAndCollapse(new Intent(this, MainActivity.class));

        //update tile
        updateTileForOnOrOff();

        //update tile by Animation
        updateTileByAnimation();

        //show dialog
        generateDialogAndShow();

        //checking lock and if user enter password, run runnableForUnlock
        unlockAndRun(runnableForUnlock);
    }