How to Hide ActionBar/Toolbar While Scrolling Down in Webview

You can do this without any Java code using the design library’s CoordinatorLayout and NestedScrollView, with app:layout_scrollFlags set on Toolbar. Here’s how you do it. <android.support.design.widget.CoordinatorLayout xmlns:android=”http://schemas.android.com/apk/res/android” xmlns:app=”http://schemas.android.com/apk/res-auto” android:layout_width=”match_parent” android:layout_height=”match_parent”> <android.support.design.widget.AppBarLayout android:id=”@+id/appbar” android:layout_width=”match_parent” android:layout_height=”wrap_content” android:theme=”@style/ThemeOverlay.AppCompat.Dark.ActionBar”> <android.support.v7.widget.Toolbar android:id=”@+id/toolbar” android:layout_width=”match_parent” android:layout_height=”?attr/actionBarSize” android:background=”?attr/colorPrimary” app:layout_scrollFlags=”scroll|enterAlways” app:popupTheme=”@style/ThemeOverlay.AppCompat.Light” /> </android.support.design.widget.AppBarLayout> <android.support.v4.widget.NestedScrollView xmlns:android=”http://schemas.android.com/apk/res/android” xmlns:app=”http://schemas.android.com/apk/res-auto” android:layout_width=”match_parent” android:layout_height=”match_parent” android:layout_gravity=”fill_vertical” android:fillViewport=”true” app:layout_behavior=”@string/appbar_scrolling_view_behavior”> <WebView android:id=”@+id/webview” android:layout_width=”match_parent” … Read more

Recyclerview inside ScrollView not scrolling smoothly

Try doing: RecyclerView v = (RecyclerView) findViewById(…); v.setNestedScrollingEnabled(false); As an alternative, you can modify your layout using the support design library. I guess your current layout is something like: <ScrollView > <LinearLayout > <View > <!– upper content –> <RecyclerView > <!– with custom layoutmanager –> </LinearLayout > </ScrollView > You can modify that to: … Read more

Disable scrolling in webview?

Here is my code for disabling all scrolling in webview: // disable scroll on touch webview.setOnTouchListener(new View.OnTouchListener() { @Override public boolean onTouch(View v, MotionEvent event) { return (event.getAction() == MotionEvent.ACTION_MOVE); } }); To only hide the scrollbars, but not disable scrolling: WebView.setVerticalScrollBarEnabled(false); WebView.setHorizontalScrollBarEnabled(false); or you can try using single column layout but this only works … Read more