ritzelrechner

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit a73ad161bca34db14802bb252c40e806a265c2ed
parent c54c6e8575cd869d16fd37e2d900d32e9f4434a8
Author: Jan Dankert <devnull@localhost>
Date:   Mon, 21 May 2012 21:32:19 +0200

Offset für die SeekBar, damit Startwerte von 0 vermieden werden.

Diffstat:
res/layout/calculate.xml | 6+++---
src/de/jandankert/ritzelrechner/CalculateActivity.java | 6+++---
2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/res/layout/calculate.xml b/res/layout/calculate.xml @@ -12,7 +12,7 @@ <TextView android:text="test" android:id="@+id/text_zaehne_vorne" android:layout_width="wrap_content" android:layout_height="wrap_content"></TextView> </LinearLayout> - <SeekBar android:max="53" android:progress="48" + <SeekBar android:max="31" android:progress="26" android:id="@+id/seek_anzahl_zaehne_vorne" android:layout_width="fill_parent" android:layout_height="wrap_content"></SeekBar> @@ -25,7 +25,7 @@ <TextView android:text="" android:id="@+id/text_zaehne_hinten" android:layout_width="wrap_content" android:layout_height="wrap_content"></TextView> </LinearLayout> - <SeekBar android:max="36" android:progress="10" + <SeekBar android:max="26" android:progress="3" android:id="@+id/seek_anzahl_zaehne_hinten" android:layout_width="fill_parent" android:contentDescription="@string/zaehne_hinten" android:layout_height="wrap_content"></SeekBar> @@ -43,7 +43,7 @@ <TextView android:text="@string/umin" android:layout_width="wrap_content" android:layout_height="wrap_content"></TextView> </LinearLayout> - <SeekBar android:max="120" android:progress="85" + <SeekBar android:max="80" android:progress="45" android:id="@+id/seek_trittfrequenz" android:layout_width="fill_parent" android:contentDescription="@string/trittfrequenz" android:layout_height="wrap_content"></SeekBar> diff --git a/src/de/jandankert/ritzelrechner/CalculateActivity.java b/src/de/jandankert/ritzelrechner/CalculateActivity.java @@ -83,15 +83,15 @@ public class CalculateActivity extends Activity { // Umfang im Millimeter int umfang = Integer.parseInt(prefs.getString("umfang", "2150")); - int anzahlZaehneVorne = anzahlZaehneVorneView.getProgress(); + int anzahlZaehneVorne = anzahlZaehneVorneView.getProgress()+22; ((TextView) findViewById(R.id.text_zaehne_vorne)).setText("" + anzahlZaehneVorne); - int anzahlZaehneHinten = anzahlZaehneHintenView.getProgress(); + int anzahlZaehneHinten = anzahlZaehneHintenView.getProgress()+10; ((TextView) findViewById(R.id.text_zaehne_hinten)).setText("" + anzahlZaehneHinten); - int trittfrequenz = trittfrequenzView.getProgress(); + int trittfrequenz = trittfrequenzView.getProgress()+40; ((TextView) findViewById(R.id.text_trittfrequenz)).setText(Integer .toString(trittfrequenz));