android - InApp-Browser: Actionbar overlaps WebView content -


my problem actionbar overlaps webview content here:

enter image description here

to compare, should instagram logo: https://www.instagram.com/about/us/


this activity_browser.xml of inappbrowser open external webview content:

<?xml version="1.0" encoding="utf-8"?> <android.support.design.widget.coordinatorlayout xmlns:android="http://schemas.android.com/apk/res/android"     xmlns:app="http://schemas.android.com/apk/res-auto"     xmlns:tools="http://schemas.android.com/tools"     android:id="@+id/main_content"     android:layout_width="match_parent"     android:layout_height="match_parent"     android:background="@android:color/white"     android:fitssystemwindows="true"     tools:context=".inappbrowser">      <android.support.design.widget.appbarlayout         android:layout_width="match_parent"         android:layout_height="wrap_content"         android:theme="@style/apptheme.appbaroverlay">          <android.support.v7.widget.toolbar             android:id="@+id/toolbar"             android:layout_width="match_parent"             android:layout_height="?attr/actionbarsize"             android:background="?attr/colorprimarydark"             app:popuptheme="@style/apptheme.popupoverlay" />      </android.support.design.widget.appbarlayout>      <webview         android:id="@+id/webview"         android:layout_width="match_parent"         android:layout_height="match_parent" />      <progressbar         android:id="@+id/progressbar"         style="@style/widget.appcompat.progressbar.horizontal"         android:layout_width="match_parent"         android:layout_height="wrap_content"         android:layout_margintop="-7dp"         android:indeterminate="true"         android:visibility="gone"         app:layout_behavior="@string/appbar_scrolling_view_behavior" />  </android.support.design.widget.coordinatorlayout> 

the actionbar overlaps webview, webview content seems start actionbar starts.

i tried wrap appbarlayout, webview , progressbar inside additonal relativelayout didn't work either.

i appreciate suggestions.

i've added

android:layout_margintop="?attr/actionbarsize" 

to webview, visually works since set margin offset same size actionbar, think more of hacky solution, still appreciate other solutions/suggestions.


Comments

Popular posts from this blog

php - Permission denied. Laravel linux server -

google bigquery - Delta between query execution time and Java query call to finish -

python - Pandas two dataframes multiplication? -