diff options
Diffstat (limited to 'res/layout')
-rw-r--r-- | res/layout/basic_setting_popup.xml | 25 | ||||
-rw-r--r-- | res/layout/in_line_setting_knob.xml | 34 | ||||
-rw-r--r-- | res/layout/in_line_setting_picker.xml | 74 | ||||
-rw-r--r-- | res/layout/in_line_setting_restore.xml | 23 | ||||
-rw-r--r-- | res/layout/in_line_setting_switch.xml | 32 | ||||
-rw-r--r-- | res/layout/other_setting_popup.xml | 20 | ||||
-rw-r--r-- | res/layout/setting_item.xml | 13 |
7 files changed, 104 insertions, 117 deletions
diff --git a/res/layout/basic_setting_popup.xml b/res/layout/basic_setting_popup.xml index 9f579de..c51ff31 100644 --- a/res/layout/basic_setting_popup.xml +++ b/res/layout/basic_setting_popup.xml @@ -17,37 +17,26 @@ */ --> <com.android.camera.ui.BasicSettingPopup xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:camera="http://schemas.android.com/apk/res/com.android.camera" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_centerVertical="true" - android:layout_toLeftOf="@+id/indicator_control" - android:visibility="gone"> + style="@style/SettingPopupWindow"> <LinearLayout android:orientation="vertical" android:layout_height="wrap_content" - android:layout_width="240dp"> + android:layout_width="@dimen/setting_popup_window_width"> <FrameLayout android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="@drawable/dialog_top_holo_dark"> + android:background="@drawable/dialog_top_holo_dark" + android:minHeight="@dimen/popup_title_frame_min_height"> <TextView android:id="@+id/title" - style="@style/SettingTitleText" - android:textSize="18dp" - android:layout_height="32dp" /> + style="@style/PopupTitleText" /> </FrameLayout> + <FrameLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@drawable/dialog_bottom_holo_dark"> <ListView android:id="@+id/settingList" - android:orientation="vertical" - android:layout_marginLeft="6dp" - android:layout_marginRight="6dp" - android:paddingBottom="3dp" - android:layout_gravity="center" - android:layout_width="match_parent" - android:layout_height="wrap_content" + style="@style/SettingItemList" android:choiceMode="singleChoice" /> </FrameLayout> </LinearLayout> diff --git a/res/layout/in_line_setting_knob.xml b/res/layout/in_line_setting_knob.xml new file mode 100644 index 0000000..b3bfc48 --- /dev/null +++ b/res/layout/in_line_setting_knob.xml @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2011 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. +--> + +<com.android.camera.ui.InLineSettingKnob xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/setting_item" + style="@style/SettingRow"> + <TextView android:id="@+id/title" + style="@style/SettingItemTitle" /> + + <Button android:id="@+id/decrement" + style="@style/SettingKnob" + android:text="@string/setting_decrement" /> + + <TextView android:id="@+id/current_setting" + style="@style/SettingItemText" /> + + <Button android:id="@+id/increment" + style="@style/SettingKnob" + android:text="@string/setting_increment" /> +</com.android.camera.ui.InLineSettingKnob> + diff --git a/res/layout/in_line_setting_picker.xml b/res/layout/in_line_setting_picker.xml deleted file mode 100644 index 239dd07..0000000 --- a/res/layout/in_line_setting_picker.xml +++ /dev/null @@ -1,74 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- -** -** Copyright 2011, 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. -*/ ---> - -<com.android.camera.ui.InLineSettingPicker xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="wrap_content" - android:layout_height="wrap_content"> - <LinearLayout android:id="@+id/setting_item" - android:orientation="horizontal" - style="@style/SettingRow" - android:layout_height="42dp" - android:paddingRight="0dp"> - <TextView android:id="@+id/title" - style="@style/SettingPickerText" - android:textSize="16dp" - android:layout_weight="1" - android:layout_width="match_parent" - android:layout_height="match_parent" /> - - <Button android:id="@+id/decrement" - android:layout_width="36dp" - android:layout_height="match_parent" - android:layout_gravity="center_vertical" - android:gravity="center" - android:text="@string/setting_decrement" - android:textColor="@drawable/btn_setting_picker" - android:textSize="20dp" - android:textStyle="bold" - android:background="@android:color/transparent" /> - - <TextView android:id="@+id/current_setting" - android:layout_width="81dp" - android:layout_height="wrap_content" - android:layout_gravity="center_vertical" - android:gravity="center" - android:singleLine="true" - android:textColor="@android:color/white" - android:textSize="16dp" /> - - <Button android:id="@+id/increment" - android:layout_width="36dp" - android:layout_height="match_parent" - android:layout_gravity="center_vertical" - android:gravity="center" - android:text="@string/setting_increment" - android:textColor="@drawable/btn_setting_picker" - android:textSize="20dp" - android:textStyle="bold" - android:background="@android:color/transparent" /> - </LinearLayout> - <!-- To have the same View(InLineSettingPicker) as the listview's components and also show the restore setting line, we have the relativelayout and control the visibilities of the restore and the setting_item component to achieve the goal. --> - <TextView android:id="@+id/restore" - android:gravity="center" - android:textSize="16dp" - style="@style/SettingRow" - android:textColor="@android:color/white" - android:layout_height="42dp"> - </TextView> -</com.android.camera.ui.InLineSettingPicker> diff --git a/res/layout/in_line_setting_restore.xml b/res/layout/in_line_setting_restore.xml new file mode 100644 index 0000000..37ebb15 --- /dev/null +++ b/res/layout/in_line_setting_restore.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2011 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. +--> + +<com.android.camera.ui.InLineSettingRestore xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/setting_item" + style="@style/SettingRow"> + <TextView android:id="@+id/title" + style="@style/SettingItemText" + android:layout_width="match_parent" /> +</com.android.camera.ui.InLineSettingRestore> diff --git a/res/layout/in_line_setting_switch.xml b/res/layout/in_line_setting_switch.xml new file mode 100644 index 0000000..c884ece --- /dev/null +++ b/res/layout/in_line_setting_switch.xml @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2011 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. +--> + +<com.android.camera.ui.InLineSettingSwitch xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/setting_item" + style="@style/SettingRow"> + <TextView android:id="@+id/title" + style="@style/SettingItemTitle" /> + + <!-- The Switch widget always aligns to the right, so we have to wrap it in a frame layout. --> + <FrameLayout android:layout_weight="1" + android:layout_width="fill_parent" + android:layout_height="match_parent"> + <Switch android:id="@+id/setting_switch" + android:layout_gravity="center" + android:layout_width="wrap_content" + android:layout_height="match_parent" /> + </FrameLayout> +</com.android.camera.ui.InLineSettingSwitch> diff --git a/res/layout/other_setting_popup.xml b/res/layout/other_setting_popup.xml index 263c938..730e00a 100644 --- a/res/layout/other_setting_popup.xml +++ b/res/layout/other_setting_popup.xml @@ -19,14 +19,10 @@ <com.android.camera.ui.OtherSettingsPopup xmlns:android="http://schemas.android.com/apk/res/android" xmlns:camera="http://schemas.android.com/apk/res/com.android.camera" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_centerVertical="true" - android:layout_toLeftOf="@+id/indicator_control" - android:visibility="gone"> + style="@style/SettingPopupWindow"> <LinearLayout android:orientation="vertical" - android:layout_width="320dp" + android:layout_width="@dimen/other_setting_popup_window_width" android:layout_height="wrap_content"> <FrameLayout @@ -35,9 +31,7 @@ android:background="@drawable/dialog_top_holo_dark"> <TextView android:id="@+id/title" android:text="@string/pref_camera_settings_category" - style="@style/SettingTitleText" - android:textSize="18dp" - android:layout_height="32dp"/> + style="@style/PopupTitleText" /> </FrameLayout> <FrameLayout @@ -45,13 +39,7 @@ android:layout_height="wrap_content" android:background="@drawable/dialog_bottom_holo_dark"> <ListView android:id="@+id/settingList" - android:orientation="vertical" - android:layout_marginLeft="6dp" - android:layout_marginRight="6dp" - android:paddingBottom="3dp" - android:layout_gravity="center" - android:layout_width="match_parent" - android:layout_height="wrap_content" /> + style="@style/SettingItemList" /> </FrameLayout> </LinearLayout> </com.android.camera.ui.OtherSettingsPopup> diff --git a/res/layout/setting_item.xml b/res/layout/setting_item.xml index 43d8595..5bcf3f7 100644 --- a/res/layout/setting_item.xml +++ b/res/layout/setting_item.xml @@ -17,18 +17,13 @@ */ --> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - style="@style/SettingRow" - android:layout_height="42dp"> + style="@style/SettingRow"> <TextView android:id="@+id/text" - style="@style/SettingPickerText" - android:textSize="18dp" - android:layout_width="150dp" - android:paddingRight="10dp" - android:layout_height="match_parent"/> + style="@style/SettingItemTitle" /> <ImageView android:id="@+id/image" - android:layout_width="20dp" - android:layout_height="20dp" + android:layout_width="@dimen/setting_item_icon_width" + android:layout_height="@dimen/setting_item_icon_width" android:scaleType="fitCenter" android:adjustViewBounds="true" /> </LinearLayout> |