简体   繁体   English

如何在Android Studio预览中查看ScrollView的不可见面?

[英]How to see ScrollView's invisible side at Android Studio Preview?

在此处输入图片说明

I want to see that side in the android studio. 我想在android studio中看到这一面。

Is there any option to see that side? 有看到那边的任何选择吗?

在此处输入图片说明

and, when LinearLayout reaches that invisible side, suddenly that shadow appears. 并且,当LinearLayout到达该不可见的一侧时,突然出现了阴影。

how to fix that? 如何解决?

try this you can use android:scrollbars="none" to disable scrolling stick; 试试这个,您可以使用android:scrollbars="none"禁用滚动条;

 <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="fill_parent"
  android:layout_height="fill_parent"
  android:id="@+id/mainScroll"
  android:scrollbars="none" 
 />

or set it programatically like this 或像这样以编程方式设置

ScrollView.setVerticalScrollBarEnabled(false);
ScrollView.setHorizontalScrollBarEnabled(false);

or to disable blue shadow while scrolling use this in xml of scrollview 或在滚动时禁用蓝色阴影,请在scrollview的xml中使用它

android:overScrollMode="never"

or use this to change blue shadow while scrolling use this in xml of scrollview 或者在滚动时使用它来更改蓝色阴影,在scrollview的xml中使用它

android:cacheColorHint="#ff00"

Use below code for disable scrolling stick; 使用以下代码禁用滚动条;

<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
 android:layout_width="fill_parent"
 android:layout_height="fill_parent"
 android:id="@+id/mainScroll"
 android:scrollbars="none" <!-- line to be added -->
 />

in java add this code 在java中添加此代码

myScrollView.setVerticalScrollBarEnabled(false);
myScrollView.setHorizontalScrollBarEnabled(false);

in xml add following attribute to your ScrollView 在xml中将以下属性添加到ScrollView

android:scrollbars="none"

Like this 像这样

<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/mainScroll"
android:scrollbars="none" <!-- Add this line -->
>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM