summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xres/drawable-hdpi/sim.pngbin0 -> 2145 bytes
-rwxr-xr-xres/drawable-mdpi/sim.pngbin0 -> 1360 bytes
-rwxr-xr-xres/drawable-xhdpi/sim.pngbin0 -> 3028 bytes
-rwxr-xr-xres/drawable-xxhdpi/sim.pngbin0 -> 4993 bytes
-rwxr-xr-xres/drawable-xxxhdpi/sim.pngbin0 -> 7178 bytes
-rw-r--r--res/layout-land/sim_missing_page.xml4
-rw-r--r--res/layout/sim_missing_page.xml6
-rw-r--r--res/values/config.xml4
-rw-r--r--src/com/cyanogenmod/setupwizard/setup/SimCardMissingPage.java22
9 files changed, 22 insertions, 14 deletions
diff --git a/res/drawable-hdpi/sim.png b/res/drawable-hdpi/sim.png
new file mode 100755
index 0000000..58dade6
--- /dev/null
+++ b/res/drawable-hdpi/sim.png
Binary files differ
diff --git a/res/drawable-mdpi/sim.png b/res/drawable-mdpi/sim.png
new file mode 100755
index 0000000..e771e05
--- /dev/null
+++ b/res/drawable-mdpi/sim.png
Binary files differ
diff --git a/res/drawable-xhdpi/sim.png b/res/drawable-xhdpi/sim.png
new file mode 100755
index 0000000..e81dad8
--- /dev/null
+++ b/res/drawable-xhdpi/sim.png
Binary files differ
diff --git a/res/drawable-xxhdpi/sim.png b/res/drawable-xxhdpi/sim.png
new file mode 100755
index 0000000..27b097a
--- /dev/null
+++ b/res/drawable-xxhdpi/sim.png
Binary files differ
diff --git a/res/drawable-xxxhdpi/sim.png b/res/drawable-xxxhdpi/sim.png
new file mode 100755
index 0000000..ff425d2
--- /dev/null
+++ b/res/drawable-xxxhdpi/sim.png
Binary files differ
diff --git a/res/layout-land/sim_missing_page.xml b/res/layout-land/sim_missing_page.xml
index 9ae9bb8..df30314 100644
--- a/res/layout-land/sim_missing_page.xml
+++ b/res/layout-land/sim_missing_page.xml
@@ -49,10 +49,8 @@
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="1"
- android:layout_gravity="right"
- android:gravity="right"
android:scaleType="fitEnd"
- android:src="@drawable/sim_back"/>
+ android:src="@drawable/sim"/>
</LinearLayout>
</FrameLayout>
diff --git a/res/layout/sim_missing_page.xml b/res/layout/sim_missing_page.xml
index 1fe72b9..8bd8607 100644
--- a/res/layout/sim_missing_page.xml
+++ b/res/layout/sim_missing_page.xml
@@ -45,13 +45,11 @@
<ImageView
android:id="@+id/sim_slot_image"
- android:layout_width="wrap_content"
+ android:layout_width="match_parent"
android:layout_height="0px"
android:layout_weight="1"
- android:layout_gravity="right"
- android:gravity="right"
android:scaleType="fitEnd"
- android:src="@drawable/sim_back"/>
+ android:src="@drawable/sim"/>
</LinearLayout>
</FrameLayout>
diff --git a/res/values/config.xml b/res/values/config.xml
index 366d8dd..dda669e 100644
--- a/res/values/config.xml
+++ b/res/values/config.xml
@@ -16,6 +16,8 @@
-->
<resources>
<integer name="local_picker_items">3</integer>
- <bool name="sim_back">false</bool>
<bool name="branded_device">false</bool>
+ <!-- The type of sim image to display.
+ 0=default sim image, 1=sim on side, 2=sim on back-->
+ <integer name="sim_image_type">0</integer>
</resources>
diff --git a/src/com/cyanogenmod/setupwizard/setup/SimCardMissingPage.java b/src/com/cyanogenmod/setupwizard/setup/SimCardMissingPage.java
index 38fbdcc..83d2833 100644
--- a/src/com/cyanogenmod/setupwizard/setup/SimCardMissingPage.java
+++ b/src/com/cyanogenmod/setupwizard/setup/SimCardMissingPage.java
@@ -29,6 +29,10 @@ public class SimCardMissingPage extends SetupPage {
public static final String TAG = "SimCardMissingPage";
+ private static final int SIM_DEFAULT = 0;
+ private static final int SIM_SIDE = 1;
+ private static final int SIM_BACK = 2;
+
public SimCardMissingPage(Context context, SetupDataCallbacks callbacks) {
super(context, callbacks);
}
@@ -66,13 +70,19 @@ public class SimCardMissingPage extends SetupPage {
@Override
protected void initializePage() {
- final boolean simOnBack = getResources().getBoolean(
- R.bool.sim_back);
+ final int simLocation = getResources().getInteger(
+ R.integer.sim_image_type);
ImageView simLogo = ((ImageView)mRootView.findViewById(R.id.sim_slot_image));
- if (simOnBack) {
- simLogo.setImageResource(R.drawable.sim_back);
- } else {
- simLogo.setImageResource(R.drawable.sim_side);
+ switch (simLocation) {
+ case SIM_SIDE:
+ simLogo.setImageResource(R.drawable.sim_side);
+ break;
+ case SIM_BACK:
+ simLogo.setImageResource(R.drawable.sim_back);
+ break;
+ default:
+ simLogo.setImageResource(R.drawable.sim);
+ simLogo.setScaleType(ImageView.ScaleType.CENTER_INSIDE);
}
}