<TextView
android:id="@+id/textView2"
android:layout_width="match_parent"
android:layout_column="0"
android:layout_columnSpan="6"
android:layout_gravity="right|bottom"
android:layout_row="6"
android:layout_height="match_parent"
android:textColor="#0f0f0f" />
All Values of TextView is not Visible in Android Emulator
Pregunta
I am very novice to Android and trying to show certain values into the Textview.I am testing my app in emulator.Here is my code in java..
status.setText(("PNR: "+pnr+"\n"+
"Train No: "+trainNum+"\n"+
"Train Name: "+trainName+"\n"+
"Date Of Journey: "+date+"\n"+
"From Station : "+fromname+"\n"+
"To Station : "+toname+"\n"+
"ReservationUpTo: "+uptoname+"\n"+
"Boarding Point : "+boardtoname+"\n"+
"Class : "+classvalue+"\n"+
"Chart Status : "+chartstatus+"\n"+
"No Of Passenger: "+noofpass+"\n"+
"Booking Status : "+booking_status+"\n"+
"Current Status : "+current_status+"\n"
));
But while seeing it into Emulator i am not able to see values after "ReservationUpTo:
So my question is will this be in Phone also or all values will be seen by scrolling the screen.
I wont have real android phone to test this app.sorry.
Please help me..
Here is my TextView
..
<TextView
android:id="@+id/textView2"
android:layout_width="match_parent"
android:layout_column="0"
android:layout_columnSpan="6"
android:layout_gravity="right|bottom"
android:layout_row="6"
android:textColor="#ffffff" />
Solución
Otros consejos
include your testview inside a scrollview and you should be able to view all your text by scroll even in an emulator
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<TextView
android:id="@+id/textView2"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_column="0"
android:layout_columnSpan="6"
android:layout_gravity="right|bottom"
android:layout_row="6"
android:textColor="#ffffff" />
<ScrollView/>
Add this to your xml
android:layout_height="fill_parent"
android:layout_width="wrap_content"
android:maxLines="4" // or an higher value
android:lines="4" //also here
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow