How to minimize whole application in android?

前端 未结 2 1000
灰色年华
灰色年华 2020-12-30 03:00

I was developed android application. More over i have completed, but i want to minimize option. I have used tab bar. In that i want to minimize tab. When user click minimize

相关标签:
2条回答
  • 2020-12-30 03:37

    Try calling this moveTaskToBack(true); boolean.

    0 讨论(0)
  • 2020-12-30 03:40

    I'm not sure what you mean by minimize. If you want to hide your app and present the user with the homescreen you can use the following intent.

    Intent startMain = new Intent(Intent.ACTION_MAIN);
    startMain.addCategory(Intent.CATEGORY_HOME);
    startMain.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
    startActivity(startMain);
    

    Although the Home button is more than sufficient if a user wants to hide your app

    0 讨论(0)
提交回复
热议问题