WebView WebView1 = (WebView) findViewById(R.id.webView1);
//Only hide the scrollbar, not disables the scrolling:
WebView1.setVerticalScrollBarEnabled(false);
WebView1.setHorizontalScrollBarEnabled(false);
//Only disabled the horizontal scrolling:
WebView1.getSettings().setLayoutAlgorithm(LayoutAlgorithm.SINGLE_COLUMN);
//To disabled the horizontal and vertical scrolling:
webview.setOnTouchListener(new View.OnTouchListener() {
public boolean onTouch(View v, MotionEvent event) {
return (event.getAction() == MotionEvent.ACTION_MOVE);
}
});
//Only hide the scrollbar, not disables the scrolling:
WebView1.setVerticalScrollBarEnabled(false);
WebView1.setHorizontalScrollBarEnabled(false);
//Only disabled the horizontal scrolling:
WebView1.getSettings().setLayoutAlgorithm(LayoutAlgorithm.SINGLE_COLUMN);
//To disabled the horizontal and vertical scrolling:
webview.setOnTouchListener(new View.OnTouchListener() {
public boolean onTouch(View v, MotionEvent event) {
return (event.getAction() == MotionEvent.ACTION_MOVE);
}
});
'Android' 카테고리의 다른 글
emulator: panic: broken avd system path. check your android_sdk_root value [d:\android\sdk] (0) | 2020.11.13 |
---|---|
android ACTION_CALL 전화바로 걸기 구현 (0) | 2016.09.12 |
Android Chat Bubble (0) | 2016.07.06 |
[android] 나인패치(9patch) (0) | 2016.07.05 |
Activity 생성시에 사용되는 Intent Flag 정리 (2) | 2016.06.08 |