में समस्या स्क्रॉलिंग वेबव्यू मैंने अपने एंड्रॉइड ऐप में Toolbar
, Tablayout
और Viewpager
जोड़ा। वहाँ तीन Tabs
TabLayout
में जिनमें से प्रत्येक एक WebView
चलता कर रहे हैं। मैं छिपा/Toolbar
दिखाने के उपयोगकर्ता स्क्रॉल नीचे/ऊपर जब WebView
में करने के लिए एक NestedScrollView
में WebView
रखा। Toolbar
Android 3.0 या अधिक में छिपा है। लेकिन दुर्भाग्य से एंड्रॉयड 2.3 या उससे कम WebView
पहली बार में स्क्रॉल नहीं करता है। मैं एक और टैब पर स्वाइप करना पड़ और जब मैं वापस पहले Tab
के लिए आते हैं फिर WebView
स्क्रॉल शुरू होता है।NestedScrollView एंड्रॉइड 2.3 या उससे कम
मैं क्या करना चाहते हैं?
मुझे लगता है कि WebView
किसी भी समस्या के बिना Android 2.3
या उससे कम में स्क्रॉल करना चाहिए। https://github.com/ksoichiro/Android-ObservableScrollView यह एक एपीआई से काम करता है 9+:
मेरे WebView
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.NestedScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:isScrollContainer="false"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingTop="1dp">
<WebView
android:id="@+id/webviewtool"
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:numColumns="1"
android:scrollbars="none"
android:focusableInTouchMode="false"
android:focusable="false"
android:background="#FFFFFF" />
</LinearLayout>
</android.support.v4.widget.NestedScrollView>