I am a just a beginner to Android Studio and have started as a hobby, and to learn it's basics I have tried to make a simple calculator in Android Studio(Kotlin).
The problem is that if the answer is to long to be diplayed in the text view box it cuts out...So to solve this problem I made the text view Horizontally Scrollable using "Horizontal Scroll View" in the xml File,
But now the problem is when the user types the text after the view is full, it does not automatically scroll to the last digit he has typed, rather he/she has to manually scroll it to the end. Here is the code for the text box which displays the result:
<HorizontalScrollView
android:id="@+id/horizontalScrollView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
<TextView
android:id="@+id/tvExpression"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#1C1C1C"
android:textColor="#FFFFFF"
android:textSize="27dp"
</HorizontalScrollView>`
Could you please tell a way so that each time a new value is added to the box, it automatically scrolls to the right most part of the box, so that the users can see his/her last inputted value?
Please Help me!
Thanks,
Shaurya