QucikSettingsTileAPI

8928b5277aa7234dbca4ff782952343a?s=47 funnelbit
September 28, 2016

 QucikSettingsTileAPI

8928b5277aa7234dbca4ff782952343a?s=128

funnelbit

September 28, 2016
Tweet

Transcript

  1. 5.
  2. 6.

    5JMF w TFU*DPO *DPO TFU-BCFM $IBS4FRVFODF  TFU$POUFOU%FTDSJQUJPO JOU TFU4UBUF

    JOU  w VQEBUF5JMF  w 5JMFͷঢ়ଶΛ൓өͤ͞Δʢද͕ࣔมΘΔʣ
  3. 7.

    5JMF public class QuickSettingsService
 extends TileService {
 … Tile tile

    = this.getQsTile();
 … tile.setIcon(…); tile.setTitle(…); tile.updateTile(); }
  4. 9.

    5JMF4FSWJDF public class QSService extends TileService {
 @Override
 public void

    onTileAdded() {
 super.onTileAdded();
 }
 
 @Override
 public void onTileRemoved() {
 super.onTileRemoved();
 }
 
 @Override
 public void onClick() {
 super.onClick();
 }
 
 @Override
 public void onStartListening() {
 super.onStartListening();
 }
 
 @Override
 public void onStopListening() {
 super.onStopListening();
 }
 } w 4FSWJDFͷࢠΫϥε w ܧঝͯ͠࢖͏
  5. 10.

    5JMF4FSWJDF w PO5JMF"EEFE  w 5JMF͕௥Ճ͞ΕͨΒݺ͹ΕΔ w PO5JMF3FNPWFE  w

    5JMF͕࡟আ͞ΕͨΒݺ͹ΕΔ w PO$MJDL  w 5JMF͕ΫϦοΫͨ͠Βݺ͹ΕΔ
  6. 16.

    TUBSU"DUJWJUZ"OE$PMMBQTF w "DUJWJUZىಈ͠2VJDL4FUUJOHTΛͨͨΜͰ͘ΕΔ w ϩοΫதͩͱͨͨΊͳ͍ʢ"DUJWJUZىಈ͸͢Δʣ public class QSIntentService
 extends TileService

    … Intent intent = new Intent(getApplicationContext(),
 ResultActivity.class);
 startActivityAndCollapse(intent); …
 }
  7. 18.

    VOMPDL"OE3VO w ʮΞϯϩοΫͨ͠Βಈ͘ʯॲཧ͕͔͚Δ public class QSService extends TileService {
 …


    @Override
 public void onClick() {
 unlockAndRun(new Runnable() {
 @Override
 public void run() {
 Log.e("ಈ͘Α", "΄͓͓͓͓͓͓͓");
 }
 });
 }
 …
 }