1
2
3
4
5
6
7
8
9
10
((CheckBox)findViewById(R.id.cbAutoSync)).setChecked(autSync);
findViewById(R.id.btnShowRemoteList).setEnabled(true);
findViewById(R.id.btnClearLocalData).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Toast.makeText(Main.this, "test", Toast.LENGTH_SHORT).show();
}
});
origin - http://www.pipiscrew.com/?p=1851 android-findviewbyid2014