Merge lp:~humpolec-team/humpolec/UbuntuInstaller-lp1262028 into lp:humpolec

Proposed by Rex Tsai
Status: Merged
Approved by: Ondrej Kubik
Approved revision: 25
Merged at revision: 25
Proposed branch: lp:~humpolec-team/humpolec/UbuntuInstaller-lp1262028
Merge into: lp:humpolec
Diff against target: 77 lines (+11/-6)
4 files modified
res/layout/ubuntu_dualboot_install.xml (+4/-3)
res/values/strings.xml (+1/-1)
src/com/canonical/ubuntu/installer/InstallActivity.java (+4/-1)
src/com/canonical/ubuntu/installer/LaunchActivity.java (+2/-1)
To merge this branch: bzr merge lp:~humpolec-team/humpolec/UbuntuInstaller-lp1262028
Reviewer Review Type Date Requested Status
Ondrej Kubik Approve
Review via email: mp+199631@code.launchpad.net

Description of the change

UX
* Kill old activity when launch a new one. (LP: #1262028)
* s/UbuntuInstaller/Ubuntu Dual Boot/ (LP: #1262212)
* Make UbuntuTextView expand the view.

To post a comment you must log in.
Revision history for this message
Rex Tsai (chihchun) wrote :

Another way to manage task stack, it's add "android:noHistory = "true"" into Androidmanifest.xml. Then the app will not keep old tasks. Back button always go back to home screen.

Revision history for this message
Ondrej Kubik (ondrak) wrote :

+1. We should exit current activity when switching to new one, otherwise it messes up stack.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'res/layout/ubuntu_dualboot_install.xml'
--- res/layout/ubuntu_dualboot_install.xml 2013-12-12 02:02:35 +0000
+++ res/layout/ubuntu_dualboot_install.xml 2013-12-19 09:42:54 +0000
@@ -58,16 +58,17 @@
58 <com.canonical.ubuntu.widget.UbuntuTextView58 <com.canonical.ubuntu.widget.UbuntuTextView
59 android:id="@+id/terminal"59 android:id="@+id/terminal"
60 android:layout_width="match_parent"60 android:layout_width="match_parent"
61 android:layout_height="150dp"61 android:layout_height="match_parent"
62 android:layout_above="@id/progress_frame"62 android:layout_above="@id/progress_frame"
63 android:layout_below="@+id/title"
63 android:layout_gravity="center"64 android:layout_gravity="center"
64 android:layout_margin="16dp"65 android:layout_margin="16dp"
65 android:background="@color/terminalbg"66 android:background="@color/terminalbg"
66 android:ellipsize="middle"67 android:ellipsize="middle"
67 android:gravity="left"68 android:gravity="left"
69 android:maxLines="1000"
68 android:padding="10dp"70 android:padding="10dp"
69 android:maxLines = "1000"71 android:scrollbars="vertical"
70 android:scrollbars = "vertical"
71 android:text=""72 android:text=""
72 android:textColor="@color/terminaltext"73 android:textColor="@color/terminaltext"
73 u1f:customFont="Ubuntu-R.ttf" />74 u1f:customFont="Ubuntu-R.ttf" />
7475
=== modified file 'res/values/strings.xml'
--- res/values/strings.xml 2013-12-19 05:43:04 +0000
+++ res/values/strings.xml 2013-12-19 09:42:54 +0000
@@ -1,7 +1,7 @@
1<?xml version="1.0" encoding="utf-8"?>1<?xml version="1.0" encoding="utf-8"?>
2<resources>2<resources>
33
4 <string name="app_name">UbuntuInstaller</string>4 <string name="app_name">Ubuntu Dual Boot</string>
5 <string name="action_settings">Settings</string>5 <string name="action_settings">Settings</string>
6 <string name="action_detele_download">Delete download</string>6 <string name="action_detele_download">Delete download</string>
7 <string name="action_install">Install</string>7 <string name="action_install">Install</string>
88
=== modified file 'src/com/canonical/ubuntu/installer/InstallActivity.java'
--- src/com/canonical/ubuntu/installer/InstallActivity.java 2013-12-19 05:43:04 +0000
+++ src/com/canonical/ubuntu/installer/InstallActivity.java 2013-12-19 09:42:54 +0000
@@ -132,8 +132,9 @@
132 private void checkIfUbuntuIsInstalled() {132 private void checkIfUbuntuIsInstalled() {
133 // check is there is Ubuntu installed133 // check is there is Ubuntu installed
134 if (UbuntuInstallService.isUbuntuInstalled(this.getApplicationContext())) {134 if (UbuntuInstallService.isUbuntuInstalled(this.getApplicationContext())) {
135 // go to launch screen135 // go to launch screen, and kill this activity.
136 LaunchActivity.startFrom(this);136 LaunchActivity.startFrom(this);
137 finish();
137 }138 }
138 }139 }
139140
@@ -364,7 +365,9 @@
364 Utils.showToast(context, "Install completed");365 Utils.showToast(context, "Install completed");
365 mProgressBar.setProgress(100);366 mProgressBar.setProgress(100);
366 deleteDownload();367 deleteDownload();
368 // go to launch screen, and kill this activity.
367 LaunchActivity.startFrom(context);369 LaunchActivity.startFrom(context);
370 finish();
368 } else {371 } else {
369 Utils.showToast(context, "Installation failed:");372 Utils.showToast(context, "Installation failed:");
370 String reason = intent.getStringExtra(UbuntuInstallService.INSTALL_RESULT_EXTRA_STR);373 String reason = intent.getStringExtra(UbuntuInstallService.INSTALL_RESULT_EXTRA_STR);
371374
=== modified file 'src/com/canonical/ubuntu/installer/LaunchActivity.java'
--- src/com/canonical/ubuntu/installer/LaunchActivity.java 2013-12-19 05:43:04 +0000
+++ src/com/canonical/ubuntu/installer/LaunchActivity.java 2013-12-19 09:42:54 +0000
@@ -155,8 +155,9 @@
155 private void ensureUbuntuIsInstalled() {155 private void ensureUbuntuIsInstalled() {
156 VersionInfo v = UbuntuInstallService.getInstalledVersion(this.getApplicationContext());156 VersionInfo v = UbuntuInstallService.getInstalledVersion(this.getApplicationContext());
157 if (v == null) {157 if (v == null) {
158 // go back to install screen158 // go back to install screen, and release myself.
159 InstallActivity.startFrom(this);159 InstallActivity.startFrom(this);
160 finish();
160 } else {161 } else {
161 mUbuntuVersion = v;162 mUbuntuVersion = v;
162 }163 }

Subscribers

People subscribed via source and target branches

to all changes: