textview scrollbars工作但不显示



我有一个文本视图,用于显示文件集的内容,即具有滚动条,水平和垂直。它工作几乎很好(两种方式滚动),但是滚动条没有显示。波纹管是我的布局。

<?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>

android:fadeScrollbars= "false"

最新更新