私はscrollviewを使用して、その中にラップされたtextviewをスクロール可能にしようとしています。Scrollviewランドスケープモードでtextviewテキストを隠す
私は、グリッドレイアウトを使用して、私がする必要があるとして、スクロールビュー(大見出しの下のテキスト)に包まれ、特に長いテキストブロックを、アイテムを配置することができていています。
はしかし、回転時に、長いテキストブロックは完全に消え、私はそれが見えるように、それを上にスクロール維持する必要があります。ランドスケープモードでは、予想どおりに表示する必要があります。これは私のXMLである
landscape mode, now visible after swiping up
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<include layout="@layout/toolbar" android:id="@+id/toolbar"/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:scaleType="centerCrop"
android:adjustViewBounds="true"
android:layout_marginTop="20dp"
android:id="@+id/articlesummaryimageview"
android:layout_below="@id/toolbar"
android:layout_centerHorizontal="true"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/articlesummaryheadingtextview"
android:layout_below="@id/articlesummaryimageview"
android:layout_centerHorizontal="true"
android:textSize="26dp"
android:textStyle="bold"
android:textAlignment="center"
android:layout_marginTop="20dp"
/>
<ScrollView
android:layout_width="match_parent"
android:layout_height="50dp"
android:id="@+id/articlesummaryscreenscrollview"
android:layout_below="@id/articlesummaryheadingtextview"
android:fillViewport="false"
android:layout_above="@+id/showfullarticlebutton"
>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/articlesummarytextview"
android:textSize="18dp"
android:textAlignment="center"
android:padding="5dp"
/>
</ScrollView>
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/showfullarticlebutton"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:textSize="18dp"
android:text="Full Article"
style="@style/AlertDialog.AppCompat.Light"
/>
</RelativeLayout>
あなたが