The cool features that come along with apps are what draw the interests of users. Apps make phones “smart” and through their benefits, apps have drastically transformed how we function today. Adept programmers are getting busy, designing and building apps of their own and embedding them with favorable features. If you’re one of those enthusiasts, […]
Normally when we launch new activity, it’s previous activities will be kept in a queue like a stack of activities. So if you want to kill all the previous activities, just follow these methods. Method:- 1 In API level 11 or greater, use FLAG_ACTIVITY_CLEAR_TASK and FLAG_ACTIVITY_NEW_TASK flag on Intent to clear all the activity stack.
Detecting android device hardware back button / soft back button press is very easy. But be careful while overriding the default back button action as it is not suggested to change the android default user experience. Method:- 1 Override the onBackPressed() method and take the action inside this function.
If you want to capitalise the first letter of every word in a EditText, assign android:inputType=”textCapWords” to EditText. Example: The same can be done programmatically also as shown below.