@@ -420,7 +420,15 @@ public void onClick(View view) {
420420 seekBar .setOnSeekChangeListener (new IndicatorSeekBar .OnSeekBarChangeListener () {
421421 @ Override
422422 public void onProgressChanged (IndicatorSeekBar seekBar , int progress , float progressFloat , boolean fromUserTouch ) {
423- String valueText = progress + " " + unit ;
423+ String valueText ;
424+ switch (unit ) {
425+ case "\u00b0 " :
426+ valueText = progress + unit ;
427+ break ;
428+ default :
429+ valueText = progress + " " + unit ;
430+ }
431+
424432 if (waveMonSelected ) {
425433 waveMonPropValueSelect .setText (valueText );
426434 } else {
@@ -813,7 +821,14 @@ private void toggleDigitalMode(WaveConst mode) {
813821
814822 private void fetchPropertyValue (WaveConst btnActive , WaveConst property , String unit , TextView propTextView ) {
815823 Double value = (double ) WaveGeneratorCommon .wave .get (btnActive ).get (property );
816- String valueText = value .intValue () + " " + unit ;
824+ String valueText ;
825+ switch (unit ) {
826+ case "\u00b0 " :
827+ valueText = value .intValue () + unit ;
828+ break ;
829+ default :
830+ valueText = value .intValue () + " " + unit ;
831+ }
817832 propTextView .setText (valueText );
818833 }
819834
@@ -908,7 +923,14 @@ private void setValue() {
908923 setWave ();
909924 previewWave ();
910925 Double dValue = (double ) value ;
911- String valueText = String .valueOf (dValue .intValue ()) + " " + unit ;
926+ String valueText ;
927+ switch (unit ) {
928+ case "\u00b0 " :
929+ valueText = String .valueOf (dValue .intValue ()) + unit ;
930+ break ;
931+ default :
932+ valueText = String .valueOf (dValue .intValue ()) + " " + unit ;
933+ }
912934 activePropTv .setText (valueText );
913935 }
914936
0 commit comments