Commit 302d9ac3 authored by bzanotti's avatar bzanotti Committed by Commit bot

[Signin] Update order of buttons in dialog for merging data

The first one should always be the default one.

Updated switch case: http://screen/PTLfmU9H7h0.png

BUG=660418

Review-Url: https://codereview.chromium.org/2614973002
Cr-Commit-Position: refs/heads/master@{#442977}
parent 7fec81cc
...@@ -7,15 +7,16 @@ ...@@ -7,15 +7,16 @@
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:overScrollMode="ifContentScrolls" android:overScrollMode="ifContentScrolls"
android:paddingTop="25dp"
android:paddingEnd="25dp" android:paddingEnd="25dp"
android:paddingStart="25dp"> android:paddingStart="25dp">
<LinearLayout <LinearLayout
android:id="@+id/sync_import_data_content"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:orientation="vertical">
android:paddingTop="8dp">
<TextView <TextView
android:id="@+id/sync_import_data_prompt" android:id="@+id/sync_import_data_prompt"
...@@ -23,7 +24,7 @@ ...@@ -23,7 +24,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textColor="#de000000" android:textColor="#de000000"
android:textSize="16sp" /> android:textSize="16sp" />
<org.chromium.chrome.browser.widget.RadioButtonWithDescription <org.chromium.chrome.browser.widget.RadioButtonWithDescription
android:id="@+id/sync_confirm_import_choice" android:id="@+id/sync_confirm_import_choice"
android:layout_width="match_parent" android:layout_width="match_parent"
...@@ -39,4 +40,4 @@ ...@@ -39,4 +40,4 @@
app:titleText="@string/sync_keep_existing_data_separate" /> app:titleText="@string/sync_keep_existing_data_separate" />
</LinearLayout> </LinearLayout>
</ScrollView> </ScrollView>
\ No newline at end of file
...@@ -13,6 +13,7 @@ import android.support.v7.app.AlertDialog; ...@@ -13,6 +13,7 @@ import android.support.v7.app.AlertDialog;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.View.OnClickListener; import android.view.View.OnClickListener;
import android.widget.LinearLayout;
import android.widget.TextView; import android.widget.TextView;
import org.chromium.base.VisibleForTesting; import org.chromium.base.VisibleForTesting;
...@@ -159,8 +160,15 @@ public class ConfirmImportSyncDataDialog extends DialogFragment ...@@ -159,8 +160,15 @@ public class ConfirmImportSyncDataDialog extends DialogFragment
} }
} }
if (importSyncType == ImportSyncType.SWITCHING_SYNC_ACCOUNTS) {
// Re-order the buttons so that Import Data is last and Don't Import (the default) is
// at the top.
LinearLayout layout = (LinearLayout) v.findViewById(R.id.sync_import_data_content);
layout.removeView(mConfirmImportOption);
layout.addView(mConfirmImportOption);
}
return new AlertDialog.Builder(getActivity(), R.style.AlertDialogTheme) return new AlertDialog.Builder(getActivity(), R.style.AlertDialogTheme)
.setTitle(R.string.sync_import_data_title)
.setPositiveButton(R.string.continue_button, this) .setPositiveButton(R.string.continue_button, this)
.setNegativeButton(R.string.cancel, this) .setNegativeButton(R.string.cancel, this)
.setView(v) .setView(v)
......
...@@ -1184,9 +1184,6 @@ To obtain new licenses, connect to the internet and play your downloaded content ...@@ -1184,9 +1184,6 @@ To obtain new licenses, connect to the internet and play your downloaded content
<message name="IDS_SYNC_LOADING" desc="Preference title to let the user change their encryption password. [CHAR-LIMIT=20]"> <message name="IDS_SYNC_LOADING" desc="Preference title to let the user change their encryption password. [CHAR-LIMIT=20]">
Loading… Loading…
</message> </message>
<message name="IDS_SYNC_IMPORT_DATA_TITLE" desc="Preference title of screen to let user choose to switch sync accounts. [CHAR-LIMIT=24]">
Import data?
</message>
<message name="IDS_SYNC_IMPORT_DATA_PROMPT" desc="Prompt for the user to choose how they want to handle their existing sync data"> <message name="IDS_SYNC_IMPORT_DATA_PROMPT" desc="Prompt for the user to choose how they want to handle their existing sync data">
You have bookmarks, history, passwords, and other settings from <ph name ="FROM_ACCOUNT">%1$s<ex>johndoe@old.com</ex></ph>. You have bookmarks, history, passwords, and other settings from <ph name ="FROM_ACCOUNT">%1$s<ex>johndoe@old.com</ex></ph>.
</message> </message>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment