by Sasikumar.S » Thu, 03 Dec 2009 18:32:32 GMT

Sponsored Links

What is the use of Invalidate() in android?...

Any one know about these?...

Thanks in advance....

Thanks & Regards



by sathya subbiah » Thu, 03 Dec 2009 18:59:04 GMT

 Invalidate is used for updating the View display. Its like refreshing the



Sponsored Links


by Sasikumar.S » Thu, 03 Dec 2009 19:12:33 GMT


Thanks for reply...

It will refresh onDraw()?....

On Thu, Dec 3, 2009 at 4:28 PM, sathya subbiah



by UD » Sat, 05 Dec 2009 02:44:30 GMT

invalidate() will call onDraw() internally.

Udayan Warnekar
Android Application Developer

> >>

Other Threads

1. Loading Partial Subset of a Bitmap

So I have a huge image (2000 x 2000) that is way too big for the
Android VM to load in (there's a 16 MB limit per application). That's
fine with me, as I only want to load in one screen size (320 x 480) at
a time, which Android should more than be able to handle. The problem
is, how do you load in just one piece of a bitmap? I've tried the

Bitmap bmp1 = BitmapFactory.decodeResource(res, R.drawable.image);
Bitmap bmp2 = Bitmap.createBitmap(bmp1, 0, 0, 320, 480);

But of course the loading is really done in that first line, so the VM

I also tried using BitmapFactory.Options and specifying an outWidth
and outHeight, but those just scale the image rather than translate/
crop it. Something along the lines of those options would be really
nice though.

Any ideas?

2. multiple tables in sqlite

Hopefully some one will nmotice my 'obvious' mistake.

I have created 2 tables in the database (below). When I access table
c, no problem. But when I attempt to access table s I get an error
message that column name x (all names give the same error) does not
exist. How can 1 table get created but not the other?

public class updateDB extends SQLiteOpenHelper {

    private static final String CREATE_TABLE_S = "create table
"+DICT_TAB_1+" (_ID integer primary key autoincrement, COURSE_NAME
text not null, SCORE number not null,  PUTTS number not null, GIR
number not null, FWY number not null);";

    private static final String CREATE_TABLE_C = "create table
"+DICT_TAB_2+" (_ID integer primary key autoincrement, COURSE_NAME
text not null, TEES text not null,  SLOPE number not null, PAR number
not null);";

    public updateDB(Context ctx){

        super(ctx, DATABASE_NAME, null, DATABASE_VERSION);

    public void onCreate(SQLiteDatabase db){



    public void onUpgrade(SQLiteDatabase db, int oldVersion, int
        db.execSQL("DROP TABLE IF EXISTS "+ DICT_TAB_1);
        db.execSQL("DROP TABLE IF EXISTS "+ DICT_TAB_2);



3. Using bindView to Customize ListView

4. keypad and Touchscreen Not working on IMX31 with Android SDK1.0

5. SharedPreferences - is it secure?

6. debugging integrated Java and native code

7. Writing files to SD card failing