diff options
author | daniel oeh <daniel.oeh@gmail.com> | 2014-04-27 00:48:20 +0200 |
---|---|---|
committer | daniel oeh <daniel.oeh@gmail.com> | 2014-04-27 00:48:20 +0200 |
commit | a0ef9f5a8798e59b5ec40508bc990424d0013ebe (patch) | |
tree | da0e35e7b0e2a624c891d3b47f2f677307549994 | |
parent | df55792d27b2753a04c2f545cbfc52a2f72fa9b1 (diff) | |
download | AntennaPod-a0ef9f5a8798e59b5ec40508bc990424d0013ebe.zip |
Made strings in Sleep timer dialog translatable. fixes #394
-rw-r--r-- | res/layout-v14/time_dialog.xml | 4 | ||||
-rw-r--r-- | res/layout/time_dialog.xml | 4 | ||||
-rw-r--r-- | res/values/strings.xml | 3 | ||||
-rw-r--r-- | src/de/danoeh/antennapod/dialog/TimeDialog.java | 5 |
4 files changed, 11 insertions, 5 deletions
diff --git a/res/layout-v14/time_dialog.xml b/res/layout-v14/time_dialog.xml index 759c328d5..7fd4309d5 100644 --- a/res/layout-v14/time_dialog.xml +++ b/res/layout-v14/time_dialog.xml @@ -15,7 +15,7 @@ android:layout_height="wrap_content" android:layout_weight="1" android:layout_margin="8dp" - android:ems="10" + android:ems="7" android:hint="@string/enter_time_here_label" android:inputType="number" android:maxLength="2" > @@ -25,7 +25,7 @@ <Spinner android:id="@+id/spTimeUnit" - android:layout_width="100dp" + android:layout_width="180dp" android:layout_height="wrap_content" android:layout_marginBottom="8dp" android:layout_marginTop="8dp" /> diff --git a/res/layout/time_dialog.xml b/res/layout/time_dialog.xml index 20237e6b2..7e5d869e0 100644 --- a/res/layout/time_dialog.xml +++ b/res/layout/time_dialog.xml @@ -15,7 +15,7 @@ android:layout_height="wrap_content" android:layout_weight="1" android:layout_margin="8dp" - android:ems="10" + android:ems="7" android:hint="@string/enter_time_here_label" android:inputType="number" android:maxLength="2" > @@ -25,7 +25,7 @@ <Spinner android:id="@+id/spTimeUnit" - android:layout_width="100dp" + android:layout_width="180dp" android:layout_height="wrap_content" android:layout_marginBottom="8dp" android:layout_marginTop="8dp" /> diff --git a/res/values/strings.xml b/res/values/strings.xml index 6d36a5c07..7784c49f6 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -273,6 +273,9 @@ <string name="sleep_timer_label">Sleep timer</string> <string name="time_left_label">Time left:\u0020</string> <string name="time_dialog_invalid_input">Invalid input, time has to be an integer</string> + <string name="time_unit_seconds">seconds</string> + <string name="time_unit_minutes">minutes</string> + <string name="time_unit_hours">hours</string> <!-- Miro Guide --> <string name="loading_categories_label">Loading categories...</string> diff --git a/src/de/danoeh/antennapod/dialog/TimeDialog.java b/src/de/danoeh/antennapod/dialog/TimeDialog.java index 353a50adb..cb3ebf0ab 100644 --- a/src/de/danoeh/antennapod/dialog/TimeDialog.java +++ b/src/de/danoeh/antennapod/dialog/TimeDialog.java @@ -26,7 +26,6 @@ public abstract class TimeDialog extends Dialog { private Button butConfirm; private Button butCancel; - private String[] spinnerContent = { "s", "min", "h" }; private TimeUnit[] units = { TimeUnit.SECONDS, TimeUnit.MINUTES, TimeUnit.HOURS }; @@ -39,6 +38,10 @@ public abstract class TimeDialog extends Dialog { protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); + String[] spinnerContent = new String[]{context.getString(R.string.time_unit_seconds), + context.getString(R.string.time_unit_minutes), + context.getString(R.string.time_unit_hours)}; + setContentView(R.layout.time_dialog); etxtTime = (EditText) findViewById(R.id.etxtTime); spTimeUnit = (Spinner) findViewById(R.id.spTimeUnit); |