0

I have some content at relative layout, and clickable imageview which hide/show textview with link and relative layout with content. I have such problem: when a person doesn't hide text and relative layout my webview below this content can be scrolled up and down easily, but when the person hide the content above webview can be scrolled only down and can't be scrolled up. I saw this question, but my webview match parent and it can't cause any problem I think. Maybe I have some problem in another place?

Here is my xml template:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:id="@+id/jobViewLayout"
android:layout_height="match_parent"
android:background="@color/white"
android:orientation="vertical">


<com.google.android.material.appbar.AppBarLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content">

    <androidx.appcompat.widget.Toolbar
        android:id="@+id/toolbar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:subtitleTextAppearance="@style/Toolbar.SubtitleText"
        app:titleTextAppearance="@style/Toolbar.TitleText" />

</com.google.android.material.appbar.AppBarLayout>

<RelativeLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginStart="7dp"
    android:layout_marginTop="7dp"
    android:layout_marginEnd="7dp"
    android:layout_marginBottom="3.5dp"
    android:background="@drawable/old_item">


    <TextView
        android:id="@+id/job_link"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_below="@id/content_layout"
        android:layout_marginStart="10dp"
        android:layout_marginTop="5dp"
        android:layout_marginEnd="54dp"
        android:ellipsize="end"
        android:singleLine="true"
        android:textColor="@color/gray" />

    <ImageView
        android:id="@+id/hide_content"
        android:layout_width="24dp"
        android:layout_height="24dp"
        android:layout_below="@id/content_layout"
        android:layout_alignParentEnd="true"
        android:layout_marginTop="5dp"
        android:layout_marginEnd="10dp"
        android:src="@drawable/ic_up_arrow"
        android:contentDescription="hide btn" />

</RelativeLayout>


<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
    android:id="@+id/swipeContainer"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_marginStart="7dp"
    android:layout_marginTop="3.5dp"
    android:layout_marginEnd="7dp"
    android:layout_marginBottom="7dp"
    android:labelFor="@id/swipeContainer"
    android:background="@color/white"
    app:layout_behavior="@string/appbar_scrolling_view_behavior">

    <my_package.jobAGENT.adapters.LollipopFixedWebView
        android:id="@+id/webView"
        android:labelFor="@id/webView"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />

</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>

Andrew
  • 1,947
  • 2
  • 23
  • 61

1 Answers1

0

why are you using that <de.jobnetzwerk.jobnet.jobAGENT.adapters.LollipopFixedWebView/>

use WebView instead and it will work fine

<WebView
    android:id="@+id/webView"
    android:layout_width="match_parent"
    android:layout_height="match_parent" />
Jawad Malik
  • 608
  • 5
  • 21