use of com.lingtuan.firefly.util.MyViewDialogFragment in project SmartMesh_Android by SmartMeshFoundation.
the class RecommentContactListUI method onClick.
@Override
public void onClick(View v) {
super.onClick(v);
switch(v.getId()) {
case R.id.toAdd:
final String tempGxb = "tempGxb";
boolean flag = MySharedPrefs.readBooleanNormal(RecommentContactListUI.this, MySharedPrefs.FILE_USER, tempGxb);
if (flag) {
startActivity(new Intent(RecommentContactListUI.this, AddContactFriendsNewUI.class));
Utils.openNewActivityAnim(RecommentContactListUI.this, false);
} else {
MyViewDialogFragment mdf = new MyViewDialogFragment();
mdf.setTitleAndContentText(getString(R.string.notif), getString(R.string.contact_smt_accect));
mdf.setOkCallback(new MyViewDialogFragment.OkCallback() {
@Override
public void okBtn() {
/**
*Send the address book to monitor radio
*/
Intent intent = new Intent(LoadDataService.ACTION_START_CONTACT_LISTENER);
Utils.sendBroadcastReceiver(RecommentContactListUI.this, intent, false);
MySharedPrefs.writeBoolean(RecommentContactListUI.this, MySharedPrefs.FILE_USER, tempGxb, true);
startActivity(new Intent(RecommentContactListUI.this, AddContactFriendsNewUI.class));
Utils.openNewActivityAnim(RecommentContactListUI.this, false);
}
});
mdf.show(getSupportFragmentManager(), "mdf");
}
break;
default:
break;
}
}
Aggregations