弹出异地登录dialog

final AlertDialog dlg = new AlertDialog.Builder(LoginActivity.this).create();
dlg.show();
Window window = dlg.getWindow();
if(window!=null){
window.setContentView(R.layout.other_devices);
TextView text = (TextView) window.findViewById(R.id.ok);
text.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
dlg.cancel();
}
});

}

posted on 2017-04-01 09:16  yaolunhui  阅读(129)  评论(0编辑  收藏  举报

导航