Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Android programming

Name: Anonymous 2012-05-19 11:13

need help from any android fags.  I have a class that extends Activity that has a field which is an ArrayList. The arraylist gets populated by a different Activity.  My problem is that when ever the Activity with the arraylist field starts a new activity the GC reallocates all the fields.  Ive tried making the field static along with a few other things.  Any one know what the actual fuck?

Name: Anonymous 2012-05-19 11:31

Change your shit design.

Name: Anonymous 2012-05-19 15:40

>>1
do NOT use statics in android.
also, use intents to communicate data across activity boundaries.

Name: Anonymous 2012-05-19 19:09

>>3
Is there a reason to stay away from static? curious for knowledges sake.  The best rememdy i have is passing the point to the next activity using an intent and then passing it back.  Back that feels unacceptably inefficient to me

Name: Anonymous 2012-05-19 20:24

>>4
Then your architecture doesn't work
Do not fight Android. I did that a lot when i started and it was very painful
You probably have to re-design your application. Please read
http://developer.android.com/guide/topics/fundamentals.html
http://developer.android.com/reference/android/app/Activity.html

Statics are a very hacky fix to your problem. They will just be a pain later on when you realize you could have handled it cleaner

Name: Anonymous 2012-05-20 13:25

>>5
thanks anon

Name: Anonymous 2012-05-20 15:48

use [b][i][o][u][code]Intent[code][/u][/o][/i][/b]

Name: Anonymous 2012-05-21 16:06

All play and no work makes Jack a wise man.

Name: Anonymous 2012-05-22 9:38

bampu pantsu

Name: Anonymous 2012-05-23 4:18

bampu pantsu

Name: Anonymous 2012-05-23 4:25

bampu pantsu

Name: Anonymous 2012-05-23 4:34

bampu pantsu

Name: Anonymous 2012-05-23 4:44

bampu pantsu

Name: Anonymous 2012-05-23 4:53

bampu pantsu

Name: Anonymous 2012-05-23 5:02

bampu pantsu

Name: Anonymous 2012-05-23 6:45

bampu pantsu

Name: bampu pantsu 2012-05-29 5:04

bampu pantsu

Name: Sgt.Kabu�kiman阵ᚵ 2012-05-29 13:34

Bringing /prog/ back to its people
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy

Don't change these.
Name: Email:
Entire Thread Thread List