samedi 28 novembre 2015

Enable certain feature on checkbox checked android

This is my first question so please bear it! Okay, I'm working on an android app with multiple activities and these activities use WebView (every activity uses webview instead of the main and settings.) I want to implement a function in all of activities which contains webview. Basically I want to implement a function (Options menu) which will be displayed when the user scrolls from right to left (the webview fills all the screen so user will scroll from right to left on webview). I found how to implement this function in my app thanks to the second answer here but I want to enable this option only when the checkbox (which I want to put in the Settings activity) is checked. So if the checkbox (call it check_left_to_right) is checked: the left to right feature to open option menu is enabled (I'm hiding the actionbar in all webview activities so I will create the list view which will be on visibility.GONE by default. Let's call it option_list). When checkbox isn't checked: left to right swipe to open options listview is disabled. The problem is that I don't know how to implement it so that this checkbox feature will control the scroll feature to be enabled or disabled. Please provide a detailed answer because I'm new to Programming (not n00b ;)). Thanks




Aucun commentaire:

Enregistrer un commentaire