Android scrollview删除蓝灯 [英] Android scrollview remove blue light

查看:124
本文介绍了Android scrollview删除蓝灯的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当您使用滚动视图在Android上滚动时,它会向您滚动的方向生成蓝灯。如何删除蓝灯?

When you scroll on Android using scrollview, it generates a blue light the direction you are scrolling in. How would I remove the blue light?

我的清单:


<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/sobreScrollView"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:cacheColorHint="@android:color/transparent"
android:scrollingCache="false" 
android:fadingEdge="none"
android:fadingEdgeLength="0dp"
android:scrollbars="none"
android:scrollbarStyle="insideOverlay"  
    >    

    <LinearLayout
        android:id="@+id/contentSobre"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:orientation="vertical" >

Java源代码:

package com.my.app.section;
import android.content.Context;
import android.util.AttributeSet; 
import com.my.app.BaseSection; 
import com.my.app.R;

public class SobreSection extends BaseSection {

public SobreSection(Context context, AttributeSet attrs, int defStyle) {
    super(context, attrs, defStyle);
}

public SobreSection(Context context, AttributeSet attrs) {
    super(context, attrs);
}

public SobreSection(Context context) {
    super(context);
}

@Override
protected void onFinishInflate() {
    // TODO Auto-generated method stub
    super.onFinishInflate();

    findViewById(R.id.sobreScrollView).setVerticalFadingEdgeEnabled(false);
    findViewById(R.id.sobreScrollView).setVerticalScrollBarEnabled(false);

}
  }


推荐答案

尝试将此添加到layout.xml中的ScrollView:

Try adding this to your ScrollView in your layout.xml:

android:overScrollMode="never"  

或将其添加到您的代码中:

or add this to your code:

findViewById(R.id.sobreScrollView).setOverScrollMode(ScrollView.OVER_SCROLL_NEV‌​ER);

这篇关于Android scrollview删除蓝灯的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆