元々標準設定アプリと挙動に差異がある事は分かっていたんだけど、改めてICSをいじっていたら、想像以上に差異があったので仕様から見直してみた。
そしたら、これまた想像以上にハマってしまったのでまとめてみる。
(2012/6/20追記)
Android4.0.4を含めた記事を書きました。
検証の結果はコチラを参照してください。
はじめに
記載内容は各種音量設定(着信音、通知音、メディア、アラーム)、バイブ設定、マナーモード設定についてのみ。着信音の種類やシステム音量については記載していない。
あくまで標準設定アプリと同等の機能を作成することを目的とするため、裏技的な使い方は記載していない。ハマったポイント
先にハマったポイントを記載しておく。
- ICSの標準設定アプリには「通知音にも着信音量を適用」の設定がない。APIでOFFにしてもONの時と同じ挙動をする。
- ICSではマナーをOFFにすると音量がかならず1以上となる。マナーOFFかつ音量0には設定できない。GBではマナーOFFかつ音量0も可能。
- FY以降のバイブ設定は、1つのメソッドで取得できると思いきや、2つのメソッドの返り値の組み合わせによって決まる。
- とにかく、vibrateSettingとvibrateInSilentとringerModeの組み合わせが重要。これらの組み合わせで音を鳴らすか、バイブするかが決まる。
- 上記3つの組み合わせはAPIを用いて矛盾パターンを作る事も可能。例えばringerMode=RINGER_MODE_SILENT、vibrateSetting=VIBRATE_SETTING_ONなど。ICSの標準設定アプリでパターン検証を行った所、設定アプリのみでは矛盾パターンを作れないが、サイドキーも使う事で一部の矛盾パターンを作る事が可能。
メソッドの一覧
記載しているものはほとんどがAudioManagerのメソッド。
説明欄にAndroidバージョンの差異も記載しているところがあるけど、ちゃんと検証していなかったりする所もあるので、あまり信用しすぎないように。
なお、HCでは検証を行っていない。
種類
|
メソッド
|
返り値
|
引数
|
説明
|
| 音量 | getStreamMaxVolume(int streamType) | int streamType | streamType: STREAM_RING / STREAM_NOTIFICATION / STREAM_MUSIC / STREAM_ALARM | 各種最大音量の取得メソッド。 Androidではデバイスにより最大値が異なるので、アプリで音量を設定する場合は先に最大値を取得しておく必要がある。 |
| 音量 | getStramVolume(int streamType) | int | 省略 | 各種音量の取得メソッド。 マナーモードがONの場合、着信音量と通知音量は0になる。 |
| 音量 | setStreamVolume(int streamType, int index, int flags) | - | streamType: 省略 index: 設定する音量 flags: 実行後にダイアログを表示させたりできる | 各種音量の設定メソッド。 |
| 音量 | Settings.system.getInt(getContentResolver(), "notifications_use_ring_volume") | int | - | 「通知音にも着信音量を設定」の取得メソッド。 返り値はint型だが、1(true) / 0 (false)となる。 ONの場合はsetStreamVolume()で着信音量を設定すると同じ値が通知音量に反映され、同様に通知音量を設定すると着信音に反映される。 ICSの標準設定アプリにこのチェックボックスはなく、APIで強制的にOFFにしてもONと同じ動きをする。 また、一部機種の標準設定アプリでもこのチェックボックスはない。(Galaxy S2ではなかった。デフォルトOFFだがAPIでONにすればONとしての動きをする) |
| バイブ | getVibrateSetting(int vibrateType) | int vibrateSetting | vibrateType: VIBRATE_TYPE_RINGER / VIBRATE_TYPE_NOTIFICATION | バイブ設定の取得メソッド。 返り値にVIBRATE_SETTING_NOT_ONLY_SILENTは存在しない。 「常に使用」「マナーモードがOFFのときのみ」のどちらの場合も返り値はVIBRATE_SETTING_ONとなる。この2つは後述する"vibrate_int_silent"の返り値と組み合わせて判別する。 |
| バイブ | setVibrateSetting(int vibrateType, int vibrateSetting) - | - | vibrateType: 省略 vibrateSetting: VIBRATE_SETTING_OFF / VIBRATE_SETTING_ON / VIBRATE_SETTING_ONLY_SILENT | バイブ設定の設定メソッド。 標準設定アプリのバイブ設定はEclairではチェックボックス、FY以降では4項目のスピナーになる。 Eclairの標準設定アプリではVIBTATE_SETTING_ONとVIBRATE_SETTTNG_OFFしか設定できない。 EclairでもAPIとしてはVIBRATE_SETTING_ONLY_SILENTも使えるはずだが、設定した際にどのような挙動になるかは未確認。 |
| バイブ | Settings.system.getInt(getContentResolver(), "vibrate_in_silent") | int | - | マナーモード時にバイブするかどうかの設定の取得メソッド。 返り値はint型だが、1(true) / 0(false)となる。 バイブ設定が「常に使用」「マナーモードがONの時のみ」の場合は返り値が1、「なし」「マナーモードがOFFの時のみ」の場合は返り値が0となる。 Eclairでは標準設定アプリでこの設定を変更できず、どのような設定にしても0となる。 |
| バイブ | Settings.system.getInt(getContentResolver(), "vibrate_int_silent", int value) | - | value: 1(true) / 0(false) | マナーモード時にバイブするかどうかの設定メソッド。 |
| マナー | getRingerMode() | int ringerMode | - | マナーモード設定の取得メソッド。 標準設定アプリではチェックボックスでの設定になるため返り値はboolean型と思いきや、int型となる。 |
| マナー | setRingerMode(int ringerMode) | - | ringerMode: RINGER_MODE_SILENT / RINGER_MODE_VIBRATE / RINGER_MODE_NORMAL | マナーモード設定の設定メソッド。 RINGER_MODE_SILENT、RINGER_MODE_VIBRATEに設定すると着信音量、通知音量が0に設定され、前者はバイブなし、後者はバイブありとなる。 GBまではRINGER_MODE_NORMALかつ 音量0の設定が可能だが、ICSでは不可。ICSでRINGER_MODE_NORMALを設定すると音量が1以上になる。 |
サンプルコード
検証に利用したサンプルコードを載せておく。
設定が変わった箇所は色が変更するようにしているので、ちょっと長い。
最後のAndroidManifestを忘れずに。
操作方法は動かしてみれば分かると思うけど、簡単に説明。
アプリを起動すると、 全ての設定を取得し画面に表示する。
[Set]ボタンをタップすると、設定メソッドが実行され、各種設定の設定変更を行う。画面の再描画は行わない。
[View]ボタンをタップすると、全ての設定を再取得して表示する。設定が変わった箇所は
赤字で変更される。
一覧にないメソッドも使っているけど、あくまで設定取得しかしておらず設定変更はできない。
public class Main extends Activity
private static SeekBar sb_ring;
private static Button b_ring_set;
private static TextView tv_ring_old;
private static TextView tv_ring_new;
private static CheckBox cb_use_ring_volume;
private static Button b_use_ring_volume_set;
private static TextView tv_use_ring_volume_old;
private static TextView tv_use_ring_volume_new;
private static SeekBar sb_notification;
private static Button b_notification_set;
private static TextView tv_notification_old;
private static TextView tv_notification_new;
private static SeekBar sb_media;
private static Button b_media_set;
private static TextView tv_media_old;
private static TextView tv_media_new;
private static SeekBar sb_alarm;
private static Button b_alarm_set;
private static TextView tv_alarm_old;
private static TextView tv_alarm_new;
private static Spinner sp_vibe;
private static Button b_vibe_set;
private static TextView tv_vibe_old;
private static TextView tv_vibe_new;
private static CheckBox cb_vibe_in_silent;
private static Button b_vibe_in_silent_set;
private static TextView tv_vibe_in_silent_old;
private static TextView tv_vibe_in_silent_new;
private static Spinner sp_silent_mode;
private static Button b_silent_mode_set;
private static TextView tv_silent_mode_old;
private static TextView tv_silent_mode_new;
private static TextView tv_mode_old;
private static TextView tv_mode_new;
private static TextView tv_vibe_notification_old;
private static TextView tv_vibe_notification_new;
private static TextView tv_should_vibe_ringer_old;
private static TextView tv_should_vibe_ringer_new;
private static TextView tv_should_vibe_notification_old;
private static TextView tv_should_vibe_notification_new;
private static Button b_view;
private static Button b_close;
private static final String VIBRATE_IN_SILENT = "vibrate_in_silent";
private static final String NOTIFICATIONS_USE_RING_VOLUME = "notifications_use_ring_volume";
private static AudioManager am;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
am = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
setContentView(R.layout.main);
setLayout();
setValue();
}
private void setLayout() {
//着信音
sb_ring = (SeekBar) findViewById(R.id.sb_ring);
b_ring_set = (Button) findViewById(R.id.b_ring_set);
tv_ring_old = (TextView) findViewById(R.id.tv_ring_old);
tv_ring_new = (TextView) findViewById(R.id.tv_ring_new);
b_ring_set.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
am.setStreamVolume(AudioManager.STREAM_RING, sb_ring.getProgress(), 0);
}
});
//USE_RING_VOLUME
cb_use_ring_volume = (CheckBox) findViewById(R.id.cb_use_ring_volume);
b_use_ring_volume_set = (Button) findViewById(R.id.b_use_ring_volume_set);
tv_use_ring_volume_old = (TextView) findViewById(R.id.tv_use_ring_volume_old);
tv_use_ring_volume_new = (TextView) findViewById(R.id.tv_use_ring_volume_new);
b_use_ring_volume_set.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
if (cb_use_ring_volume.isChecked()) {
Settings.System.putInt(getContentResolver(), NOTIFICATIONS_USE_RING_VOLUME, 1);
} else {
Settings.System.putInt(getContentResolver(), NOTIFICATIONS_USE_RING_VOLUME, 0);
}
}
});
//通知音
sb_notification = (SeekBar) findViewById(R.id.sb_notification);
b_notification_set = (Button) findViewById(R.id.b_notification_set);
tv_notification_old = (TextView) findViewById(R.id.tv_notification_old);
tv_notification_new = (TextView) findViewById(R.id.tv_notification_new);
b_notification_set.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
am.setStreamVolume(AudioManager.STREAM_NOTIFICATION, sb_notification.getProgress(), 0);
}
});
//メディア
sb_media = (SeekBar) findViewById(R.id.sb_media);
b_media_set = (Button) findViewById(R.id.b_media_set);
tv_media_old = (TextView) findViewById(R.id.tv_media_old);
tv_media_new = (TextView) findViewById(R.id.tv_media_new);
b_media_set.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
am.setStreamVolume(AudioManager.STREAM_MUSIC, sb_media.getProgress(), 0);
}
});
//アラーム
sb_alarm = (SeekBar) findViewById(R.id.sb_alarm);
b_alarm_set = (Button) findViewById(R.id.b_alarm_set);
tv_alarm_old = (TextView) findViewById(R.id.tv_alarm_old);
tv_alarm_new = (TextView) findViewById(R.id.tv_alarm_new);
b_alarm_set.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
am.setStreamVolume(AudioManager.STREAM_ALARM, sb_alarm.getProgress(), 0);
}
});
//バイブ
sp_vibe = (Spinner) findViewById(R.id.sp_vibe);
b_vibe_set = (Button) findViewById(R.id.b_vibe_set);
tv_vibe_old = (TextView) findViewById(R.id.tv_vibe_old);
tv_vibe_new = (TextView) findViewById(R.id.tv_vibe_new);
ArrayAdapter<string> vibeAdapter = new ArrayAdapter<string>(this, android.R.layout.simple_spinner_item);
vibeAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
vibeAdapter.add("VIBRATE_SETTING_OFF");
vibeAdapter.add("VIBRATE_SETTING_ON");
vibeAdapter.add("VIBRATE_SETTING_ONLY_SILENT");
sp_vibe.setAdapter(vibeAdapter);
b_vibe_set.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
am.setVibrateSetting(AudioManager.VIBRATE_TYPE_RINGER, sp_vibe.getSelectedItemPosition());
}
});
//VIBRATE_IN_SILENT
cb_vibe_in_silent = (CheckBox) findViewById(R.id.cb_vibe_in_silent);
b_vibe_in_silent_set = (Button) findViewById(R.id.b_vibe_in_silent_set);
tv_vibe_in_silent_old = (TextView) findViewById(R.id.tv_vibe_in_silent_old);
tv_vibe_in_silent_new = (TextView) findViewById(R.id.tv_vibe_in_silent_new);
b_vibe_in_silent_set.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
if (cb_vibe_in_silent.isChecked()) {
Settings.System.putInt(getContentResolver(), VIBRATE_IN_SILENT, 1);
} else {
Settings.System.putInt(getContentResolver(), VIBRATE_IN_SILENT, 0);
}
}
});
//マナーモード
sp_silent_mode = (Spinner) findViewById(R.id.sp_silent_mode);
b_silent_mode_set = (Button) findViewById(R.id.b_silent_mode_set);
tv_silent_mode_old = (TextView) findViewById(R.id.tv_silent_mode_old);
tv_silent_mode_new = (TextView) findViewById(R.id.tv_silent_mode_new);
ArrayAdapter<string> silentModeAdapter = new ArrayAdapter<string>(this, android.R.layout.simple_spinner_item);
silentModeAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
silentModeAdapter.add("SILENT_MODE");
silentModeAdapter.add("VIBRATE_MODE");
silentModeAdapter.add("NORMAL_MODE");
sp_silent_mode.setAdapter(silentModeAdapter);
b_silent_mode_set.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
setRingerMode(sp_silent_mode.getSelectedItemPosition());
}
});
//モード
tv_mode_old = (TextView) findViewById(R.id.tv_mode_old);
tv_mode_new = (TextView) findViewById(R.id.tv_mode_new);
//バイブ(notification)
tv_vibe_notification_old = (TextView) findViewById(R.id.tv_vibe_notification_old);
tv_vibe_notification_new = (TextView) findViewById(R.id.tv_vibe_notification_new);
//SHOULD_VIBE(RINGER)
tv_should_vibe_ringer_old = (TextView) findViewById(R.id.tv_should_vibe_ringer_old);
tv_should_vibe_ringer_new = (TextView) findViewById(R.id.tv_should_vibe_ringer_new);
//SHOULD_VIBE(NOTIFICATION)
tv_should_vibe_notification_old = (TextView) findViewById(R.id.tv_should_vibe_notification_old);
tv_should_vibe_notification_new = (TextView) findViewById(R.id.tv_should_vibe_notification_new);
//View
b_view = (Button) findViewById(R.id.b_view);
b_view.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
setValue();
}
});
//Close
b_close = (Button) findViewById(R.id.b_close);
b_close.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
finish();
}
});
}
private void setValue() {
//AudioManagerで色々取得
int maxRing = am.getStreamMaxVolume(AudioManager.STREAM_RING);
boolean useRingVolume = Settings.System.getInt(getContentResolver(), NOTIFICATIONS_USE_RING_VOLUME, 1) == 1;
int ring = am.getStreamVolume(AudioManager.STREAM_RING);
int maxNotification = am.getStreamMaxVolume(AudioManager.STREAM_NOTIFICATION);
int notification = am.getStreamVolume(AudioManager.STREAM_NOTIFICATION);
int maxMedia = am.getStreamMaxVolume(AudioManager.STREAM_MUSIC);
int media = am.getStreamVolume(AudioManager.STREAM_MUSIC);
int alarm = am.getStreamVolume(AudioManager.STREAM_ALARM);
int maxAlarm = am.getStreamMaxVolume(AudioManager.STREAM_ALARM);
int vibe = am.getVibrateSetting(AudioManager.VIBRATE_TYPE_RINGER);
boolean vibeInSilent = Settings.System.getInt(getContentResolver(), VIBRATE_IN_SILENT, 1) == 1;
int silentMode = am.getRingerMode();
int mode = am.getMode();
int vibeNotification = am.getVibrateSetting(AudioManager.VIBRATE_TYPE_NOTIFICATION);
boolean shouldVibeRing = am.shouldVibrate(AudioManager.VIBRATE_TYPE_RINGER);
boolean shouldVibeNotification = am.shouldVibrate(AudioManager.VIBRATE_TYPE_NOTIFICATION);
//着信音
sb_ring.setMax(maxRing);
sb_ring.setProgress(ring);
tv_ring_old.setText(tv_ring_new.getText());
tv_ring_new.setText(ring + " / " + maxRing);
if (tv_ring_old.getText().equals(tv_ring_new.getText())) {
tv_ring_new.setTextColor(Color.WHITE);
} else {
tv_ring_new.setTextColor(Color.RED);
}
//USE_RING_VOLUME
cb_use_ring_volume.setChecked(useRingVolume);
tv_use_ring_volume_old.setText(tv_use_ring_volume_new.getText());
tv_use_ring_volume_new.setText(String.valueOf(useRingVolume));
if (tv_use_ring_volume_old.getText().equals(tv_use_ring_volume_new.getText())) {
tv_use_ring_volume_new.setTextColor(Color.WHITE);
} else {
tv_use_ring_volume_new.setTextColor(Color.RED);
}
//通知音
sb_notification.setMax(maxNotification);
sb_notification.setProgress(notification);
tv_notification_old.setText(tv_notification_new.getText());
tv_notification_new.setText(notification + " / " + maxNotification);
if (tv_notification_old.getText().equals(tv_notification_new.getText())) {
tv_notification_new.setTextColor(Color.WHITE);
} else {
tv_notification_new.setTextColor(Color.RED);
}
//メディア
sb_media.setMax(maxMedia);
sb_media.setProgress(media);
tv_media_old.setText(tv_media_new.getText());
tv_media_new.setText(media + " / " + maxMedia);
if (tv_media_old.getText().equals(tv_media_new.getText())) {
tv_media_new.setTextColor(Color.WHITE);
} else {
tv_media_new.setTextColor(Color.RED);
}
//アラーム
sb_alarm.setMax(maxAlarm);
sb_alarm.setProgress(alarm);
tv_alarm_old.setText(tv_alarm_new.getText());
tv_alarm_new.setText(alarm + " / " + maxAlarm);
if (tv_alarm_old.getText().equals(tv_alarm_new.getText())) {
tv_alarm_new.setTextColor(Color.WHITE);
} else {
tv_alarm_new.setTextColor(Color.RED);
}
//バイブ
sp_vibe.setSelection(vibe);
tv_vibe_old.setText(tv_vibe_new.getText());
tv_vibe_new.setText(String.valueOf(vibe));
if (tv_vibe_old.getText().equals(tv_vibe_new.getText())) {
tv_vibe_new.setTextColor(Color.WHITE);
} else {
tv_vibe_new.setTextColor(Color.RED);
}
//VIBRATE_IN_SILENT
cb_vibe_in_silent.setChecked(vibeInSilent);
tv_vibe_in_silent_old.setText(tv_vibe_in_silent_new.getText());
tv_vibe_in_silent_new.setText(String.valueOf(vibeInSilent));
if (tv_vibe_in_silent_old.getText().equals(tv_vibe_in_silent_new.getText())) {
tv_vibe_in_silent_new.setTextColor(Color.WHITE);
} else {
tv_vibe_in_silent_new.setTextColor(Color.RED);
}
//マナーモード
sp_silent_mode.setSelection(silentMode);
tv_silent_mode_old.setText(tv_silent_mode_new.getText());
tv_silent_mode_new.setText(String.valueOf(silentMode));
if (tv_silent_mode_old.getText().equals(tv_silent_mode_new.getText())) {
tv_silent_mode_new.setTextColor(Color.WHITE);
} else {
tv_silent_mode_new.setTextColor(Color.RED);
}
//モード
tv_mode_old.setText(tv_mode_new.getText());
tv_mode_new.setText(String.valueOf(mode));
if (tv_mode_old.getText().equals(tv_mode_new.getText())) {
tv_mode_new.setTextColor(Color.WHITE);
} else {
tv_mode_new.setTextColor(Color.RED);
}
//バイブ (notification)
tv_vibe_notification_old.setText(tv_vibe_notification_new.getText());
tv_vibe_notification_new.setText(String.valueOf(vibeNotification));
if (tv_vibe_notification_old.getText().equals(tv_vibe_notification_new.getText())) {
tv_vibe_notification_new.setTextColor(Color.WHITE);
} else {
tv_vibe_notification_new.setTextColor(Color.RED);
}
//SHOULD_VIBE (RINGER)
tv_should_vibe_ringer_old.setText(tv_should_vibe_ringer_new.getText());
tv_should_vibe_ringer_new.setText(String.valueOf(shouldVibeRing));
if (tv_should_vibe_ringer_old.getText().equals(tv_should_vibe_ringer_new.getText())) {
tv_should_vibe_ringer_new.setTextColor(Color.WHITE);
} else {
tv_should_vibe_ringer_new.setTextColor(Color.RED);
}
//SHOULD_VIBE (NOTIFICATION)
tv_should_vibe_notification_old.setText(tv_should_vibe_notification_new.getText());
tv_should_vibe_notification_new.setText(String.valueOf(shouldVibeNotification));
if(tv_should_vibe_notification_old.getText().equals(tv_should_vibe_notification_new.getText())) {
tv_should_vibe_notification_new.setTextColor(Color.WHITE);
} else {
tv_should_vibe_notification_new.setTextColor(Color.RED);
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<ScrollView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="5dp"
android:orientation="vertical" >
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="5dp"
android:text="着信音" />
<SeekBar android:id="@+id/sb_ring"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="5dp"/>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="5dp" >
<Button android:id="@+id/b_ring_set"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Set" />
<TextView android:id="@+id/tv_ring_old"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<TextView android:id="@+id/tv_ring_new"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="5dp"
android:orientation="vertical" >
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="5dp"
android:text="NOTIFICATION_USE_RING_VOLUME" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="5dp" >
<CheckBox android:id="@+id/cb_use_ring_volume"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="通知音にも着信音量を適用" />
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="5dp" >
<Button android:id="@+id/b_use_ring_volume_set"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Set" />
<TextView android:id="@+id/tv_use_ring_volume_old"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<TextView android:id="@+id/tv_use_ring_volume_new"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="5dp"
android:orientation="vertical" >
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="5dp"
android:text="通知音" />
<SeekBar android:id="@+id/sb_notification"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="5dp"/>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="5dp" >
<Button android:id="@+id/b_notification_set"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Set" />
<TextView android:id="@+id/tv_notification_old"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<TextView android:id="@+id/tv_notification_new"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="5dp"
android:orientation="vertical" >
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="5dp"
android:text="メディア" />
<SeekBar android:id="@+id/sb_media"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="5dp"/>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="5dp" >
<Button android:id="@+id/b_media_set"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Set" />
<TextView android:id="@+id/tv_media_old"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<TextView android:id="@+id/tv_media_new"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="5dp"
android:orientation="vertical" >
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="5dp"
android:text="アラーム" />
<SeekBar android:id="@+id/sb_alarm"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="5dp"/>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="5dp" >
<Button android:id="@+id/b_alarm_set"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Set" />
<TextView android:id="@+id/tv_alarm_old"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<TextView android:id="@+id/tv_alarm_new"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="5dp"
android:orientation="vertical" >
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="5dp"
android:text="バイブ" />
<Spinner android:id="@+id/sp_vibe"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="5dp" >
<Button android:id="@+id/b_vibe_set"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Set" />
<TextView android:id="@+id/tv_vibe_old"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<TextView android:id="@+id/tv_vibe_new"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="5dp"
android:orientation="vertical" >
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="5dp"
android:text="VIBRATE_IN_SILENT" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="5dp" >
<CheckBox android:id="@+id/cb_vibe_in_silent"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="VIBRATE_IN_SILENT" />
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="5dp" >
<Button android:id="@+id/b_vibe_in_silent_set"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Set" />
<TextView android:id="@+id/tv_vibe_in_silent_old"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<TextView android:id="@+id/tv_vibe_in_silent_new"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="5dp"
android:orientation="vertical" >
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="5dp"
android:text="マナーモード" />
<Spinner android:id="@+id/sp_silent_mode"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="5dp" >
<Button android:id="@+id/b_silent_mode_set"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Set" />
<TextView android:id="@+id/tv_silent_mode_old"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<TextView android:id="@+id/tv_silent_mode_new"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="5dp"
android:orientation="vertical" >
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="5dp"
android:text="MODE" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="5dp" >
<Button
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Set"
android:enabled="false" />
<TextView android:id="@+id/tv_mode_old"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<TextView android:id="@+id/tv_mode_new"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="5dp"
android:orientation="vertical" >
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="5dp"
android:text="バイブ (NOTIFICATION)" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="5dp" >
<Button
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Set"
android:enabled="false" />
<TextView android:id="@+id/tv_vibe_notification_old"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<TextView android:id="@+id/tv_vibe_notification_new"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="5dp"
android:orientation="vertical" >
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="5dp"
android:text="SHOULD_VIBRATE (RINGER)" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="5dp" >
<Button
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Set"
android:enabled="false" />
<TextView android:id="@+id/tv_should_vibe_ringer_old"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<TextView android:id="@+id/tv_should_vibe_ringer_new"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="5dp"
android:orientation="vertical" >
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="5dp"
android:text="SHOULD_VIBRATE (NOTIFICATON)" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="5dp" >
<Button
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Set"
android:enabled="false" />
<TextView android:id="@+id/tv_should_vibe_notification_old"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<TextView android:id="@+id/tv_should_vibe_notification_new"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</ScrollView>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="5dp" >
<Button android:id="@+id/b_view"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="View" />
<Button android:id="@+id/b_close"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Close" />
</LinearLayout>
</LinearLayout>
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
0 件のコメント:
コメントを投稿