oncreate Questions
2
Solved
Usually when I create an Android service I implement the onCreate method, but in my last project this does not work. I tried implementing onStartCommand, and this seems to work.
The question is: ...
Freehanded asked 6/1, 2013 at 12:19
2
Solved
I have an activity that starts some other activities for results, so when the result comes back, the activity may or may not have been destroyed and recreated.
I have overridden onSaveInstanceStat...
Fanion asked 5/5, 2014 at 12:26
1
Solved
I have an abstract class extending ActionBarActivity. In the onCreate, I have:
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
supportRequestWi...
1
Solved
While debugging another issue, I realized that the onCreateView method of one of my activities was being called twice. I'm new to programming and I don't fully understand how android calls these me...
Touristy asked 8/4, 2014 at 2:17
6
Update: Thank you all for attempting to help me solve this bug. I am still unsure as to the cause, I was able to roll back to a previous commit and continue development from there. This previous ...
1
Solved
After last update my app has the following issue:
java.lang.RuntimeException: Unable to start activity ComponentInfo{my.package/my.package.MyMainActivity}: android.util.AndroidRuntimeException: re...
Pub asked 7/10, 2013 at 7:43
2
can I access the requestCode an activity received in its onCreate() method?
I'd need it to understand if it is a "new" or "modify" operation.
Zettazeugma asked 7/10, 2013 at 8:15
1
Solved
I'm sorry if this question was asked before...
Well anyway as what the title asked, when does onCreateOptionsMenu executed? before or after onResume?
In my app,
when the activity first run/opened ...
Photographic asked 23/9, 2013 at 9:1
4
Solved
I understand that Android Activities have specific lifecycles and that onCreate should be overridden and used for initialization, but what exactly happens in the constructor? Are there any cases wh...
Roughandtumble asked 21/7, 2010 at 17:44
3
I want to find a way to know that a form was created at run time (or destroyed).
This for Delphi or fpc.
Many thanks
PS : Is there a way to retrieve that info for all objects ?
2
Solved
I'm converting all my Activities to Fragments so that I can use them in a ViewPager.
I've searched for this but I couldn't find a satisfying answer, so that's why I'm asking it here.
In my Activi...
Shanon asked 7/3, 2013 at 17:30
2
I want current X & Y co ordinates of an ImageView on onCreate of Activity, is there any solution for the same ? Please share your idea on same.
Barde asked 5/2, 2013 at 11:51
2
Solved
I have an Activity that opens a new Activity for result like this:
Intent i = new Intent(ActDocument.this, ActCustomers.class);
startActivityForResult(i, ActDocument.DIALOG_CUSTOMER);
when I pre...
Kakemono asked 7/1, 2013 at 12:9
2
Solved
A bit more on the question.
I want to know if the data i passed in the intent that created an Activity stays around if I don't kill it.
Example:
Activity A calls Activity B with extra data String...
Capella asked 2/1, 2013 at 15:34
2
Solved
In Android (targeting APIs 14-16) I have a MainActivity and a NextActivity. There is no difficulty using intents to start NextActivity from within MainActivity if the getIntent() method is called i...
Felker asked 21/12, 2012 at 3:2
2
I have a 3 Activities, and all of them has a a ViewFlipper with some images that keep running. The thing is that I load these images from the SDCard, and there are aproximatly 180 images.
EVERY TI...
Repugnance asked 19/11, 2012 at 17:52
1
Solved
I am in the process of making my first app for Android, and I have a Fragment that gets added to my Activity in the Activity's onCreate() method. The problem I am facing is that I am unable to find...
Moffitt asked 25/8, 2012 at 13:59
2
Solved
I have a spinner with three items and I use an XML string-array resource to feed it. When you open an activity the spinner normally shows the first item that's in the array list. I'd like to change...
1
Possible Duplicate:
How do I save an Android application's state?
I am new to Java and Android and building some small projects to learn. I made a money tracking app which allows ...
4
Solved
Situation
I have a fairly simple app with 2 "layouts" using SharedPreferences.
Main.xml
Settings.xml
Main has a textView that uses getString from SharedPreferences. Also a button to open Sett...
Halfcaste asked 7/12, 2011 at 18:53
4
I have a problem.
When I start for the first time my android application, in the main activity both the onCreate and the onResume are called. but I want to be called only the onCreate.
What can I ...
3
How can I do getLineCount() of an Edittext in the onCreate() method of an activity, having changed the Edittext's text, like the following:
@override
public void onCreate(Bundle savedInstanceSta...
Confounded asked 10/11, 2011 at 21:9
3
Solved
I have seen many people telling that you can set setContentView outside the oncreate method, but I didn't find anywhere an example. Now when I try to use setContentView, my app just crashes. Here i...
1
Solved
I sometimes see people using the Activity.onAttachedToWindow method but personally, I did never use it. When reading it's documentation it appears to me as it would be almost the same as onStart()....
Kosher asked 2/1, 2012 at 11:45
2
Solved
Error Unable to start activity ComponentInfo: java.lang.IllegalStateException: System services not available to Activities before onCreate()
I´m experimenting with seperating the code and the use ...
Fathom asked 28/12, 2011 at 21:55
© 2022 - 2024 — McMap. All rights reserved.