Databases sample using SDK 0.9

by Hans » Sat, 13 Sep 2008 19:46:28 GMT


Sponsored Links
 Hi ppl i found a database manipulation sample using the SDK version m3-
xxx but unfortunately this does not work on SDK 0.9 since some methods
seem to have changed a bit. At some point i managed to get it
compiling but not functional yet. I guess there is something basic
missing which i am not noticing most probably since i am still a very
new and crude android developer :). Therefore is there anyone out
there that has a database sample using the SDK 0.9 pllleeeassssee?

Thanks guys for your help!!


--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Problem with cursors

Hi,

I am using a a Sqlite database in my application, but I am having a problem 
with it crashing (seemingly) randomly with the exception in Cursor.  (I have 
been unable to recreate the error to give you the exact exception but it is 
something like the cursor being in an invalid state.

I am using the cursor as follows:

        public ArrayList<String> fetchPermanent() {
                ArrayList<String> rows = new ArrayList<String>();
                try {
                        Cursor c = mDb.query(USERS, new String[] {SCREEN_NAME}, 
CONSTANT + "='C'", null, null, null, null);
                        if (c != null && c.getCount() > 0) {
                                while (!c.isLast()) {
                                        c.moveToNext();
                                        rows.add(c.getString(0));
                                }
                                c.close();
                                c = null;
                        }
                }
                catch (Exception e) {
                        Log.e("DBERR", e.getMessage());
                }
                return rows;
        }

Does anyone here have any idea what it is I am doing wrong?

Mikey

-- 

2. Making TextViews Spannable causes ListView performance to tank

Hi all,

I've got a list few which I've optimized in every possible way. Performance
matches the exchange email client so I'm happy in that respect. It's very
fluid regardless of the number of records. The problem is the moment I
introduce some conditional formatting of TextViews (think bold for unread,
normal for read) the list starts to get choppy when the user flings the
list. Is there a better way to tackle this formatting?

My layout is optimized (single relative layout) and I'm using a viewwrapper.

Example: (in my actual code there are 4 Textviews)

Spannable s = (Spannable) w.stepname.getText();


            if( state.equalsIgnoreCase( Tasks.STATE_READ ))
            {
                s.setSpan( new StyleSpan( Typeface.NORMAL ), 0, s.length(),
Spannable.SPAN_EXCLUSIVE_EXCLUSIVE );

                w.getStepName().setTextColor( 0xFFBDBEBD );
            }
            else
            {
                s.setSpan( new StyleSpan( Typeface.BOLD ), 0, s.length(),
Spannable.SPAN_EXCLUSIVE_EXCLUSIVE );

                w.getStepName().setTextColor( 0xFFFFFFFF );
            }

-- 

3. Internet proxy setting on android emulator

4. Emulator and cellular access

5. Hidup Android, Google beri dukungan buat id-Android

6. Unknown error with AAPT tool while Build Projec

7. How to open virtual keyboard automatically