У меня проблемы с моими макетами в моем приложении. После изменения текста TextView (динамически) до некоторого длинного текста он накладывает мой TableLayout. Надеюсь, вы можете помочь мне определить, как перемещать TableLayout в видимый диапазон.Layout overlaying another layout после динамического изменения
UPD. Мой плохой, что я не определил, какой TextView я изменил. Это TextView над TableLayout с id = textView.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="com.example.home.myapp1.MainActivity"
android:orientation="vertical">
<TextView
android:id="@+id/textView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scrollbars="vertical"
android:text="Hello world!"
android:singleLine="false"/>
<TableLayout android:layout_marginTop="10dp"
android:id="@+id/table"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:stretchColumns="*">
<TableRow android:padding="5dp">
<TextView android:text="Валюта" android:gravity="center_horizontal"/>
<TextView android:text="Покупка" android:gravity="center_horizontal"/>
<TextView android:text="Продажа" android:gravity="center_horizontal"/>
</TableRow>
</TableLayout>
</LinearLayout>
Я меняющийся TextView выше TableLayout –
мне не нужно ограничивать MaxLines из TextView, наоборот мне нужно отобразить весь текст TextView, но всякий раз, когда он превышает 1 строку, он накладывает вид снизу, поэтому мне нужно решение для перемещения этого наложенного вида в видимый диапазон в моей Activity. –
Вы можете взять андроид: maxLength = "20" Вместо максимальных строк Исправить диапазон –