Drawable issues

by Ashwini » Thu, 22 Apr 2010 03:12:00 GMT


Sponsored Links
 Hi,

I am trying to resize an image in a textview (set using imagespan). I
tried using setbounds but the image is not reflected.

OnPreDraw - set the bounds
OnDraw - shows the image in some weird place - the updated position
isn't shown correctly.

Can someone please suggest any other option to resize a drawable ?

--



Other Threads

1. DropBox jump into iPad, Android & BB

Malem smuaaaa...

R u ready 4 this? Let's say yes to the cloud.

http://tinyurl.com/27ozd79

Salam,
Benny


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

2. A simplest Application access "Content Provider"

hi,

Usually, we can inherit class "Activity" to access "Content Provider", such
as SMS/Contacts with following codes:
===========================
public class ActivityTest extends Activity {
...
    private void insertSms(String str_address, String content){
        ContentResolver contentResolver = getContentResolver();
        String strUriInbox = "content://sms/inbox";
        ContentValues values = new ContentValues();
        values.put("address", str_address);
        values.put("date", Calendar.getInstance().getTime().getTime());
        values.put("protocol", "0");
        values.put("status", "-1");
        values.put("type", "1");
        values.put("body", content);
        Uri uriSms = Uri.parse(strUriInbox);
        contentResolver.insert(uriSms, values);
    }
}
===========================

However, I don't want to show a activity if write SMS database. So, I design
a simplest application without Activity with following codes:
===========================
package com.xxx.NoActivityTest;

public class NoActivityTest {
    public NoActivityTest(){
    }

    private void insertSms(String str_address, String content){
        ContentResolver contentResolver = *getContentResolver*();
*//"NoActivityTest"
don't inherit from "Activity", so, don't recongnize "getContentResolver()",
so, can't get "ContentResolver" instance.*
        String strUriInbox = "content://sms/inbox";
        ContentValues values = new ContentValues();
        values.put("address", str_address);
        values.put("date", Calendar.getInstance().getTime().getTime());
        values.put("protocol", "0");
        values.put("status", "-1");
        values.put("type", "1");
        values.put("body", content);
        Uri uriSms = Uri.parse(strUriInbox);
        contentResolver.insert(uriSms, values);
    }

    public static void main(String[] args) {
        NoActivityTest ex = new NoActivityTest();
        ex.insertSms("13912345678", "test0001");
    }
}
===========================

As you seen from comments, can't get "ContentResolver" instance because
don't recongnize "getContentResolver()".
How to overcome this issue?

Thanks.

-- 

3. Access to clipped Drawable (i.e. Drawable inside ClipDrawable)

4. SOLVED:Dialing IVR Systems, or sending DTMF tones after a call is made

5. OMX_Init questions for vendor specific components

6. gcc flags for native library..

7. mempercantik menu pull-up