Merge "Finish storage wizard theming." into mnc-dev
22
res/color/storage_wizard_button.xml
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Copyright (C) 2015 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_enabled="false"
|
||||||
|
android:alpha="?android:attr/disabledAlpha"
|
||||||
|
android:color="?android:attr/colorAccent" />
|
||||||
|
<item android:color="?android:attr/colorAccent" />
|
||||||
|
</selector>
|
22
res/color/storage_wizard_button_red.xml
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Copyright (C) 2015 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_enabled="false"
|
||||||
|
android:alpha="?android:attr/disabledAlpha"
|
||||||
|
android:color="#fff4511e" />
|
||||||
|
<item android:color="#fff4511e" />
|
||||||
|
</selector>
|
BIN
res/drawable-hdpi/bg_internal_storage_header.png
Normal file
After Width: | Height: | Size: 38 KiB |
BIN
res/drawable-hdpi/bg_portable_storage_header.png
Normal file
After Width: | Height: | Size: 37 KiB |
BIN
res/drawable-hdpi/bg_tile.png
Normal file
After Width: | Height: | Size: 6.2 KiB |
BIN
res/drawable-mdpi/bg_internal_storage_header.png
Normal file
After Width: | Height: | Size: 19 KiB |
BIN
res/drawable-mdpi/bg_portable_storage_header.png
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
res/drawable-mdpi/bg_tile.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
BIN
res/drawable-xhdpi/bg_internal_storage_header.png
Normal file
After Width: | Height: | Size: 60 KiB |
BIN
res/drawable-xhdpi/bg_portable_storage_header.png
Normal file
After Width: | Height: | Size: 59 KiB |
BIN
res/drawable-xhdpi/bg_tile.png
Normal file
After Width: | Height: | Size: 9.8 KiB |
BIN
res/drawable-xxhdpi/bg_internal_storage_header.png
Normal file
After Width: | Height: | Size: 118 KiB |
BIN
res/drawable-xxhdpi/bg_portable_storage_header.png
Normal file
After Width: | Height: | Size: 116 KiB |
BIN
res/drawable-xxhdpi/bg_tile.png
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
res/drawable-xxxhdpi/bg_internal_storage_header.png
Normal file
After Width: | Height: | Size: 183 KiB |
BIN
res/drawable-xxxhdpi/bg_portable_storage_header.png
Normal file
After Width: | Height: | Size: 180 KiB |
BIN
res/drawable-xxxhdpi/bg_tile.png
Normal file
After Width: | Height: | Size: 24 KiB |
@@ -30,6 +30,7 @@
|
|||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:src="@drawable/ic_eject_24dp"
|
android:src="@drawable/ic_eject_24dp"
|
||||||
|
android:tint="?android:attr/textColorSecondary"
|
||||||
android:background="?android:attr/selectableItemBackground" />
|
android:background="?android:attr/selectableItemBackground" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@@ -44,7 +44,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textAlignment="viewStart"
|
android:textAlignment="viewStart"
|
||||||
android:textAppearance="@android:style/TextAppearance.Material.Body1"
|
android:textAppearance="@android:style/TextAppearance.Material.Body1"
|
||||||
android:textColor="#8a000000"
|
android:textColor="?android:attr/textColorSecondaryNoDisable"
|
||||||
android:maxLines="10" />
|
android:maxLines="10" />
|
||||||
|
|
||||||
<ProgressBar
|
<ProgressBar
|
||||||
|
@@ -20,9 +20,7 @@
|
|||||||
android:id="@+id/setup_wizard_layout"
|
android:id="@+id/setup_wizard_layout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
app:suwBackgroundTile="@drawable/illustration_tile"
|
app:suwBackgroundTile="@drawable/bg_tile">
|
||||||
app:suwIllustrationHorizontalTile="@drawable/illustration_horizontal"
|
|
||||||
app:suwIllustrationImage="@drawable/illustration_generic">
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
style="@style/SuwContentFrame"
|
style="@style/SuwContentFrame"
|
||||||
|
@@ -20,11 +20,7 @@
|
|||||||
android:id="@+id/setup_wizard_layout"
|
android:id="@+id/setup_wizard_layout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
app:suwBackgroundTile="@drawable/illustration_tile"
|
app:suwBackgroundTile="@drawable/bg_tile">
|
||||||
app:suwIllustrationHorizontalTile="@drawable/illustration_horizontal"
|
|
||||||
app:suwIllustrationImage="@drawable/illustration_generic">
|
|
||||||
|
|
||||||
<!-- android:layout="@layout/suw_template_short" -->
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
style="@style/SuwContentFrame"
|
style="@style/SuwContentFrame"
|
||||||
|
@@ -20,9 +20,7 @@
|
|||||||
android:id="@+id/setup_wizard_layout"
|
android:id="@+id/setup_wizard_layout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
app:suwBackgroundTile="@drawable/illustration_tile"
|
app:suwBackgroundTile="@drawable/bg_tile">
|
||||||
app:suwIllustrationHorizontalTile="@drawable/illustration_horizontal"
|
|
||||||
app:suwIllustrationImage="@drawable/illustration_generic">
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
style="@style/SuwContentFrame"
|
style="@style/SuwContentFrame"
|
||||||
|
52
res/layout/storage_wizard_navigation.xml
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Copyright (C) 2015 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"
|
||||||
|
android:id="@+id/suw_layout_navigation_bar"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/suw_navbar_back"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="1" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/suw_navbar_more"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/suw_navbar_next"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:layout_marginBottom="16dp"
|
||||||
|
android:layout_marginEnd="16dp"
|
||||||
|
android:text="@string/wizard_next"
|
||||||
|
android:textColor="@android:color/white"
|
||||||
|
android:backgroundTint="@color/storage_wizard_button" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
@@ -20,9 +20,7 @@
|
|||||||
android:id="@+id/setup_wizard_layout"
|
android:id="@+id/setup_wizard_layout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
app:suwBackgroundTile="@drawable/illustration_tile"
|
app:suwBackgroundTile="@drawable/bg_tile">
|
||||||
app:suwIllustrationHorizontalTile="@drawable/illustration_horizontal"
|
|
||||||
app:suwIllustrationImage="@drawable/illustration_generic">
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
style="@style/SuwContentFrame"
|
style="@style/SuwContentFrame"
|
||||||
|
@@ -20,9 +20,7 @@
|
|||||||
android:id="@+id/setup_wizard_layout"
|
android:id="@+id/setup_wizard_layout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
app:suwBackgroundTile="@drawable/illustration_tile"
|
app:suwBackgroundTile="@drawable/bg_tile">
|
||||||
app:suwIllustrationHorizontalTile="@drawable/illustration_horizontal"
|
|
||||||
app:suwIllustrationImage="@drawable/illustration_generic">
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
style="@style/SuwContentFrame"
|
style="@style/SuwContentFrame"
|
||||||
|
@@ -343,4 +343,8 @@
|
|||||||
<item name="android:textSize">16sp</item>
|
<item name="android:textSize">16sp</item>
|
||||||
<item name="android:textColor">?android:attr/textColorPrimary</item>
|
<item name="android:textColor">?android:attr/textColorPrimary</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<style name="SetupWizardStorageStyle" parent="@style/SuwThemeMaterial.Light">
|
||||||
|
<item name="android:colorAccent">#ff009688</item>
|
||||||
|
</style>
|
||||||
</resources>
|
</resources>
|
||||||
|
@@ -101,7 +101,6 @@ public class StorageVolumePreference extends Preference {
|
|||||||
protected void onBindView(View view) {
|
protected void onBindView(View view) {
|
||||||
final ImageView unmount = (ImageView) view.findViewById(R.id.unmount);
|
final ImageView unmount = (ImageView) view.findViewById(R.id.unmount);
|
||||||
if (unmount != null) {
|
if (unmount != null) {
|
||||||
unmount.getDrawable().setTint(Color.parseColor("#8a000000"));
|
|
||||||
unmount.setOnClickListener(mUnmountListener);
|
unmount.setOnClickListener(mUnmountListener);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
package com.android.settings.deviceinfo;
|
package com.android.settings.deviceinfo;
|
||||||
|
|
||||||
|
import android.annotation.LayoutRes;
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
@@ -23,9 +24,10 @@ import android.os.storage.DiskInfo;
|
|||||||
import android.os.storage.StorageEventListener;
|
import android.os.storage.StorageEventListener;
|
||||||
import android.os.storage.StorageManager;
|
import android.os.storage.StorageManager;
|
||||||
import android.os.storage.VolumeInfo;
|
import android.os.storage.VolumeInfo;
|
||||||
import android.os.storage.VolumeRecord;
|
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.view.Window;
|
||||||
import android.view.WindowManager;
|
import android.view.WindowManager;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.ProgressBar;
|
import android.widget.ProgressBar;
|
||||||
@@ -33,19 +35,20 @@ import android.widget.TextView;
|
|||||||
|
|
||||||
import com.android.settings.R;
|
import com.android.settings.R;
|
||||||
import com.android.setupwizardlib.SetupWizardLayout;
|
import com.android.setupwizardlib.SetupWizardLayout;
|
||||||
import com.android.setupwizardlib.view.NavigationBar;
|
|
||||||
import com.android.setupwizardlib.view.NavigationBar.NavigationBarListener;
|
|
||||||
|
|
||||||
import java.text.NumberFormat;
|
import java.text.NumberFormat;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
public abstract class StorageWizardBase extends Activity implements NavigationBarListener {
|
public abstract class StorageWizardBase extends Activity {
|
||||||
protected StorageManager mStorage;
|
protected StorageManager mStorage;
|
||||||
|
|
||||||
protected VolumeInfo mVolume;
|
protected VolumeInfo mVolume;
|
||||||
protected DiskInfo mDisk;
|
protected DiskInfo mDisk;
|
||||||
|
|
||||||
|
private View mCustomNav;
|
||||||
|
private Button mCustomNext;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
@@ -64,28 +67,62 @@ public abstract class StorageWizardBase extends Activity implements NavigationBa
|
|||||||
mDisk = mVolume.getDisk();
|
mDisk = mVolume.getDisk();
|
||||||
}
|
}
|
||||||
|
|
||||||
setTheme(R.style.SuwThemeMaterial_Light);
|
setTheme(R.style.SetupWizardStorageStyle);
|
||||||
|
|
||||||
if (mDisk != null) {
|
if (mDisk != null) {
|
||||||
mStorage.registerListener(mStorageListener);
|
mStorage.registerListener(mStorageListener);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setContentView(@LayoutRes int layoutResID) {
|
||||||
|
super.setContentView(layoutResID);
|
||||||
|
|
||||||
|
// Our wizard is a unique flower, so it has custom buttons
|
||||||
|
final ViewGroup navParent = (ViewGroup) findViewById(R.id.suw_layout_navigation_bar)
|
||||||
|
.getParent();
|
||||||
|
mCustomNav = getLayoutInflater().inflate(R.layout.storage_wizard_navigation,
|
||||||
|
navParent, false);
|
||||||
|
|
||||||
|
mCustomNext = (Button) mCustomNav.findViewById(R.id.suw_navbar_next);
|
||||||
|
mCustomNext.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
onNavigateNext();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Swap our custom navigation bar into place
|
||||||
|
for (int i = 0; i < navParent.getChildCount(); i++) {
|
||||||
|
if (navParent.getChildAt(i).getId() == R.id.suw_layout_navigation_bar) {
|
||||||
|
navParent.removeViewAt(i);
|
||||||
|
navParent.addView(mCustomNav, i);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onPostCreate(Bundle savedInstanceState) {
|
protected void onPostCreate(Bundle savedInstanceState) {
|
||||||
super.onPostCreate(savedInstanceState);
|
super.onPostCreate(savedInstanceState);
|
||||||
|
|
||||||
getWindow().addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS |
|
final Window window = getWindow();
|
||||||
|
window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS |
|
||||||
WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN |
|
WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN |
|
||||||
WindowManager.LayoutParams.FLAG_LAYOUT_INSET_DECOR);
|
WindowManager.LayoutParams.FLAG_LAYOUT_INSET_DECOR);
|
||||||
|
window.setStatusBarColor(Color.TRANSPARENT);
|
||||||
|
|
||||||
getNavigationBar().setSystemUiVisibility(
|
mCustomNav.setSystemUiVisibility(
|
||||||
View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_STABLE);
|
View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_STABLE);
|
||||||
|
|
||||||
getWindow().setStatusBarColor(Color.TRANSPARENT);
|
final View scrollView = findViewById(R.id.suw_bottom_scroll_view);
|
||||||
|
scrollView.setVerticalFadingEdgeEnabled(true);
|
||||||
|
scrollView.setFadingEdgeLength(scrollView.getVerticalFadingEdgeLength() * 2);
|
||||||
|
|
||||||
getNavigationBar().setNavigationBarListener(this);
|
// Our header assets already have padding baked in
|
||||||
getBackButton().setVisibility(View.GONE);
|
final View title = findViewById(R.id.suw_layout_title);
|
||||||
|
title.setPadding(title.getPaddingLeft(), 0, title.getPaddingRight(),
|
||||||
|
title.getPaddingBottom());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -94,16 +131,8 @@ public abstract class StorageWizardBase extends Activity implements NavigationBa
|
|||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected NavigationBar getNavigationBar() {
|
|
||||||
return (NavigationBar) findViewById(R.id.suw_layout_navigation_bar);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected Button getBackButton() {
|
|
||||||
return getNavigationBar().getBackButton();
|
|
||||||
}
|
|
||||||
|
|
||||||
protected Button getNextButton() {
|
protected Button getNextButton() {
|
||||||
return getNavigationBar().getNextButton();
|
return mCustomNext;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected SetupWizardLayout getSetupWizardLayout() {
|
protected SetupWizardLayout getSetupWizardLayout() {
|
||||||
@@ -135,12 +164,16 @@ public abstract class StorageWizardBase extends Activity implements NavigationBa
|
|||||||
secondBody.setVisibility(View.VISIBLE);
|
secondBody.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
protected void setIllustrationInternal(boolean internal) {
|
||||||
public void onNavigateBack() {
|
if (internal) {
|
||||||
throw new UnsupportedOperationException();
|
getSetupWizardLayout().setIllustration(R.drawable.bg_internal_storage_header,
|
||||||
|
android.R.color.transparent);
|
||||||
|
} else {
|
||||||
|
getSetupWizardLayout().setIllustration(R.drawable.bg_portable_storage_header,
|
||||||
|
android.R.color.transparent);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onNavigateNext() {
|
public void onNavigateNext() {
|
||||||
throw new UnsupportedOperationException();
|
throw new UnsupportedOperationException();
|
||||||
}
|
}
|
||||||
|
@@ -38,6 +38,7 @@ public class StorageWizardFormatConfirm extends StorageWizardBase {
|
|||||||
setContentView(R.layout.storage_wizard_generic);
|
setContentView(R.layout.storage_wizard_generic);
|
||||||
|
|
||||||
mFormatPrivate = getIntent().getBooleanExtra(EXTRA_FORMAT_PRIVATE, false);
|
mFormatPrivate = getIntent().getBooleanExtra(EXTRA_FORMAT_PRIVATE, false);
|
||||||
|
setIllustrationInternal(mFormatPrivate);
|
||||||
|
|
||||||
if (mFormatPrivate) {
|
if (mFormatPrivate) {
|
||||||
setHeaderText(R.string.storage_wizard_format_confirm_title);
|
setHeaderText(R.string.storage_wizard_format_confirm_title);
|
||||||
@@ -49,8 +50,8 @@ public class StorageWizardFormatConfirm extends StorageWizardBase {
|
|||||||
mDisk.getDescription());
|
mDisk.getDescription());
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: make this a big red scary button
|
|
||||||
getNextButton().setText(R.string.storage_wizard_format_confirm_next);
|
getNextButton().setText(R.string.storage_wizard_format_confirm_next);
|
||||||
|
getNextButton().setBackgroundTintList(getColorStateList(R.color.storage_wizard_button_red));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@@ -51,6 +51,7 @@ public class StorageWizardFormatProgress extends StorageWizardBase {
|
|||||||
|
|
||||||
mFormatPrivate = getIntent().getBooleanExtra(
|
mFormatPrivate = getIntent().getBooleanExtra(
|
||||||
StorageWizardFormatConfirm.EXTRA_FORMAT_PRIVATE, false);
|
StorageWizardFormatConfirm.EXTRA_FORMAT_PRIVATE, false);
|
||||||
|
setIllustrationInternal(mFormatPrivate);
|
||||||
|
|
||||||
setHeaderText(R.string.storage_wizard_format_progress_title, mDisk.getDescription());
|
setHeaderText(R.string.storage_wizard_format_progress_title, mDisk.getDescription());
|
||||||
setBodyText(R.string.storage_wizard_format_progress_body, mDisk.getDescription());
|
setBodyText(R.string.storage_wizard_format_progress_body, mDisk.getDescription());
|
||||||
|
@@ -39,6 +39,7 @@ public class StorageWizardInit extends StorageWizardBase {
|
|||||||
}
|
}
|
||||||
setContentView(R.layout.storage_wizard_init);
|
setContentView(R.layout.storage_wizard_init);
|
||||||
|
|
||||||
|
setIllustrationInternal(true);
|
||||||
setHeaderText(R.string.storage_wizard_init_title, mDisk.getDescription());
|
setHeaderText(R.string.storage_wizard_init_title, mDisk.getDescription());
|
||||||
|
|
||||||
mRadioExternal = (RadioButton) findViewById(R.id.storage_wizard_init_external_title);
|
mRadioExternal = (RadioButton) findViewById(R.id.storage_wizard_init_external_title);
|
||||||
@@ -70,8 +71,10 @@ public class StorageWizardInit extends StorageWizardBase {
|
|||||||
if (isChecked) {
|
if (isChecked) {
|
||||||
if (buttonView == mRadioExternal) {
|
if (buttonView == mRadioExternal) {
|
||||||
mRadioInternal.setChecked(false);
|
mRadioInternal.setChecked(false);
|
||||||
|
setIllustrationInternal(false);
|
||||||
} else if (buttonView == mRadioInternal) {
|
} else if (buttonView == mRadioInternal) {
|
||||||
mRadioExternal.setChecked(false);
|
mRadioExternal.setChecked(false);
|
||||||
|
setIllustrationInternal(true);
|
||||||
}
|
}
|
||||||
getNextButton().setEnabled(true);
|
getNextButton().setEnabled(true);
|
||||||
}
|
}
|
||||||
|
@@ -23,7 +23,6 @@ import android.widget.CompoundButton;
|
|||||||
import android.widget.CompoundButton.OnCheckedChangeListener;
|
import android.widget.CompoundButton.OnCheckedChangeListener;
|
||||||
import android.widget.RadioButton;
|
import android.widget.RadioButton;
|
||||||
|
|
||||||
import com.android.internal.util.Preconditions;
|
|
||||||
import com.android.settings.R;
|
import com.android.settings.R;
|
||||||
|
|
||||||
public class StorageWizardMigrate extends StorageWizardBase {
|
public class StorageWizardMigrate extends StorageWizardBase {
|
||||||
@@ -41,6 +40,7 @@ public class StorageWizardMigrate extends StorageWizardBase {
|
|||||||
}
|
}
|
||||||
setContentView(R.layout.storage_wizard_migrate);
|
setContentView(R.layout.storage_wizard_migrate);
|
||||||
|
|
||||||
|
setIllustrationInternal(true);
|
||||||
setHeaderText(R.string.storage_wizard_migrate_title, mDisk.getDescription());
|
setHeaderText(R.string.storage_wizard_migrate_title, mDisk.getDescription());
|
||||||
setBodyText(R.string.memory_calculating_size);
|
setBodyText(R.string.memory_calculating_size);
|
||||||
|
|
||||||
@@ -50,7 +50,7 @@ public class StorageWizardMigrate extends StorageWizardBase {
|
|||||||
mRadioNow.setOnCheckedChangeListener(mRadioListener);
|
mRadioNow.setOnCheckedChangeListener(mRadioListener);
|
||||||
mRadioLater.setOnCheckedChangeListener(mRadioListener);
|
mRadioLater.setOnCheckedChangeListener(mRadioListener);
|
||||||
|
|
||||||
mRadioNow.setChecked(true);
|
getNextButton().setEnabled(false);
|
||||||
|
|
||||||
mEstimate = new MigrateEstimateTask(this) {
|
mEstimate = new MigrateEstimateTask(this) {
|
||||||
@Override
|
@Override
|
||||||
@@ -73,6 +73,7 @@ public class StorageWizardMigrate extends StorageWizardBase {
|
|||||||
} else if (buttonView == mRadioLater) {
|
} else if (buttonView == mRadioLater) {
|
||||||
mRadioNow.setChecked(false);
|
mRadioNow.setChecked(false);
|
||||||
}
|
}
|
||||||
|
getNextButton().setEnabled(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@@ -45,6 +45,7 @@ public class StorageWizardMigrateConfirm extends StorageWizardBase {
|
|||||||
final String sourceDescrip = mStorage.getBestVolumeDescription(sourceVol);
|
final String sourceDescrip = mStorage.getBestVolumeDescription(sourceVol);
|
||||||
final String targetDescrip = mStorage.getBestVolumeDescription(mVolume);
|
final String targetDescrip = mStorage.getBestVolumeDescription(mVolume);
|
||||||
|
|
||||||
|
setIllustrationInternal(true);
|
||||||
setHeaderText(R.string.storage_wizard_migrate_confirm_title, targetDescrip);
|
setHeaderText(R.string.storage_wizard_migrate_confirm_title, targetDescrip);
|
||||||
setBodyText(R.string.memory_calculating_size);
|
setBodyText(R.string.memory_calculating_size);
|
||||||
setSecondaryBodyText(R.string.storage_wizard_migrate_details, targetDescrip);
|
setSecondaryBodyText(R.string.storage_wizard_migrate_details, targetDescrip);
|
||||||
|
@@ -30,10 +30,11 @@ import android.util.Log;
|
|||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import com.android.internal.util.Preconditions;
|
|
||||||
import com.android.settings.R;
|
import com.android.settings.R;
|
||||||
|
|
||||||
public class StorageWizardMigrateProgress extends StorageWizardBase {
|
public class StorageWizardMigrateProgress extends StorageWizardBase {
|
||||||
|
private static final String ACTION_FINISH_WIZARD = "com.android.systemui.action.FINISH_WIZARD";
|
||||||
|
|
||||||
private int mMoveId;
|
private int mMoveId;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -48,6 +49,7 @@ public class StorageWizardMigrateProgress extends StorageWizardBase {
|
|||||||
mMoveId = getIntent().getIntExtra(EXTRA_MOVE_ID, -1);
|
mMoveId = getIntent().getIntExtra(EXTRA_MOVE_ID, -1);
|
||||||
|
|
||||||
final String descrip = mStorage.getBestVolumeDescription(mVolume);
|
final String descrip = mStorage.getBestVolumeDescription(mVolume);
|
||||||
|
setIllustrationInternal(true);
|
||||||
setHeaderText(R.string.storage_wizard_migrate_progress_title, descrip);
|
setHeaderText(R.string.storage_wizard_migrate_progress_title, descrip);
|
||||||
setBodyText(R.string.storage_wizard_migrate_details, descrip);
|
setBodyText(R.string.storage_wizard_migrate_details, descrip);
|
||||||
|
|
||||||
@@ -68,6 +70,12 @@ public class StorageWizardMigrateProgress extends StorageWizardBase {
|
|||||||
Log.d(TAG, "Finished with status " + status);
|
Log.d(TAG, "Finished with status " + status);
|
||||||
if (status == PackageManager.MOVE_SUCCEEDED) {
|
if (status == PackageManager.MOVE_SUCCEEDED) {
|
||||||
if (mDisk != null) {
|
if (mDisk != null) {
|
||||||
|
// Kinda lame, but tear down that shiny finished
|
||||||
|
// notification, since user is still in wizard flow
|
||||||
|
final Intent finishIntent = new Intent(ACTION_FINISH_WIZARD);
|
||||||
|
finishIntent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY);
|
||||||
|
sendBroadcast(finishIntent);
|
||||||
|
|
||||||
final Intent intent = new Intent(context, StorageWizardReady.class);
|
final Intent intent = new Intent(context, StorageWizardReady.class);
|
||||||
intent.putExtra(DiskInfo.EXTRA_DISK_ID, mDisk.getId());
|
intent.putExtra(DiskInfo.EXTRA_DISK_ID, mDisk.getId());
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
|
@@ -56,6 +56,7 @@ public class StorageWizardMoveConfirm extends StorageWizardBase {
|
|||||||
final String appName = getPackageManager().getApplicationLabel(mApp).toString();
|
final String appName = getPackageManager().getApplicationLabel(mApp).toString();
|
||||||
final String volumeName = mStorage.getBestVolumeDescription(mVolume);
|
final String volumeName = mStorage.getBestVolumeDescription(mVolume);
|
||||||
|
|
||||||
|
setIllustrationInternal(true);
|
||||||
setHeaderText(R.string.storage_wizard_move_confirm_title, appName);
|
setHeaderText(R.string.storage_wizard_move_confirm_title, appName);
|
||||||
setBodyText(R.string.storage_wizard_move_confirm_body, appName, volumeName);
|
setBodyText(R.string.storage_wizard_move_confirm_body, appName, volumeName);
|
||||||
|
|
||||||
|
@@ -46,6 +46,7 @@ public class StorageWizardMoveProgress extends StorageWizardBase {
|
|||||||
final String appName = getIntent().getStringExtra(EXTRA_TITLE);
|
final String appName = getIntent().getStringExtra(EXTRA_TITLE);
|
||||||
final String volumeName = mStorage.getBestVolumeDescription(mVolume);
|
final String volumeName = mStorage.getBestVolumeDescription(mVolume);
|
||||||
|
|
||||||
|
setIllustrationInternal(true);
|
||||||
setHeaderText(R.string.storage_wizard_move_progress_title, appName);
|
setHeaderText(R.string.storage_wizard_move_progress_title, appName);
|
||||||
setBodyText(R.string.storage_wizard_move_progress_body, volumeName, appName);
|
setBodyText(R.string.storage_wizard_move_progress_body, volumeName, appName);
|
||||||
|
|
||||||
|
@@ -19,7 +19,6 @@ package com.android.settings.deviceinfo;
|
|||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.storage.VolumeInfo;
|
import android.os.storage.VolumeInfo;
|
||||||
|
|
||||||
import com.android.internal.util.Preconditions;
|
|
||||||
import com.android.settings.R;
|
import com.android.settings.R;
|
||||||
|
|
||||||
public class StorageWizardReady extends StorageWizardBase {
|
public class StorageWizardReady extends StorageWizardBase {
|
||||||
@@ -39,9 +38,11 @@ public class StorageWizardReady extends StorageWizardBase {
|
|||||||
final VolumeInfo publicVol = findFirstVolume(VolumeInfo.TYPE_PUBLIC);
|
final VolumeInfo publicVol = findFirstVolume(VolumeInfo.TYPE_PUBLIC);
|
||||||
final VolumeInfo privateVol = findFirstVolume(VolumeInfo.TYPE_PRIVATE);
|
final VolumeInfo privateVol = findFirstVolume(VolumeInfo.TYPE_PRIVATE);
|
||||||
if (publicVol != null) {
|
if (publicVol != null) {
|
||||||
|
setIllustrationInternal(false);
|
||||||
setBodyText(R.string.storage_wizard_ready_external_body,
|
setBodyText(R.string.storage_wizard_ready_external_body,
|
||||||
mDisk.getDescription());
|
mDisk.getDescription());
|
||||||
} else if (privateVol != null) {
|
} else if (privateVol != null) {
|
||||||
|
setIllustrationInternal(true);
|
||||||
setBodyText(R.string.storage_wizard_ready_internal_body,
|
setBodyText(R.string.storage_wizard_ready_internal_body,
|
||||||
mDisk.getDescription());
|
mDisk.getDescription());
|
||||||
}
|
}
|
||||||
|