title: change android:enabled="true" programmatically
body: <p>At first start, my app set preferences to "true" about checkboxpreference. Now I need to set this value (android:enabled="true") or false programmatically. Any idea?</p>
  
  <pre><code>protected void checkLicense(){
          PackageManager manager = getPackageManager();
          if (manager.checkSignatures("core.package.name", "key.package.name")
              == PackageManager.SIGNATURE_MATCH) {
              //full version
              isEnabled = true;
              Toast.makeText(this, "pro", Toast.LENGTH_LONG).show();
          }
          else {
              Toast.makeText(this, "free", Toast.LENGTH_LONG).show();
              isEnabled = false;
  
  
  
  
  &lt;CheckBoxPreference
                          android:enabled="true"
                          android:title="Now"
                          android:defaultValue="false"
                          android:key="keep" /&gt;
  </code></pre>