Комментарии:
I have question. Whay when i click "yes" to close/exit, always back in before activity. And this app not close. Pls answer
Ответитьhi think you i would like to ask is there any way to do that for recent app button to or disable it >?
ОтветитьCan you out the code link we can copy paste? You should always add the link to the code when you make videos like these 👍
ОтветитьHi. I created main activity and two other activities and created 2 buttons in main activity to go to other activities and in other activities i created one button in each activity to go back to main activity. But when i run the app. And i go to other activities and back to main activity more than one time and at the end in main activity i press back button of the emulator it go to another activities instead of exit of the app . Please can anyone help me
ОтветитьThanks, Very much!
ОтветитьSir how can set EXIT button in Navigation Drawer and how can work it is? Please reply
Ответитьthanks for this.
ОтветитьThank u very much sir
ОтветитьI play sound in activity but when I press on back button in phone it doesn't stop , can you tell me how can I do this ?
ОтветитьThese videos are really helpful. thanks u sooooo much sir.
ОтветитьThe video is very helpful, Thank You so Much. God Bless You.
Ответитьnice tutorial, thanks sir, :D
ОтветитьHow to go back when we are on fragment !
MY CODE : (this only works on activity)
if (mDrawerLayout.isDrawerOpen(GravityCompat.START)) {
mDrawerLayout.closeDrawer(GravityCompat.START);
} else {
super.onBackPressed();
}
Fragment : .........................
Thankx a lot!
Thank you, Sir.
Ответитьnice explain. thanks for help
ОтветитьIt might be easier to implement this without a Handler if you just save the timestamp of the last click and compare it on each click. something like
private long lastClick;
public void onBackPressed() {
long now = System.currentTimeMillis();
if (now - lastClick < 3000) {
super.onBackPressed();
} else {
Toast...show() ;
lastClick = now;
}
}
thank you very much...........
Ответить