activity_simple_webview.xml 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3. xmlns:app="http://schemas.android.com/apk/res-auto"
  4. android:id="@+id/coordinator"
  5. android:layout_width="match_parent"
  6. android:layout_height="match_parent"
  7. android:background="?android:attr/colorBackground">
  8. <com.google.android.material.appbar.AppBarLayout
  9. android:id="@+id/appbar"
  10. android:layout_width="match_parent"
  11. android:layout_height="wrap_content"
  12. app:liftOnScroll="true"
  13. app:liftOnScrollTargetViewId="@+id/webview_scroller">
  14. <FrameLayout
  15. android:layout_width="match_parent"
  16. android:layout_height="wrap_content">
  17. <com.google.android.material.appbar.MaterialToolbar
  18. android:id="@+id/material_toolbar"
  19. style="@style/Threema.ToolbarStyle"
  20. android:layout_width="match_parent"
  21. android:layout_height="?attr/actionBarSize"
  22. android:background="@android:color/transparent"
  23. app:navigationIcon="?attr/homeAsUpIndicator" />
  24. <include layout="@layout/connection_indicator" />
  25. <com.google.android.material.progressindicator.LinearProgressIndicator
  26. android:id="@+id/progress"
  27. android:layout_width="match_parent"
  28. android:layout_height="2dp"
  29. android:layout_gravity="bottom"
  30. android:indeterminate="false" />
  31. </FrameLayout>
  32. </com.google.android.material.appbar.AppBarLayout>
  33. <androidx.core.widget.NestedScrollView
  34. android:id="@+id/webview_scroller"
  35. android:layout_width="match_parent"
  36. android:layout_height="match_parent"
  37. android:clipToPadding="false"
  38. android:scrollbars="vertical"
  39. app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior">
  40. <WebView
  41. android:id="@+id/simple_webview"
  42. android:layout_width="match_parent"
  43. android:layout_height="wrap_content"
  44. android:background="?android:attr/colorBackground"
  45. android:scrollbars="none" />
  46. </androidx.core.widget.NestedScrollView>
  47. </androidx.coordinatorlayout.widget.CoordinatorLayout>