I am new to Android development. Trying to do something fairly simple - change the displayed text when the timer is ticked. Here is the potentially relevant code:
CountDownTimer currentTimer; Resources res; TextView timerText; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_exercise); res = getResources(); timerText = (TextView) findViewById(R.id.timer_text); } @Override protected void onStart() { super.onStart();
This works fine on emulated device 4.2.2, but on device 4.1.2 (both physical and emulated) the modified TextView appears as such, and the countdown continues:

If you cannot say that the numbers 5.4.3 are superimposed. Therefore, when I set a new line for TextView, a new line is displayed, but without replacing the old line. Any other text elements used in my application behave the same.
Any ideas what the problem is and how to fix it?
Edit : from XML layout file:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" tools:context=".ExerciseActivity" android:layout_width="match_parent" android:layout_height="match_parent" android:gravity="center" android:keepScreenOn="true" android:orientation="vertical" > ... <TextView android:id="@+id/timer_text" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:textIsSelectable="false" android:hint="@string/timer_default" /> ... </LinearLayout>
That all of this can make a difference.
source share