private void showDialog(String message, int milliseconds)
{
// show message
Toast dialog = Toast.makeText(
getApplicationContext(),
message,
Toast.LENGTH_LONG);
dialog.setGravity(Gravity.CENTER, 0, 0);
LinearLayout dialogView = (LinearLayout) dialog.getView();
ImageView coolImage = new ImageView(getApplicationContext());
coolImage.setImageResource(R.drawable.sad);
dialogView.addView(coolImage, 0);
dialog.setDuration(milliseconds);
dialog.show();
}
showDialog
最新推荐文章于 2022-11-20 10:09:51 发布