0
我有一个Textview用于显示文件的内容设置为同时具有水平和垂直滚动条。它工作得很好(双向滚动),但滚动条没有显示。波纹管是我的布局。android-textview滚动条工作但没有显示
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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"
android:orientation="vertical"
tools:context="com.example.luis.autorecreation_1.ShowXMLNotesFile">
<TextView
android:id="@+id/tvFileName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:text="notes.xml"
android:textAllCaps="true"
android:textColor="@android:color/black"
android:textSize="24sp"
android:textStyle="bold" />
<Button
android:id="@+id/btnBack_ShowXMLNotesFile"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/back_button_text" />
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<HorizontalScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true"
android:scrollbarThumbHorizontal="@drawable/h_scrollbar_style"
android:scrollbarThumbVertical="@drawable/v_scrollbar_style"
tools:scrollbarThumbHorizontal="@drawable/h_scrollbar_style">
<TextView
android:id="@+id/tvXML"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:isScrollContainer="true"
android:scrollHorizontally="true"
android:scrollbarAlwaysDrawHorizontalTrack="true"
android:scrollbarAlwaysDrawVerticalTrack="true"
android:scrollbarFadeDuration="0"
android:scrollbarThumbHorizontal="@drawable/h_scrollbar_style"
android:scrollbarThumbVertical="@drawable/v_scrollbar_style"
android:scrollbars="horizontal|vertical"
android:text="tvXMLFile" />
</HorizontalScrollView>
</ScrollView>
机器人:fadeScrollbars = “假” – zombie