Веб-просмотр внутри nestedscrollview не прокручивается при поиске следующих вызовов - PullRequest
0 голосов
/ 25 ноября 2018

Я просто делаю простое веб-приложениеКогда я нажимаю кнопку «Найти» и вызывает findNext (true), веб-просмотр не прокручивается до выделенного текста.

Он работает отлично без nestedscrollview.Что делать?

Как получить текстовую позицию с подсветкой веб-просмотра, я думаю, что затем я могу прокрутить до этой позиции, используя nestedscrollview

<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
><LinearLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="horizontal"
    ><EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/edittext"
/>
    <Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:onClick="find"
        android:text="find"
        />
    <Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:onClick="next"
        android:text="next"
        />

</LinearLayout>
<android.support.v4.widget.NestedScrollView
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <WebView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:id="@+id/webview"
        />
</android.support.v4.widget.NestedScrollView>

 public void find(View view)
{
   String s=editText.getText().toString();
   webView.findAllAsync(s);
}    public void next(View view)
{
    webView.findNext(true);
}
...