i want to display a string in a multiline EditText. Currently, the string displays as….
Receive: 0 coin(s) Total
Cost: $100
I want want it to display as…
Receive: 0 coin(s)
Total Cost: $10
This is my code, I have tried to use “\n”, but to no avail…
result.setText("Receive:"+ " "+ df.format(rawounces)+"coin(s)" + "\n"
+ "Total Cost:$" + df.format(transactionandpremium*rawounces));
Thank you in advance.
You can use the
android:minLines="3"for display the multiline in edittext.and for display cursor on the top of the edittext you can use like
android:gravity="top."