Adding icons to sim color selection in settings UI.

Adding icons to sim color selection of sim settings UI.

Bug: 18380838
Change-Id: I98f07721aa234ff58a64a0c694206b085385bdec
This commit is contained in:
Sanket Padawe
2014-11-17 10:43:37 -08:00
parent 26104298eb
commit a8bd025d35
5 changed files with 154 additions and 26 deletions

View File

@@ -21,7 +21,6 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="@dimen/sim_dialog_padding"
android:orientation="vertical">
<LinearLayout android:id="@+id/type"
@@ -33,19 +32,20 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/sim_dialog_margin_top"
android:paddingStart="@dimen/sim_label_padding"
android:text="@string/sim_editor_name"
style="?android:attr/textAppearanceMedium" />
android:paddingStart="@dimen/sim_content_padding"
android:text="@string/sim_editor_name" />
<EditText android:id="@+id/sim_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:singleLine="true"
android:layout_marginStart="@dimen/sim_content_padding"
android:paddingStart="@dimen/sim_content_padding"
android:paddingBottom="@dimen/sim_dialog_margin_bottom"
android:hint="@string/wifi_ssid_hint"
android:inputType="textNoSuggestions"
android:maxLength="@integer/sim_name_length" />
android:maxLength="@integer/sim_name_length"
android:textColor="@android:color/black"
style="?android:attr/textAppearanceMedium" />
</LinearLayout>
@@ -58,16 +58,14 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/sim_dialog_margin_top"
android:paddingStart="@dimen/sim_label_padding"
android:text="@string/color_title"
style="?android:attr/textAppearanceMedium" />
android:paddingStart="@dimen/sim_content_padding"
android:text="@string/color_title" />
<Spinner
android:id="@+id/spinner"
android:layout_width="wrap_content"
android:layout_width="@dimen/color_picker_width"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/sim_dialog_margin_top"
android:paddingStart="@dimen/sim_label_padding" />
android:paddingStart="@dimen/sim_content_padding" />
</LinearLayout>
@@ -80,14 +78,14 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/sim_dialog_margin_top"
android:paddingStart="@dimen/sim_label_padding"
android:paddingStart="@dimen/sim_content_padding"
android:text="@string/sim_editor_carrier" />
<TextView android:id="@+id/carrier"
android:textColor="@android:color/black"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingStart="@dimen/sim_label_padding"
android:paddingStart="@dimen/sim_content_padding"
android:paddingBottom="@dimen/sim_dialog_margin_bottom"
android:singleLine="true"
style="?android:attr/textAppearanceMedium" />
@@ -103,14 +101,14 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/sim_dialog_margin_top"
android:paddingStart="@dimen/sim_label_padding"
android:paddingStart="@dimen/sim_content_padding"
android:text="@string/sim_editor_number" />
<TextView android:id="@+id/number"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="@dimen/sim_dialog_margin_bottom"
android:paddingStart="@dimen/sim_label_padding"
android:paddingStart="@dimen/sim_content_padding"
android:singleLine="true"
android:textColor="@android:color/black"
style="?android:attr/textAppearanceMedium" />

View File

@@ -19,8 +19,7 @@
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:attr/selectableItemBackground"
android:padding="4dp" >
android:background="?android:attr/selectableItemBackground" >
<ImageView android:id="@+id/icon"
android:layout_width="48dp"

View File

@@ -0,0 +1,47 @@
<?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.
-->
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:background="?android:attr/selectableItemBackground" >
<ImageView
android:id="@+id/color_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingRight="8dp"
android:paddingLeft="6dp"
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:layout_gravity="center_vertical" />
<TextView
android:id="@+id/color_text"
android:gravity="center_vertical"
android:layout_height="wrap_content"
android:layout_width="0dp"
android:layout_weight="1"
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:paddingRight="8dp"
android:paddingLeft="8dp"
android:textColor="@android:color/black"
style="?android:attr/textAppearanceMedium" />
</LinearLayout>