diff options
| author | zdi <zdi@codeaurora.org> | 2016-03-07 17:53:57 +0800 |
|---|---|---|
| committer | zdi <zdi@codeaurora.org> | 2016-03-10 10:00:05 +0800 |
| commit | 7d9dd17cb390804052d23859dc4cfcc4bf293488 (patch) | |
| tree | aa92d6d11f5fcb8a47883eec8e3137ce1491980a /src | |
| parent | ee586846cc5e3916398dc25fe59ed9f2601a4790 (diff) | |
| download | android_packages_apps_Gallery2-7d9dd17cb390804052d23859dc4cfcc4bf293488.tar.gz android_packages_apps_Gallery2-7d9dd17cb390804052d23859dc4cfcc4bf293488.tar.bz2 android_packages_apps_Gallery2-7d9dd17cb390804052d23859dc4cfcc4bf293488.zip | |
Gallery2: Modify the UI of audio effect.
Modify the UI of audio effect according to UX specification document.
Change-Id: I03b337290f4d8dbf3600ee04c3796a5883c03046
CRs-Fixed: 986763
Diffstat (limited to 'src')
| -rw-r--r-- | src/com/android/gallery3d/app/MovieActivity.java | 8 | ||||
| -rw-r--r-- | src/com/android/gallery3d/ui/Knob.java | 3 |
2 files changed, 5 insertions, 6 deletions
diff --git a/src/com/android/gallery3d/app/MovieActivity.java b/src/com/android/gallery3d/app/MovieActivity.java index 87c224208..01d8d26b7 100644 --- a/src/com/android/gallery3d/app/MovieActivity.java +++ b/src/com/android/gallery3d/app/MovieActivity.java @@ -368,13 +368,13 @@ public class MovieActivity extends Activity { mSwitch = (ToggleButton) title.findViewById(R.id.audio_effects_switch); mSwitch.setChecked(enabled); - mSwitch.setBackgroundResource(enabled ? + mSwitch.setButtonDrawable(enabled ? R.drawable.switch_thumb_activated : R.drawable.switch_thumb_off); mSwitch.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { @Override public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { - mSwitch.setBackgroundResource(isChecked ? + mSwitch.setButtonDrawable(isChecked ? R.drawable.switch_thumb_activated : R.drawable.switch_thumb_off); if(mBassBoostEffect != null) { mBassBoostEffect.setEnabled(isChecked); @@ -424,7 +424,7 @@ public class MovieActivity extends Activity { }); mEffectDialog = new AlertDialog.Builder(MovieActivity.this, - AlertDialog.THEME_HOLO_DARK) + AlertDialog.THEME_DEVICE_DEFAULT_LIGHT) .setCustomTitle(title) .setView(content) .setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() { @@ -457,8 +457,6 @@ public class MovieActivity extends Activity { .setCancelable(false) .create(); mEffectDialog.show(); - mEffectDialog.findViewById(com.android.internal.R.id.titleDivider) - .setBackgroundResource(R.color.highlight); } } diff --git a/src/com/android/gallery3d/ui/Knob.java b/src/com/android/gallery3d/ui/Knob.java index 179023e02..b427c2f1e 100644 --- a/src/com/android/gallery3d/ui/Knob.java +++ b/src/com/android/gallery3d/ui/Knob.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, The Linux Foundation. All rights reserved. + * Copyright (c) 2013, 2016, The Linux Foundation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -114,6 +114,7 @@ public class Knob extends FrameLayout { mDisabledColor = res.getColor(R.color.disabled_knob); ((ImageView) findViewById(R.id.knob_foreground)).setImageResource(foreground); + ((ImageView) findViewById(R.id.knob_foreground)).setAlpha(0.35f); mLabelTV = (TextView) findViewById(R.id.knob_label); mLabelTV.setText(label); |
