Browse Source

Attempt to fix the negative sign persistance issue #138, although I cannot reproduce it so lets hope for the best.

pull/148/merge
Eric Kok 11 years ago
parent
commit
334d95d6ce
  1. 6
      core/res/layout/dialog_transferrates.xml
  2. 1
      core/res/values/strings.xml
  3. 2
      core/src/org/transdroid/core/gui/navigation/SetTransferRatesDialog.java

6
core/res/layout/dialog_transferrates.xml

@ -43,8 +43,7 @@
android:layout_weight="1" android:layout_weight="1"
android:gravity="right" android:gravity="right"
android:singleLine="true" android:singleLine="true"
android:text="-" android:text="@string/status_maxspeed_novalue" />
tools:ignore="HardcodedText" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
@ -188,8 +187,7 @@
android:layout_weight="1" android:layout_weight="1"
android:gravity="right" android:gravity="right"
android:singleLine="true" android:singleLine="true"
android:text="-" android:text="@string/status_maxspeed_novalue" />
tools:ignore="HardcodedText" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"

1
core/res/values/strings.xml

@ -127,6 +127,7 @@
<string name="status_maxspeed_up">MAX UPLOAD</string> <string name="status_maxspeed_up">MAX UPLOAD</string>
<string name="status_maxspeed_unit">KB/S</string> <string name="status_maxspeed_unit">KB/S</string>
<string name="status_maxspeed_reset">Reset</string> <string name="status_maxspeed_reset">Reset</string>
<string name="status_maxspeed_novalue" translatable="false">-</string>
<string name="status_update">Update</string> <string name="status_update">Update</string>
<plurals name="status_service_added"> <plurals name="status_service_added">
<item quantity="one">New torrent added</item> <item quantity="one">New torrent added</item>

2
core/src/org/transdroid/core/gui/navigation/SetTransferRatesDialog.java

@ -116,7 +116,7 @@ public class SetTransferRatesDialog extends DialogFragment {
// Append the text contents of the button itself as text to the current number (as reference in the view's // Append the text contents of the button itself as text to the current number (as reference in the view's
// tag) // tag)
TextView numberView = (TextView) v.getTag(); TextView numberView = (TextView) v.getTag();
if (numberView.getText().equals("-")) if (numberView.getText().toString().equals(getString(R.string.status_maxspeed_novalue)))
numberView.setText(""); numberView.setText("");
numberView.setText(numberView.getText().toString() + ((Button) v).getText().toString()); numberView.setText(numberView.getText().toString() + ((Button) v).getText().toString());
} }

Loading…
Cancel
Save