Here is the text view:
<TextView
android:id="@+id/input"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="#000000"
android:gravity="right"
android:textAlignment="viewEnd"
android:textColor="#ffffff"
android:textSize="50sp"/>
I'm using :
String inputStr = doubleToString(result);
input.setText(inputStr);
The TextView
simply expands by more lines to fit large numbers (now string). I guess that's because I have used WRAP_CONTENT
as height but I can't use FILL_PARENT
.
If I use android:lines="1"
then I simply can't see all the numbers.
So how do I convert the double into scientific notation before displaying in the TextView
?
Edit
I just discovered that it is being displayed in scientific notation but only for values greater than 10^12 But they're not just visible.
So i just it to display for values greater than 1E10.