TextViewで垂直スクロールを有効にしています(水平スクロール時に他のコンテンツを上に残すため)。 TextViewのデータ内のリンク。 URL /電子メール/ etcがない場合、垂直スクロールは機能しません。リンクがない限り、TextViewは垂直方向にスクロールしません。
垂直スクロールバーが正しく表示されない場合は、スクロール位置が正しく表示されません。ビューで100%スクロールすると、画面の最大5%になります。
ここでは、この奇妙な振る舞いを与える問題の問題のxmlレイアウトだ、とnewsreader_messageは私が適切にスクロールできるようにしたいと思いますいずれかになります。追加の詳細情報として
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/LinearLayout1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<TextView
android:id="@+id/newsreader_subjectdate"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="marquee"
android:focusable="true"
android:focusableInTouchMode="true"
android:marqueeRepeatLimit="1"
android:scrollHorizontally="true"
android:text=""
android:textAppearance="?android:attr/textAppearanceSmall" />
<TextView
android:id="@+id/newsreader_fromto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="marquee"
android:focusable="true"
android:focusableInTouchMode="true"
android:marqueeRepeatLimit="1"
android:scrollHorizontally="true"
android:text=""
android:textAppearance="?android:attr/textAppearanceSmall" />
<ScrollView
android:id="@+id/scrollView1"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<TextView
android:id="@+id/newsreader_message"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:autoLink="web|email"
android:contentDescription="News post content"
android:keepScreenOn="true"
android:paddingRight="10dp"
android:paddingTop="6dp"
android:scrollHorizontally="true"
android:scrollbars="horizontal|vertical"
android:text=""
android:textSize="11.5sp"
android:typeface="monospace" />
</ScrollView>
垂直スクロールが壊れている場合(およびマーキーがスクロールする必要がある場合も)、マーキーはスクロールしません。 TextViewの
私は@ + id/newsreader_messageと@ + id/scrollView1のlayout_widthのどちらかを変更しようとしましたが、それは役に立たなかった。 – Vadi
once once layout_width = "yourscreenresloution + 50"、つまりlayout_width = "500dp"としてみてください。 –
私はそうしたくありません。画面の解像度が変わる可能性があります。 – Vadi