本文整理了Java中android.app.Dialog.show()
方法的一些代码示例,展示了Dialog.show()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Dialog.show()
方法的具体详情如下:
包路径:android.app.Dialog
类名称:Dialog
方法名:show
暂无
代码示例来源:origin: Bigkoo/Android-PickerView
private void showDialog() {
if (mDialog != null) {
mDialog.show();
}
}
代码示例来源:origin: H07000223/FlycoDialog_Master
@Override
public void show() {
Log.d(mTag, "show");
super.show();
}
代码示例来源:origin: navasmdc/MaterialDesignLibrary
@Override
public void show() {
super.show();
view.setVisibility(View.VISIBLE);
view.startAnimation(AnimationUtils.loadAnimation(activity, R.anim.snackbar_show_animation));
if (!mIndeterminate) {
dismissTimer.start();
}
}
代码示例来源:origin: navasmdc/MaterialDesignLibrary
@Override
public void show() {
super.show();
view.startAnimation(AnimationUtils.loadAnimation(context, R.anim.dialog_main_show_amination));
backView.startAnimation(AnimationUtils.loadAnimation(context, R.anim.dialog_root_show_amin));
}
代码示例来源:origin: navasmdc/MaterialDesignLibrary
@Override
public void show() {
// TODO 自动生成的方法存根
super.show();
// set dialog enter animations
view.startAnimation(AnimationUtils.loadAnimation(context, R.anim.dialog_main_show_amination));
backView.startAnimation(AnimationUtils.loadAnimation(context, R.anim.dialog_root_show_amin));
}
代码示例来源:origin: navasmdc/MaterialDesignLibrary
@Override
public void show() {
// TODO 自动生成的方法存根
super.show();
// set dialog enter animations
view.startAnimation(AnimationUtils.loadAnimation(context, R.anim.dialog_main_show_amination));
backView.startAnimation(AnimationUtils.loadAnimation(context, R.anim.dialog_root_show_amin));
}
代码示例来源:origin: jaydenxiao2016/AndroidFire
public static void PermissionDialog(final Activity activity, String content){
Dialog deleteDialog = new AlertDialog.Builder(activity)
.setTitle("提示")
.setMessage(content)
.setPositiveButton("去设置",
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
startSettingIntent(activity);
}
}).create();
deleteDialog.show();
}
代码示例来源:origin: Justson/AgentWeb
protected void toShowDialog(Dialog dialog) {
if (dialog != null && !dialog.isShowing()) {
dialog.show();
}
}
代码示例来源:origin: yanzhenjie/NoHttp
@Override
public void onStart(int what) {
if (mDialog != null && !mDialog.isShowing()) mDialog.show();
}
代码示例来源:origin: libgdx/libgdx
@Override
public void run () {
dialog = createDialog();
dialog.show();
代码示例来源:origin: libgdx/libgdx
@Override
public void run () {
dialog = createDialog();
dialog.show();
代码示例来源:origin: robolectric/robolectric
@Implementation
protected void show() {
setLatestDialog(this);
shownDialogs.add(realDialog);
directlyOn(realDialog, Dialog.class).show();
}
代码示例来源:origin: eleme/UETool
@Override
public void show() {
super.show();
WindowManager.LayoutParams layoutParams = getWindow().getAttributes();
layoutParams.setTitle("???");
layoutParams.width = WindowManager.LayoutParams.MATCH_PARENT;
layoutParams.height = WindowManager.LayoutParams.WRAP_CONTENT;
getWindow().setAttributes(layoutParams);
}
}
代码示例来源:origin: facebook/stetho
@Override
public void onClick(View v) {
int id = v.getId();
if (id == R.id.settings_btn) {
SettingsActivity.show(MainActivity.this);
} else if (id == R.id.apod_btn) {
APODActivity.show(MainActivity.this);
} else if (id == R.id.irc_btn) {
IRCConnectActivity.show(MainActivity.this);
} else if (id == R.id.about) {
View view = LayoutInflater.from(MainActivity.this).inflate(R.layout.dialog_layout, null);
Dialog dialog = new Dialog(MainActivity.this);
dialog.setContentView(view);
dialog.setTitle(getString(R.string.app_name));
dialog.show();
}
}
};
代码示例来源:origin: robolectric/robolectric
@Test
@Config(minSdk = KITKAT)
public void show_shouldWorkWithAPI19() {
Dialog dialog = new Dialog(context);
dialog.show();
}
代码示例来源:origin: ZieIony/Carbon
@Override
public void show() {
container.requestLayout();
container.setVisibility(View.INVISIBLE);
super.show();
container.animateVisibility(View.VISIBLE);
}
代码示例来源:origin: robolectric/robolectric
@Test
public void shouldOnlyCallOnCreateOnce() {
final List<String> transcript = new ArrayList<>();
Dialog dialog =
new Dialog(context) {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
transcript.add("onCreate called");
}
};
dialog.show();
assertThat(transcript).containsExactly("onCreate called");
transcript.clear();
dialog.dismiss();
dialog.show();
assertThat(transcript).isEmpty();
}
代码示例来源:origin: robolectric/robolectric
@Test
public void shouldCallOnDismissListener() throws Exception {
final List<String> transcript = new ArrayList<>();
final Dialog dialog = new Dialog(context);
dialog.show();
dialog.setOnDismissListener(
dialogInListener -> {
assertThat(dialogInListener).isSameAs(dialog);
transcript.add("onDismiss called!");
});
dialog.dismiss();
assertThat(transcript).containsExactly("onDismiss called!");
}
代码示例来源:origin: robolectric/robolectric
@Test
public void getLatestDialog_shouldReturnARealDialog() throws Exception {
assertThat(ShadowDialog.getLatestDialog()).isNull();
Dialog dialog = new Dialog(context);
dialog.show();
assertThat(ShadowDialog.getLatestDialog()).isSameAs(dialog);
}
代码示例来源:origin: robolectric/robolectric
@Test
public void show_setsLatestDialog() {
Dialog dialog = new Dialog(context);
assertNull(ShadowDialog.getLatestDialog());
dialog.show();
assertSame(dialog, ShadowDialog.getLatestDialog());
assertNull(ShadowAlertDialog.getLatestAlertDialog());
}
内容来源于网络,如有侵权,请联系作者删除!