May 26, 2014 Replies: 4 Subname: None Description: The android.view.View class has a method setClickable which determines whether or not the view responds to being clicked. The android.view.View class is the parent of most (if not all) of the UI objects we use, it's methods are inherited by it's children which means we can use it's methods on most of our UI objects. Using this method via JavaObject, we can set a Checkbox (and other views) so that it does not respond to clicks, and therefore behaves as an indicator. It can still be changed via code. Code: Copy Dim cbJO As JavaObject = Checkbox1 cbJO.RunMethod("setClickable",Array As Object(False)) Sets Checkbox1 as non-clickable. Depends on: JavaObject Tags: Checkbox, View, Clickable Last edited: May 26, 2014 Click to expand...
Subname: None Description: The android.view.View class has a method setClickable which determines whether or not the view responds to being clicked. The android.view.View class is the parent of most (if not all) of the UI objects we use, it's methods are inherited by it's children which means we can use it's methods on most of our UI objects. Using this method via JavaObject, we can set a Checkbox (and other views) so that it does not respond to clicks, and therefore behaves as an indicator. It can still be changed via code. Code: Copy Dim cbJO As JavaObject = Checkbox1 cbJO.RunMethod("setClickable",Array As Object(False)) Sets Checkbox1 as non-clickable. Depends on: JavaObject Tags: Checkbox, View, Clickable
LucaMs Expert Licensed User Longtime User May 26, 2014 #2 As if to say: set ReadOnly, instead Enabled = false changes its appearance. I like it. Thanks, Steve.
As if to say: set ReadOnly, instead Enabled = false changes its appearance. I like it. Thanks, Steve.
woniol Active Member Licensed User Longtime User Jun 3, 2014 #3 Isn't it the same as: Check.Initialize("") and Check.Enabled = false
stevel05 Expert Licensed User Longtime User Jun 3, 2014 #4 Not quite, enabled = false will show the disabled image from the views state list drawable if it has one. Last edited: Jun 3, 2014
Not quite, enabled = false will show the disabled image from the views state list drawable if it has one.