Re: [android-developers] Re: Problem with StateListDrawables not found in 1.5 but there from 1.6 onwards

2010-05-27 Thread Alok Kulkarni
Guys , I finally found the solution for my original problem.So thought of sharing it if someone has the same in the future. Using the 3 images itself ,my problem was solved by adding a zero padding explicitly android:paddingLeft=0dip android:paddingRight=0dip android:paddingTop=0dip

[android-developers] Re: Problem with StateListDrawables not found in 1.5 but there from 1.6 onwards

2010-05-06 Thread skink
On May 5, 2:37 pm, Alok Kulkarni kulsu...@gmail.com wrote: It would be great if you could help me giving an example of using the inflate method and the NinePatchDrawable constructor. Thanks, Alok. reading this: http://groups.google.com/group/android-developers/msg/db8d63fd8575129c it

[android-developers] Re: Problem with StateListDrawables not found in 1.5 but there from 1.6 onwards

2010-05-06 Thread skink
On May 6, 5:52 am, skink psk...@gmail.com wrote: reading this:http://groups.google.com/group/android-developers/msg/db8d63fd8575129c it seems ninePatches are created statically by aapt tool and if you want to create ninepatchdrawable dynamically from any file you would calculate chunk by

Re: [android-developers] Re: Problem with StateListDrawables not found in 1.5 but there from 1.6 onwards

2010-05-06 Thread Alok Kulkarni
Oh ok.. Thanks for that.. ill try that and will let you know... Regards, Alok. On Thu, May 6, 2010 at 3:36 PM, skink psk...@gmail.com wrote: On May 6, 5:52 am, skink psk...@gmail.com wrote: reading this: http://groups.google.com/group/android-developers/msg/db8d63fd8575129c it seems

[android-developers] Re: Problem with StateListDrawables not found in 1.5 but there from 1.6 onwards

2010-05-05 Thread skink
On May 5, 6:25 am, Alok Kulkarni kulsu...@gmail.com wrote: For 9 patch images i suppose they need to be stored under drawable folder. I need to change the images according to theme at runtime. at runtime you can create NinePatchDrawable instance based on Bitmap as well pskink -- You

[android-developers] Re: Problem with StateListDrawables not found in 1.5 but there from 1.6 onwards

2010-05-05 Thread skink
On May 5, 6:46 am, Alok Kulkarni kulsu...@gmail.com wrote: Can you show me an example if possible ? use this ctor: http://developer.android.com/intl/fr/reference/android/graphics/drawable/NinePatchDrawable.html#NinePatchDrawable(android.content.res.Resources, android.graphics.Bitmap, byte[],

Re: [android-developers] Re: Problem with StateListDrawables not found in 1.5 but there from 1.6 onwards

2010-05-05 Thread Alok Kulkarni
Okay i have a question here .. I am trying to use the draw9patch tool in the sdk folder. I took an image btn_media_player.9 from the SDK folder path which skink had given In the code i did the following String path = data/data/com.android.test.themes/default/images/btn_media_player.9.png;

[android-developers] Re: Problem with StateListDrawables not found in 1.5 but there from 1.6 onwards

2010-05-05 Thread skink
On May 5, 8:48 am, Alok Kulkarni kulsu...@gmail.com wrote: Okay i have a question here .. I am trying to use the draw9patch tool in the sdk folder. I took an image btn_media_player.9 from the SDK folder path which skink had given In the code i did the following         String path =

Re: [android-developers] Re: Problem with StateListDrawables not found in 1.5 but there from 1.6 onwards

2010-05-05 Thread Kostya Vasilyev
Can you try the attached .9.png? See if it scales? -- Kostya Alok Kulkarni kulsu...@gmail.com писал(а) в своём письме Wed, 05 May 2010 16:21:43 +0400: Does not make any difference between both ir CreateFromStream and CreateFromPath Apparantly i am having a problem creatnig the image in

Re: [android-developers] Re: Problem with StateListDrawables not found in 1.5 but there from 1.6 onwards

2010-05-05 Thread Alok Kulkarni
Kostya, even the spinner didnt work as expected.. Its image too got expanded.Though i gave it to a button. I have attached screen shots 1st one has 2 images left one is larger text and right one is smaller text The white border on the left and right hand side of the button is expanding for larger

Re: [android-developers] Re: Problem with StateListDrawables not found in 1.5 but there from 1.6 onwards

2010-05-05 Thread Kostya Vasilyev
Alok, Found this discussion about creating nine-patches programmatically. Hope this is useful. http://www.mail-archive.com/android-developers@googlegroups.com/msg26977.html -- Kostya Alok Kulkarni kulsu...@gmail.com писал(а) в своём письме Wed, 05 May 2010 17:06:32 +0400: Kostya, even

[android-developers] Re: Problem with StateListDrawables not found in 1.5 but there from 1.6 onwards

2010-05-05 Thread skink
On May 5, 11:30 am, Kostya Vasilyev kmans...@gmail.com wrote: Alok, Found this discussion about creating nine-patches programmatically. Hope   this is useful. also NinePatchDrawable sources will be useful, see inflate() method

Re: [android-developers] Re: Problem with StateListDrawables not found in 1.5 but there from 1.6 onwards

2010-05-05 Thread Alok Kulkarni
Thanks a lot Kostya for those links..You and Skink have attended to my problems patiently throughout the day :) I tried the following Bitmap bmp = BitmapFactory.decodeFile(data/data/com.android.test.themes/fin2.9.png); byte[] bmpChunks = bmp.getNinePatchChunk(); NinePatchDrawable

Re: [android-developers] Re: Problem with StateListDrawables not found in 1.5 but there from 1.6 onwards

2010-05-05 Thread Kostya Vasilyev
Are you using a NinePatch file (fin2.9.png) created with Android's draw9patch tool? If not, you should be, as a test. The docs say that the ninepatch chunk is stored as a chunk in the 9.png file itself - the lines along the edges of the image are just there for convenience. If that

Re: [android-developers] Re: Problem with StateListDrawables not found in 1.5 but there from 1.6 onwards

2010-05-05 Thread Alok Kulkarni
Yes i had created the image fin2.9.png using draw9patch tool.Frankly speaking i am not getting how to use the second method :) Its going like a bouncer to me :) Thanks a lot, Alok 2010/5/5 Kostya Vasilyev kmans...@gmail.com Are you using a NinePatch file (fin2.9.png) created with Android's

Re: [android-developers] Re: Problem with StateListDrawables not found in 1.5 but there from 1.6 onwards

2010-05-05 Thread Alok Kulkarni
It would be great if you could help me giving an example of using the inflate method and the NinePatchDrawable constructor. Thanks, Alok. 2010/5/5 Alok Kulkarni kulsu...@gmail.com Yes i had created the image fin2.9.png using draw9patch tool.Frankly speaking i am not getting how to use the