Example usage for android.service.quicksettings Tile setLabel

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

Introduction

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

Prototype

public void setLabel(CharSequence label) 

Source Link

Document

Sets the current label for the tile.

Usage

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

@TargetApi(Build.VERSION_CODES.N)
public void updateTile(Tile tile, int id) {
    VolumeControl item = model.parseItem(model.getItemById(id));
    if (item != null && tile != null) {
        tile.setIcon(Icon.createWithResource(context, model.getIconDrawable(item.icon)));
        tile.setLabel(item.label);
        tile.setState(Tile.STATE_ACTIVE);
        tile.updateTile();/*from w  ww  .j av  a 2 s .co  m*/
    }
}