SetupWizard: Fixup layout and use sim graphic based on config
Change-Id: I73dd665a526c8a025e82a6f839d3dc9055742ed1
This commit is contained in:
parent
d13e105da2
commit
645354b463
63
res/layout-land/sim_missing_page.xml
Normal file
63
res/layout-land/sim_missing_page.xml
Normal file
@ -0,0 +1,63 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2015 The CyanogenMod 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"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<include layout="@layout/header" />
|
||||
|
||||
<FrameLayout android:id="@+id/page"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1">
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
style="@style/PageContent">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0px"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:id="@+id/sim_missing"
|
||||
style="@style/PageSummaryText"
|
||||
android:textSize="15sp"
|
||||
android:layout_marginBottom="@dimen/summary_margin_bottom"
|
||||
android:paddingLeft="@dimen/content_margin_left"
|
||||
android:paddingRight="@dimen/content_margin_right"
|
||||
android:text="@string/sim_missing_summary" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/sim_slot_image"
|
||||
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"/>
|
||||
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
|
@ -26,35 +26,34 @@
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1">
|
||||
|
||||
<ScrollView android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fillViewport="true">
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
style="@style/PageContent">
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/PageContent">
|
||||
android:id="@+id/sim_missing"
|
||||
style="@style/PageSummaryText"
|
||||
android:textSize="15sp"
|
||||
android:layout_marginBottom="@dimen/summary_margin_bottom"
|
||||
android:paddingLeft="@dimen/content_margin_left"
|
||||
android:paddingRight="@dimen/content_margin_right"
|
||||
android:text="@string/sim_missing_summary" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/sim_missing"
|
||||
style="@style/PageSummaryText"
|
||||
android:textSize="15sp"
|
||||
android:layout_marginBottom="@dimen/summary_margin_bottom"
|
||||
android:paddingLeft="@dimen/content_margin_left"
|
||||
android:paddingRight="@dimen/content_margin_right"
|
||||
android:text="@string/sim_missing_summary" />
|
||||
<ImageView
|
||||
android:id="@+id/sim_slot_image"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="0px"
|
||||
android:layout_weight="1"
|
||||
android:layout_gravity="right"
|
||||
android:gravity="right"
|
||||
android:scaleType="fitEnd"
|
||||
android:src="@drawable/sim_back"/>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="right"
|
||||
android:src="@drawable/sim_back"/>
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
@ -20,6 +20,7 @@ import android.app.Fragment;
|
||||
import android.app.FragmentManager;
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import com.cyanogenmod.setupwizard.R;
|
||||
import com.cyanogenmod.setupwizard.ui.SetupPageFragment;
|
||||
@ -64,7 +65,16 @@ public class SimCardMissingPage extends SetupPage {
|
||||
public static class SimCardMissingFragment extends SetupPageFragment {
|
||||
|
||||
@Override
|
||||
protected void initializePage() {}
|
||||
protected void initializePage() {
|
||||
final boolean simOnBack = getResources().getBoolean(
|
||||
R.bool.sim_back);
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getLayoutResource() {
|
||||
|
Loading…
Reference in New Issue
Block a user