Android, Gray out seek bars unless radio button is selected

南楼画角 提交于 2019-12-13 03:38:24

问题


I'm restricting user to either select default audio profiles or customized audio setting, for this purpose I'm using radio button for profiles and customized audio settings, so if user select customized settings all seek bars are reactive for use, Is there any way to do this, also numbers at seek bars


回答1:


Are you using a SeekBar ? If that's so, you may want to set the enabled attribute to false by default :

android:enabled="false" 

so that, when your RadioButton is checked, you set the attribute to true programmatically

yourButton.setEnabled(true);


来源:https://stackoverflow.com/questions/31906439/android-gray-out-seek-bars-unless-radio-button-is-selected

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!