(가로로 스크롤 할 때 다른 내용을 맨 위에 놓을 목적으로) 내 TextView에서 세로 스크롤을 사용하도록 설정했는데 세로 스크롤은 텍스트가있을 때만 작동합니다. TextView의 데이터 링크. URL/이메일/etc가 없으면 세로 스크롤이 작동하지 않습니다.링크가없는 한 TextView가 수직으로 스크롤되지 않습니다.
세로 스크롤 막대는 잘못된 스크롤 위치를보고합니다.보기에서 100 % 스크롤 한 경우 화면의 최대 5 %로 이동합니다.
<?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>
를 추가 세부 사항으로 :
다음은이 이상한 행동을주는 문제가되는 문제 XML 레이아웃, 그리고 newsreader_message 내가 제대로 스크롤 할 수 있도록하고 싶습니다 하나입니다 , 수직 스크롤링이 깨지면 (또한 선택 문자를 스크롤해야하는 경우) 스크롤 문자가 스크롤되지 않습니다. 텍스트 뷰의
나는 @ + id/newsreader_message와 @ + id/scrollView1의 layout_width를 변경하려고 시도했지만 도움이되지 않았다. – Vadi
한 번 layout_width = "yourscreenresloution + 50"으로 설정하고 layout_width = "500dp"라고 말하면 –
시도하고 싶지 않습니다. 화면 해상도가 바뀔 수 있습니다 ... 적절한 해결책처럼 보이지 않습니다. – Vadi