I know Android will return to the home screen when I press the Home key, however, I want my imageButton to behave as the Home key, which can inform the home screen to the foreground.
How should I implement my onClickListener to accomplish this?
Intent intent = new Intent(Intent.ACTION_MAIN);
intent.addCategory(Intent.CATEGORY_HOME);
startActivity(intent);
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.