Skip to content

Fix webview height and other bugs #191

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ class FinestWebViewActivity : AppCompatActivity(), AppBarLayout.OnOffsetChangedL
rtl = if (finestWebView.rtl != null) finestWebView.rtl!! else resources.getBoolean(R.bool.is_right_to_left)
statusBarColor = if (finestWebView.statusBarColor != null) finestWebView.statusBarColor!! else colorPrimaryDark
toolbarColor = if (finestWebView.toolbarColor != null) finestWebView.toolbarColor!! else colorPrimary
toolbarScrollFlags = if (finestWebView.toolbarScrollFlags != null) finestWebView.toolbarScrollFlags!! else AppBarLayout.LayoutParams.SCROLL_FLAG_SCROLL or AppBarLayout.LayoutParams.SCROLL_FLAG_ENTER_ALWAYS
toolbarScrollFlags = if (finestWebView.toolbarScrollFlags != null) finestWebView.toolbarScrollFlags!! else AppBarLayout.LayoutParams.SCROLL_FLAG_ENTER_ALWAYS
iconDefaultColor = if (finestWebView.iconDefaultColor != null) finestWebView.iconDefaultColor!! else colorAccent
iconDisabledColor = if (finestWebView.iconDisabledColor != null) finestWebView.iconDisabledColor!! else disableColor(iconDefaultColor)
iconPressedColor = if (finestWebView.iconPressedColor != null) finestWebView.iconPressedColor!! else iconDefaultColor
Expand All @@ -256,7 +256,7 @@ class FinestWebViewActivity : AppCompatActivity(), AppBarLayout.OnOffsetChangedL
disableIconForward = if (finestWebView.disableIconForward != null) finestWebView.disableIconForward!! else false
showIconMenu = if (finestWebView.showIconMenu != null) finestWebView.showIconMenu!! else true
disableIconMenu = if (finestWebView.disableIconMenu != null) finestWebView.disableIconMenu!! else false
showSwipeRefreshLayout = if (finestWebView.showSwipeRefreshLayout != null) finestWebView.showSwipeRefreshLayout!! else true
showSwipeRefreshLayout = if (finestWebView.showSwipeRefreshLayout != null) finestWebView.showSwipeRefreshLayout!! else false
swipeRefreshColor = if (finestWebView.swipeRefreshColor != null) finestWebView.swipeRefreshColor!! else colorAccent
if (finestWebView.swipeRefreshColors != null) {
val colors = IntArray(finestWebView.swipeRefreshColors!!.size)
Expand Down Expand Up @@ -1079,4 +1079,4 @@ class FinestWebViewActivity : AppCompatActivity(), AppBarLayout.OnOffsetChangedL
onPageCommitVisible(this@FinestWebViewActivity, key, url)
}
}
}
}
13 changes: 4 additions & 9 deletions library/src/main/res/layout/finest_web_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,11 @@
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior">

<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">

<FrameLayout
android:id="@+id/webLayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<FrameLayout
android:id="@+id/webLayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>

</androidx.core.widget.NestedScrollView>
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>

<com.google.android.material.appbar.AppBarLayout
Expand Down