Here is the code;
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/bghome" >
<TableRow>
<TextView
android:id="@+id/TextTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:layout_marginTop="10dp"
android:gravity="center"
android:text="Wrocław"
android:textColor="#FFFFFF"
android:textSize="20dp" />
</TableRow>
<TableRow>
<ScrollView
android:layout_width="fill_parent"
android:layout_height="400dp"
android:layout_marginLeft="10dp" >
<TextView
android:id="@+id/TextMain"
android:layout_width="300dp"
android:layout_height="400dp"
android:layout_gravity="center_vertical|right"
android:text="Ładowanie danych..." >
</TextView>
</ScrollView>
</TableRow>
</TableLayout>
Now. When I put quite long text in the TextView (inside scrollable view). I get distortion problem. Top of the text gets cut down. (Goal is to create a title and below it a scrollable container for html text from serwer – a html code).
Id doesn’t matter is I put html string on plain string, or I get data from serwer or hardcode it. I tried every combination, and I can’t crack it.
MainText.setText(Html.fromHtml(Plain_str));
MainText.setText(Plain_str);
MainText.setText(Plain_str.toString());
Nothing helps.
Problem is in this line: android:layout_gravity=”center_vertical|right”