Top "Android-activity" questions

Questions about creating or managing Activities in Android.

How do I disable orientation change on Android?

I have an application that I just would like to use in portrait mode, so I have defined android:screenOrientation="…

android android-activity android-orientation
Start an Activity with a parameter

I'm very new on Android development. I want to create and start an activity to show information about a game. …

android android-activity oncreate
Same Navigation Drawer in different Activities

I made a working navigation drawer like it's shown in the tutorial on the developer.android.com website. But now, …

android android-activity navigation navigation-drawer drawer
How to handle screen orientation change when progress dialog and background thread active?

My program does some network activity in a background thread. Before starting, it pops up a progress dialog. The dialog …

android android-activity android-dialog
android start activity from service

Android: public class LocationService extends Service { @Override public void onStart(Intent intent, int startId) { super.onStart(intent, startId); startActivity(new …

android android-activity android-service
Passing a Bundle on startActivity()?

What's the correct way to pass a bundle to the activity that is being launched from the current one? Shared …

android android-activity bundle
Removing an activity from the history stack

My app shows a signup activity the first time the user runs the app, looks like: ActivitySplashScreen (welcome to game, …

android android-activity activity-lifecycle
Clear the entire history stack and start a new activity on Android

Is it possible to start an activity on the stack, clearing the entire history before it? The situation I have …

android android-activity back-stack
Dilemma: when to use Fragments vs Activities:

I know that Activities are designed to represent a single screen of my application, while Fragments are designed to be …

android android-fragments android-activity architecture
How to check if activity is in foreground or in visible background?

I have a splash screen on a timer. My problem is that before I finish() my activity I need to …

android android-activity dialog activity-finish