I created 2 checkbox on layout.I created onCheckboxClicked function, but I need call the function into onclick function. Because I need return data as a null if visibility of textview set as a gone.
My Code:
public void onCheckboxClicked(View view) {
switch(view.getId()) {
case R.id.tekyon:
this.mGidisDonus.setChecked(false);
baslTarih.setVisibility(View.GONE);
bitisTarih.setVisibility(View.GONE);
baslSaat.setVisibility(View.GONE);
bitisSaat.setVisibility(View.GONE);
mtektarih.setVisibility(View.VISIBLE);
mtekSaat.setVisibility(View.VISIBLE);
break;
case R.id.gidisdonus:
mTekYon.setChecked(false);
baslTarih.setVisibility(View.VISIBLE);
bitisTarih.setVisibility(View.VISIBLE);
baslSaat.setVisibility(View.VISIBLE);
bitisSaat.setVisibility(View.VISIBLE);
mtektarih.setVisibility(View.GONE);
mtekSaat.setVisibility(View.GONE);
break;
}
}
Aucun commentaire:
Enregistrer un commentaire