--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_pressed="true"
+ android:drawable="@drawable/settings_gear_background_pressed" />
+ <item android:drawable="@drawable/settings_gear_background_normal" />
+</selector>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<shape
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:shape="oval">
+
+ <solid
+ android:color="@color/mode_list_settings_icon_background"/>
+
+ <size
+ android:width="@dimen/mode_list_settings_icon_size"
+ android:height="@dimen/mode_list_settings_icon_size"/>
+</shape>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<shape
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:shape="oval">
+
+ <solid
+ android:color="@color/mode_list_settings_icon_pressed_background"/>
+
+ <size
+ android:width="@dimen/mode_list_settings_icon_size"
+ android:height="@dimen/mode_list_settings_icon_size"/>
+</shape>
\ No newline at end of file
android:layout_height="@dimen/mode_list_settings_icon_size"
android:scaleType="center"
android:layout_gravity="top|left"
- android:background="@drawable/mode_icon_background"
+ android:background="@drawable/settings_gear_background"
android:src="@drawable/ic_settings_normal" />
</com.android.camera.ui.ModeListView>
\ No newline at end of file
<color name="mode_selector_text_highlight_color">#ffffffff</color>
<color name="mode_selector_icon_background">#4c000000</color>
<color name="mode_list_background">#00000000</color>
+ <color name="mode_list_settings_icon_background">#26000000</color>
+ <color name="mode_list_settings_icon_pressed_background">#99000000</color>
<color name="camera_mode_color">#76a7fa</color>
<color name="video_mode_color">#e57368</color>
mSettingsButton.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
- mModeSwitchListener.onSettingsSelected();
+ // Post this callback to make sure current user interaction has
+ // been reflected in the UI. Specifically, the pressed state gets
+ // unset after click happens. In order to ensure the pressed state
+ // gets unset in UI before getting in the low frame rate settings
+ // activity launch stage, the settings selected callback is posted.
+ post(new Runnable() {
+ @Override
+ public void run() {
+ mModeSwitchListener.onSettingsSelected();
+ }
+ });
}
});
}