Back to project page Joetz-Android-V2.
The source code is released under:
GNU General Public License
If you think the Android project Joetz-Android-V2 listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.example.jens.myapplication.util; // ww w .j a v a2 s . c om import android.widget.EditText; /** * Created by Sam on 20/11/2014. */ public class BindingUtils { /** * Help method for filling view and setting disabled when a checkbox is checked and vice versa * when unchecked * @param view * @param value */ public static void fillViewOnCheck(EditText view, Object value, boolean isChecked){ if(value == null){ return; } if(value instanceof String && ((String) value).isEmpty()){ return; } if(isChecked){ view.setText(value.toString()); view.setEnabled(false); }else{ view.setText(""); view.setEnabled(true); } } }