Hide scroll bar in android app
See original GitHub issueDiscussed in https://github.com/ionic-team/capacitor/discussions/5416
<div type='discussions-op-text'>Originally posted by mohammad0-0ahmad February 8, 2022 Hello!
I’ve tried to hide the scroll bar in Android app that is created by using capacitor and next.js and I couldn’t do so in web source code. I ended up to modify @capacitor\android\capacitor\src\main\java\com\getcapacitor\CapacitorWebView.java file by adding the following line inside constructure function:
public CapacitorWebView(Context context, AttributeSet attrs) {
super(context, attrs);
+ setVerticalScrollBarEnabled(false);
}
That line could hide the scrollbar but I wonder if I can hide it from my source code instead because I couldn’t find a solution for that in the docs.
Best regardes.
</div>Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
android - Hide scrollbar in ScrollView - Stack Overflow
The above lines of codes will work if you want to hide the scrollbar without disabling it. And for disabling a scrollbar, write...
Read more >Hide Scrollbar from Android Views - Code2care
Hide Scrollbar from Android Views ... If you have scroll element on your Android Intent like HorizontalScrollView, TextView or elements inside ...
Read more >how to remove scrollbar on webview android - YouTube
how to hide scrollbar in webview android, how to remove scrollbar on webview android,webview scrollbar hide,webview scrollbar remove, hide ...
Read more >Hide Scrollbar In ScrollView And RecyclerView | Android Java
saweria : https://saweria.co/aldybelajar======ORIGINAL SONG======Departure by Ghostrifter Official ...
Read more >ScrollView - Android Developers
Position the scroll bar at the default position as determined by the system. ... Hide the system bars instead if the application needs...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You can create a plugin and put this code in the load method
Or without a plugin you can put this code in the MainActivity.java
It’s CSS and it should work on any device, unless the CapacitorJS team does something weird with their custom web browser.
I’m not sure about that. But I think you should try it.
Note that the code above create
hide-scroll-bar
class and you need to add this class to the element you want the scroll bars to be hidden. If you want to hide scroll bars for entire app, using*
selector instead.