Thursday, February 23, 2012

[android-developers] Re: Using Custom buttons. *Help*

Thank you for the quick response and the link. It did help me out
figuring out what I need to do.
-Thanks again

On Feb 23, 7:49 am, Kookamonga <site...@yahoo.ca> wrote:
> This may help:http://groups.google.com/group/android-developers/browse_thread/threa...
>
> It sounds like you need the images in both /drawable and /drawable-
> ldpi (at different resolutions, of course) and the system itself will
> pick the appropriate icon.
>
> On Feb 23, 12:49 am, Jaison Brooks <jaisonbro...@gmail.com> wrote:
>
>
>
> > I am working on using a few custom 9patch buttons I've created for my
> > app. I'm having troubles find the best way to do this. I have created
> > 3 versions if each button for my ldpi mdpi and hdpi folders. Each
> > button has the same name and there is no mix up. And from what I've
> > research. I created a new xml file name mybuttonbackground.xml with my
> > code for when the button is normal, pressed and focused. But in this
> > xml file my code is having errors with the resources .
> > Example:
>
> > The error is here " @android:drawable/
> > grey_button_background_pressed_blue"
> > And is the same for each line where I reference the PNG reference.
> > I know u could just place the 3 button PNGs in the main drawable
> > folder and fix it. But I want to have the density folder the android
> > system will use for high or low density resolutions. Can someone help
> > me re write this or give me the proper way to do this in my
> > buttonbackground xml file.
>
> >  <?xml version="1.0" encoding="utf-8"?> <selector
> > xmlns:android="http://schemas.android.com/apk/res/android"> <item
> > android:state_focused="true" android:state_pressed="false"
> > android:drawable="@android:drawable/
> > grey_button_background_focus_blue" /> <item
> > android:state_focused="true" android:state_pressed="true"
> > android:drawable="@android:drawable/
> > grey_button_background_pressed_blue" /> <item
> > android:state_focused="false" android:state_pressed="true"
> > android:drawable="@android:drawable/
> > grey_button_background_pressed_blue" /> <item
> > android:drawable="@android:drawable/grey_button_background_normal" />
> > </selector>

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate