tagged [android-activity]
How to pass a variable from Activity to Fragment, and pass it back?
How to pass a variable from Activity to Fragment, and pass it back? I am currently making an android app, and I want to pass a date between activity and fragment. My activity has a button, which opens...
- Modified
- 10 Aug at 11:1
Activity restart on rotation Android
Activity restart on rotation Android In my Android application, when I rotate the device (slide out the keyboard) then my `Activity` is restarted (`onCreate` is called). Now, this is probably how it's...
- Modified
- 12 Nov at 15:1
Android : how to browse page in the same activity à la iPhone
Android : how to browse page in the same activity à la iPhone Basically, in Android an Activity represents a screen lifecycle. With startActivity(intent) , the app goes on a new Activity. How to achie...
- Modified
- 10 Jul at 17:13
Change application's starting activity
Change application's starting activity I have created the meat and guts of my application but I want to add a different activity that will be the starting point (sort of a log-in screen). Couple quest...
- Modified
- 7 May at 21:31
Sending arrays with Intent.putExtra
Sending arrays with Intent.putExtra I have an array of integers in the activity A: And I want to send that variable to the activity B, so I create a new intent and use the putExtra method: In the acti...
- Modified
- 16 Mar at 06:37
How to pass an object from one activity to another on Android
How to pass an object from one activity to another on Android I am trying to work on sending an object of my class from one `Activity` and displaying it in another `Activity`. The code for the custome...
- Modified
- 25 Jul at 10:54
Pass custom objects to next activity in Xamarin Android
Pass custom objects to next activity in Xamarin Android I've got a few custom objects like `RootObject` and `Form` that I want to pass on to the next activity. This is an example of `RootObject`: But ...
- Modified
- 6 May at 08:3
Activity, AppCompatActivity, FragmentActivity, and ActionBarActivity: When to Use Which?
Activity, AppCompatActivity, FragmentActivity, and ActionBarActivity: When to Use Which? I'm coming from iOS where it's easy and you simply use a UIViewController. However, in Android things seem much...
- Modified
- 13 Jul at 09:48
Soft keyboard open and close listener in an activity in Android
Soft keyboard open and close listener in an activity in Android I have an `Activity` where there are 5 `EditText`s. When the user clicks on the first `EditText`, the soft keyboard opens to enter some ...
- Modified
- 9 Dec at 06:39
Android ListView with onClick items
Android ListView with onClick items I'm a new programmer and new in Android. I'm using this example [http://www.androidhive.info/2012/09/android-adding-search-functionality-to-listview/](http://www.an...
- Modified
- 22 Jan at 22:26
How to bring an activity to foreground (top of stack)?
How to bring an activity to foreground (top of stack)? In Android, I defined an activity ExampleActivity. When my application was launched, an instance of this A-Activity was created, say it is `A`. W...
- Modified
- 22 Sep at 03:20
list elements by activity
list elements by activity I'm working on automated builds and need to be able to list elements that were worked on under particular activities. I'm new to ClearCase so I apologise for naiivety ... My ...
- Modified
- 2 Sep at 12:34
Removing an activity from the history stack
Removing an activity from the history stack My app shows a signup activity the first time the user runs the app, looks like: 1. ActivitySplashScreen (welcome to game, sign up for an account?) 2. Activ...
- Modified
- 18 Sep at 22:3
onActivityResult is not being called in Fragment
onActivityResult is not being called in Fragment The activity hosting this fragment has its `onActivityResult` called when the camera activity returns. My fragment starts an activity for a result with...
- Modified
- 26 May at 08:33
How to switch activity without animation in Android?
How to switch activity without animation in Android? How can I use properly the Intent flag `FLAG_ACTIVITY_NO_ANIMATION` in AndroidManifest file? I supose my problem is trivial, but I can't find good ...
- Modified
- 27 Jun at 02:54
Clear the entire history stack and start a new activity on Android
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? I have an activity stack that either goes A-...
- Modified
- 14 Aug at 09:18
Where/How to getIntent().getExtras() in an Android Fragment?
Where/How to getIntent().getExtras() in an Android Fragment? With Activities, I used to do this: In Activity 1: In Activity 2: ``` Item = getIntent().getExtras().getString("
- Modified
- 16 Nov at 17:57
How do I kill an Activity when the Back button is pressed?
How do I kill an Activity when the Back button is pressed? I got an Activity that when it starts, it loads an image from the internet. In an effort to save memory, when the Activity is left by the bac...
- Modified
- 16 Jun at 21:35
How to exit an Android app programmatically?
How to exit an Android app programmatically? I am sure this question has been asked number of times because I read a few. My client wants me to put a button into his app where users can click and exit...
- Modified
- 6 Jan at 21:44
Using Intent in an Android application to show another activity
Using Intent in an Android application to show another activity In my Android application, I have two activity classes. I have a button on the first one and I want to show the second when it is clicke...
- Modified
- 2 Jul at 03:58
Get current Activity - Xamarin Android
Get current Activity - Xamarin Android I am developing an portable App for Android and iOS. My current function is taking a Screenshot and use that image in the code. Therefor I have an Interface in t...
- Modified
- 7 Apr at 13:55
How can I save an activity state using the save instance state?
How can I save an activity state using the save instance state? I've been working on the Android SDK platform, and it is a little unclear how to save an application's state. So given this minor re-too...
- Modified
- 13 Sep at 14:18
java.lang.IllegalStateException: Fragment not attached to Activity
java.lang.IllegalStateException: Fragment not attached to Activity I am rarely getting this error while making an API call. I tried putting the code inside `isAdded()` method to check whether fragment...
- Modified
- 24 Jan at 08:51
android: how to change layout on button click?
android: how to change layout on button click? I have to following code for selecting layout on button click. ``` View.OnClickListener handler = new View.OnClickListener(){ public void onClick(View ...
- Modified
- 2 May at 10:46
Getting activity from context in android
Getting activity from context in android This one has me stumped. I need to call an activity method from within a custom layout class. The problem with this is that I don't know how to access the acti...
- Modified
- 29 Apr at 08:55