Example usage for android.service.quicksettings Tile STATE_INACTIVE

List of usage examples for android.service.quicksettings Tile STATE_INACTIVE

Introduction

In this page you can find the example usage for android.service.quicksettings Tile STATE_INACTIVE.

Prototype

int STATE_INACTIVE

To view the source code for android.service.quicksettings Tile STATE_INACTIVE.

Click Source Link

Document

This represents a tile that is currently in a disabled state but is still interactable.

Usage

From source file:net.hyx.app.volumenotification.NotificationFactory.java

@TargetApi(Build.VERSION_CODES.N)
void updateTile(Tile tile, int position) {
    //tile.setIcon(Icon.createWithResource(context, settings.getDrawable(context, R.array.pref_buttons_icons_entries, settings.getButtonIcon(position))));
    //tile.setLabel(settings.getButtonLabel(position));
    if (settings.getButtonChecked(position)) {
        tile.setState(Tile.STATE_ACTIVE);
    } else {//from  w  w w .j av a2  s  . c om
        tile.setState(Tile.STATE_INACTIVE);
    }
    tile.updateTile();
}