Invalidate()?...

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


Sponsored Links
 Hi,

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

Any one know about these?...

Thanks in advance....

-- 
Thanks & Regards
Sasikumar.S

--



Invalidate()?...

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


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

Rgs,
Sathya




>


Sponsored Links


Invalidate()?...

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


 Hi,

Thanks for reply...

It will refresh onDraw()?....

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




>>



Invalidate()?...

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


 Yes..
invalidate() will call onDraw() internally.

--
Regards,
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
following:

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
crashes.

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);
    }



    @Override
    public void onCreate(SQLiteDatabase db){

        db.execSQL(CREATE_TABLE_COURSE);
        db.execSQL(CREATE_TABLE_SCORE);


    }

    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int
newVersion){
        db.execSQL("DROP TABLE IF EXISTS "+ DICT_TAB_1);
        db.execSQL("DROP TABLE IF EXISTS "+ DICT_TAB_2);
        onCreate(db);
    }


}

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

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