Translate animation with android -
i new in android. want use translate animation in android. want red rounded image comes center of layout. comes . want red rounded image comes center image color green. in advance.
final alertdialog.builder dialog = new alertdialog.builder(this) .settitle("auto-closing dialog") .setmessage("after 10 second, dialog closed"); dialog.setpositivebutton("confirm", new dialoginterface.onclicklistener() { @override public void onclick(dialoginterface dialog, int whichbutton) { // tasks when confirm clicked } }); final alertdialog alert = dialog.create(); alert.show(); // hide after 10 seconds final handler handler = new handler(); final runnable runnable = new runnable() { @override public void run() { if (alert.isshowing()) { alert.dismiss(); } } }; alert.setondismisslistener(new dialoginterface.ondismisslistener() { @override public void ondismiss(dialoginterface dialog) { handler.removecallbacks(runnable); } }); handler.postdelayed(runnable, 10000);
Comments
Post a Comment