2013-01-07 2 views
20

スクロールビューを使用してAndroidをスクロールすると、スクロールしている方向が青色に点灯します。青色のライトを削除するにはどうすればよいですか?Android scrollview青色のライトを削除する

私のマニフェスト:

<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); 

} 
    } 
+0

、より正確なあなたの問題を説明し、あなたが青のオーバーレイをしたいですか、あなたはしたくないしてくださいそれ? – bricklore

+0

私はscrollviewの終わりで転がるとき、私はこの行 \tで複数のマーカーを返す – Nagi

答えて

67

あなたlayout.xmlであなたのScrollViewにこれを追加してみてください:

android:overScrollMode="never" 

またはあなたのコードにこれを追加します。

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

青色光を望んでいない - それをSRY、Viewは、変数 – Nagi

+0

おっとに解決することはできません - OVER_SCROLL_NEVERは解決できないか、 \tフィールドではありませんすることができます'ScrollView.OVER_SCROLL_NEVER' :) – bricklore

+1

これは(少なくともXML版ですが)' viewPager'でもうまくいきます! – Timmiej93

9

あなたScrollView定義にこの余分な行を追加します。

<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" 
    android:id="@+id/sobreScrollView" 
    ... 
    android:overScrollMode="never"> 
+0

返品エラー:パッケージ 'android'の属性 'overScrollMode'のリソース識別子が見つかりません – Nagi

+0

APIレベル9で追加されました。したがって、現在使用しているものよりも新しいSDK(9以上)を使用する必要があります。 – nmw

関連する問題