How to deal with ExpandableList when all the data are coming from datebase?

by stonestrange » Sat, 06 Jun 2009 23:46:15 GMT


Sponsored Links
 I want to the effective like ExpandableList1 Activity in apidemo.But
my data is from the database.And th groups's data from the database
and the children's data from the database too.All both are comg from
different tables.
First,i want to konw how to get data from the cursor to String[];
Second,i want to konw how to confirm the data of children[][].

Thank you.
--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. java.lang.OutOfMemoryError: bitmap size exceeds VM budget

This:
        private static final int[] glowDrawableIds={
                R.drawable.graphic_microphoneglow_01,
                R.drawable.graphic_microphoneglow_02,
                R.drawable.graphic_microphoneglow_03,
                R.drawable.graphic_microphoneglow_04,
                R.drawable.graphic_microphoneglow_05,
                R.drawable.graphic_microphoneglow_06,
                R.drawable.graphic_microphoneglow_07,
                R.drawable.graphic_microphoneglow_08,
                R.drawable.graphic_microphoneglow_09,
                R.drawable.graphic_microphoneglow_10
        };
...
View glow = findViewById(R.id.glow);
..

glow.setBackgroundResource(glowDrawableIds[scale]);

is causing

11-25 09:21:02.046: WARN/UsageStats(1018): Failed to persist new stats
11-25 09:21:02.694: DEBUG/dalvikvm(2386): GC freed 298 objects / 15656
bytes in 61ms
11-25 09:21:02.952: ERROR/dalvikvm-heap(2386): 1111680-byte external
allocation too large for this process.
11-25 09:21:02.952: ERROR/(2386): VM won't let us allocate 1111680
bytes
11-25 09:21:02.952: DEBUG/AndroidRuntime(2386): Shutting down VM
11-25 09:21:02.952: WARN/dalvikvm(2386): threadid=3: thread exiting
with uncaught exception (group=0x4001b180)
11-25 09:21:02.952: ERROR/AndroidRuntime(2386): Uncaught handler:
thread main exiting due to uncaught exception
11-25 09:21:03.014: ERROR/AndroidRuntime(2386):
java.lang.OutOfMemoryError: bitmap size exceeds VM budget
11-25 09:21:03.014: ERROR/AndroidRuntime(2386):     at
android.graphics.Bitmap.nativeCreate(Native Method)
11-25 09:21:03.014: ERROR/AndroidRuntime(2386):     at
android.graphics.Bitmap.createBitmap(Bitmap.java:468)
11-25 09:21:03.014: ERROR/AndroidRuntime(2386):     at
android.graphics.Bitmap.createBitmap(Bitmap.java:435)
11-25 09:21:03.014: ERROR/AndroidRuntime(2386):     at
android.graphics.Bitmap.createScaledBitmap(Bitmap.java:340)
11-25 09:21:03.014: ERROR/AndroidRuntime(2386):     at
android.graphics.BitmapFactory.finishDecode(BitmapFactory.java:488)
11-25 09:21:03.014: ERROR/AndroidRuntime(2386):     at
android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:462)
11-25 09:21:03.014: ERROR/AndroidRuntime(2386):     at
android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:
323)
11-25 09:21:03.014: ERROR/AndroidRuntime(2386):     at
android.graphics.drawable.Drawable.createFromResourceStream
(Drawable.java:697)
11-25 09:21:03.014: ERROR/AndroidRuntime(2386):     at
android.content.res.Resources.loadDrawable(Resources.java:1705)
11-25 09:21:03.014: ERROR/AndroidRuntime(2386):     at
android.content.res.Resources.getDrawable(Resources.java:580)
11-25 09:21:03.014: ERROR/AndroidRuntime(2386):     at
android.view.View.setBackgroundResource(View.java:7187)

-- 

2. OOT : numpang nampang

Opo iki pak ichan?

jogjadroid




Iseng iseng mainin thames

ichan
cm508/amonra 1.7.0
agmon 3 unlimited

-- 
"Indonesian Android Community [id-android]"

3. flash u/ droid eclai

4. Singapura -- Mau Telepon Pakai Cokelat?

5. Sudah ada yg coba flash plugin di eclair 2.1?

6. Start an App via the Web

7. Fix for OutofMemoryError: bitmap size exceeds VM budget