- When there are two buttons, place the positive button on the left

and the negative button on the right to match the alert dialog.
- If an alert dialog only needs one button, assign it as the PostiveButton.
- If an alert dialog needs two buttons, assign one Positive and another
Negative.
- for CheckUnits, change the message to
  "Do you want to use metrics as your default units?" so that
  "yes" corresponds to the default case of using metrics as
  the default units.
This commit is contained in:
Jimmy Shih
2011-10-24 14:30:33 -07:00
parent ef86905c58
commit a012943119
22 changed files with 37 additions and 48 deletions
+5 -5
View File
@@ -124,14 +124,14 @@ limitations under the License.
</ScrollView>
<LinearLayout style="@style/ButtonLayout">
<LinearLayout style="@style/ButtonSpacer"/>
<Button android:id="@+id/chart_settings_cancel"
android:layout_gravity="left"
android:text="@string/cancel"
style="@style/Button"/>
<Button android:id="@+id/chart_settings_ok"
android:layout_gravity="right"
android:layout_gravity="left"
android:text="@string/ok"
style="@style/Button"/>
<Button android:id="@+id/chart_settings_cancel"
android:layout_gravity="right"
android:text="@string/cancel"
style="@style/Button"/>
<LinearLayout style="@style/ButtonSpacer"/>
</LinearLayout>
</LinearLayout>
+5 -5
View File
@@ -70,14 +70,14 @@ limitations under the License.
android:imeOptions="actionDone"/>
<LinearLayout style="@style/ButtonLayout">
<LinearLayout style="@style/ButtonSpacer"/>
<Button android:id="@+id/trackdetails_cancel"
android:layout_gravity="left"
android:text="@string/cancel"
style="@style/Button"/>
<Button android:id="@+id/trackdetails_save"
android:layout_gravity="right"
android:layout_gravity="left"
android:text="@string/save"
style="@style/Button"/>
<Button android:id="@+id/trackdetails_cancel"
android:layout_gravity="right"
android:text="@string/cancel"
style="@style/Button"/>
<LinearLayout style="@style/ButtonSpacer"/>
</LinearLayout>
</LinearLayout>
@@ -128,14 +128,14 @@ limitations under the License.
</ScrollView>
<LinearLayout style="@style/ButtonLayout">
<LinearLayout style="@style/ButtonSpacer"/>
<Button android:id="@+id/sendtogoogle_cancel"
android:layout_gravity="left"
android:text="@string/cancel"
style="@style/Button"/>
<Button android:id="@+id/sendtogoogle_send_now"
android:layout_gravity="right"
android:layout_gravity="left"
android:text="@string/sendtogoogle_send_now"
style="@style/Button"/>
<Button android:id="@+id/sendtogoogle_cancel"
android:layout_gravity="right"
android:text="@string/cancel"
style="@style/Button"/>
<LinearLayout style="@style/ButtonSpacer"/>
</LinearLayout>
</LinearLayout>
@@ -489,14 +489,14 @@ limitations under the License.
</ScrollView>
<LinearLayout style="@style/ButtonLayout">
<LinearLayout style="@style/ButtonSpacer"/>
<Button android:id="@+id/waypointdetails_cancel"
android:layout_gravity="left"
android:text="@string/cancel"
style="@style/Button"/>
<Button android:id="@+id/waypointdetails_save"
android:layout_gravity="right"
android:layout_gravity="left"
android:text="@string/save"
style="@style/Button"/>
<Button android:id="@+id/waypointdetails_cancel"
android:layout_gravity="right"
android:text="@string/cancel"
style="@style/Button"/>
<LinearLayout style="@style/ButtonSpacer"/>
</LinearLayout>
</LinearLayout>
+4 -4
View File
@@ -26,13 +26,13 @@ limitations under the License.
android:layout_weight="1" />
<LinearLayout style="@style/ButtonLayout">
<LinearLayout style="@style/ButtonSpacer"/>
<Button android:id="@+id/welcome_about"
<Button android:id="@+id/welcome_ok"
android:layout_gravity="left"
android:text="@string/welcome_about"
android:text="@string/ok"
style="@style/Button"/>
<Button android:id="@+id/welcome_read_later"
<Button android:id="@+id/welcome_about"
android:layout_gravity="right"
android:text="@string/welcome_read_later"
android:text="@string/welcome_about"
style="@style/Button"/>
<LinearLayout style="@style/ButtonSpacer"/>
</LinearLayout>
-1
View File
@@ -388,7 +388,6 @@ limitations under the License.
<!-- Check Units -->
<string name="check_units_title">Avís de les unitats de mesura</string>
<string name="check_units_message">Les unitats són mètriques per defecte. Voleu canviar aquest paràmetre?</string>
<!-- Fake preference keys - never saved, but show options in the preferences screen -->
<string name="bluetooth_options">Opcions del Bluetooth</string>
-1
View File
@@ -419,7 +419,6 @@ limitations under the License.
<!-- Check Units -->
<string name="check_units_title">Einheitenbenachrichtigung</string>
<string name="check_units_message">Voreingestellt sind metrische Einheiten. Willst Du diese Einstellung ändern?</string>
<!-- Fake preference keys - never saved, but show options in the preferences screen -->
<string name="method_bluetooth">Bluetooth</string>
-1
View File
@@ -475,7 +475,6 @@ limitations under the License.
<!-- Check Units -->
<string name="check_units_title">Aviso de unidades de medida</string>
<string name="check_units_message">Por defecto las unidades son métricas. ¿Quiere cambiar la configuración?</string>
<!-- Fake preference keys - never saved, but show options in the preferences screen -->
<string name="bluetooth_options">Opciones Bluetooth</string>
-1
View File
@@ -471,7 +471,6 @@ limitations under the License.
<!-- Check Units -->
<string name="check_units_title">Huomautus mittayksiköistä</string>
<string name="check_units_message">Oletuksena käytössä on metrijärjestelmä. Haluatko muuttaa asetuksen?</string>
<!-- Fake preference keys - never saved, but show options in the preferences screen -->
<string name="method_bluetooth">Bluetooth</string>
+1 -2
View File
@@ -375,8 +375,7 @@ limitations under the License.
<!-- Check Units -->
<string name="check_units_title">Note sur les unités de mesure</string>
<string name="check_units_message">Le système métrique est utilisé par défaut. Souhaitez-vous changer ce paramètre ?</string>
<!-- Fake preference keys - never saved, but show options in the preferences screen -->
<string name="method_bluetooth">Bluetooth</string>
<string name="bluetooth_options">Options Bluetooth</string>
-1
View File
@@ -441,7 +441,6 @@ limitations under the License.
<!-- Check Units -->
<string name="check_units_title">計測単位についてのご注意</string>
<string name="check_units_message">デフォルトの単位はメートルです.設定を変更しますか?</string>
<!-- Fake preference keys - never saved, but show options in the preferences screen -->
<string name="bluetooth_options">Bluetoothオプション</string>
-1
View File
@@ -389,7 +389,6 @@ limitations under the License.
<!-- Check Units -->
<string name="check_units_title">Jednostki miary</string>
<string name="check_units_message">Domyślnie używane są jednostki metryczne. Chcesz to zmienić?</string>
<!-- Fake preference keys - never saved, but show options in the preferences screen -->
<string name="method_bluetooth">Bluetooth</string>
+1 -2
View File
@@ -467,8 +467,7 @@ limitations under the License.
<!-- Check Units -->
<string name="check_units_title">Единицы измерения обратите внимание</string>
<string name="check_units_message">По умолчанию используются метрические единицы. Вы хотели бы изменить этот параметр?</string>
<!-- Fake preference keys - never saved, but show options in the preferences screen -->
<string name="method_bluetooth">Bluetooth</string>
<string name="bluetooth_options">Параметры Bluetooth</string>
-1
View File
@@ -362,5 +362,4 @@ limitations under the License.
<!-- Check Units -->
<string name="check_units_title">Mätenheter</string>
<string name="check_units_message">Som standard är enheterna metriska. Vill du ändra den inställningen?</string>
</resources>
-1
View File
@@ -449,7 +449,6 @@ limitations under the License.
<!-- Check Units -->
<string name="check_units_title">测量单位提示</string>
<string name="check_units_message">默认单位均为公制. 你想要修改此设置吗?</string>
<!-- Fake preference keys - never saved, but show options in the preferences screen -->
<string name="method_bluetooth">蓝牙</string>
+1 -2
View File
@@ -513,7 +513,6 @@ limitations under the License.
<!-- Welcome -->
<string name="welcome">Welcome</string>
<string name="welcome_read_later">Ok</string>
<string name="welcome_about">About My Tracks</string>
<!-- Announcement -->
@@ -530,7 +529,7 @@ limitations under the License.
<!-- Check Units -->
<string name="check_units_title">Units of Measure Notice</string>
<string name="check_units_message">By default units are metric. Would you like to change that setting?</string>
<string name="check_units_message">Do you want to use metrics as your default units?</string>
<!-- Fake preference keys - never saved, but show options in the preferences screen -->
<string name="method_bluetooth">Bluetooth</string>
@@ -127,7 +127,7 @@ public class AccountChooser {
builder.setTitle(R.string.no_account_found_title);
builder.setMessage(R.string.no_account_found);
builder.setCancelable(true);
builder.setNegativeButton(R.string.ok,
builder.setPositiveButton(R.string.ok,
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
dialog.dismiss();
@@ -60,12 +60,12 @@ class CheckUnits {
builder.setCancelable(true);
builder.setPositiveButton(R.string.yes, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
accept(context, preferences);
recordCheckPerformed(preferences);
}
});
builder.setNegativeButton(R.string.no, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
recordCheckPerformed(preferences);
changeDefaultUnits(context, preferences);
}
});
builder.setOnCancelListener(new DialogInterface.OnCancelListener() {
@@ -77,7 +77,7 @@ class CheckUnits {
builder.show();
}
private static void accept(Context context, SharedPreferences preferences) {
private static void changeDefaultUnits(Context context, SharedPreferences preferences) {
recordCheckPerformed(preferences);
Intent startIntent = new Intent(context, SettingsActivity.class);
startIntent.putExtra(context.getString(R.string.open_settings_screen),
@@ -47,7 +47,7 @@ public class WelcomeActivity extends Activity {
WebView web = (WebView) findViewById(R.id.welcome_web);
web.loadUrl("file:///android_asset/welcome.html");
findViewById(R.id.welcome_read_later).setOnClickListener(
findViewById(R.id.welcome_ok).setOnClickListener(
new OnClickListener() {
public void onClick(View v) {
finish();
@@ -72,7 +72,7 @@ public class WelcomeActivity extends Activity {
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setView(view);
builder.setPositiveButton(R.string.ok, null);
builder.setNeutralButton(R.string.license, new DialogInterface.OnClickListener() {
builder.setNegativeButton(R.string.license, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
Eula.showEula(WelcomeActivity.this);
@@ -104,7 +104,7 @@ public class ImportActivity extends Activity {
finish();
}
});
dialogBuilder.setNeutralButton(R.string.import_show_track, new OnClickListener() {
dialogBuilder.setNegativeButton(R.string.import_show_track, new OnClickListener() {
@Override
public void onClick(DialogInterface arg0, int arg1) {
showImportedTrack();
@@ -114,7 +114,7 @@ public class ImportActivity extends Activity {
return dialogBuilder.create();
case FAILURE_DIALOG:
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setNeutralButton(R.string.ok, new OnClickListener() {
builder.setPositiveButton(R.string.ok, new OnClickListener() {
@Override
public void onClick(DialogInterface arg0, int arg1) {
finish();
@@ -168,7 +168,7 @@ public class SaveActivity extends Activity {
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setMessage(writer.getErrorMessage());
builder.setNeutralButton(R.string.ok, new OnClickListener() {
builder.setPositiveButton(R.string.ok, new OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int arg1) {
dialog.dismiss();
@@ -81,7 +81,7 @@ public class ResultDialogFactory {
builder.setPositiveButton(activity.getString(R.string.ok), onOkClickListener);
if (onShareClickListener != null) {
builder.setNeutralButton(activity.getString(R.string.share_track),
builder.setNegativeButton(activity.getString(R.string.share_track),
onShareClickListener);
}