Re: [android-developers] Re: multi resolution image button selectors broken?
Delete the XML from drawable-ldpi/ and make sure you have the pngs in both drawable/ and drawable-ldpi/ (at different sizes of course). On Tue, Jan 5, 2010 at 11:57 PM, OldSkoolMark m...@sublimeslime.com wrote: Roman, Thanks for the quick response! Unfortunately, I'm still having issues. It wasn't clear to me whether you were instructing me to just delete the selector xml file in drawable-ldpi, or copy the one from drawable into drawable-ldpi without change. I've tried it both ways to no avail. I don't have a layout-small set of resources yet. I shouldn't need layout-small for this one issue should I? On Jan 5, 11:27 pm, Romain Guy romain...@android.com wrote: It is not the right way. Do not use @drawable-ldpi/, just keep the same XML file, it will work. The system will find startstopin and startstopout in the right drawable-XXX/ directory. On Tue, Jan 5, 2010 at 11:24 PM, OldSkoolMark m...@sublimeslime.com wrote: In my res/drawable directory I have: ?xml version=1.0 encoding=utf-8? selector xmlns:android=http://schemas.android.com/apk/res/android; item android:state_pressed=true android:drawable=@drawable/startstopin / item android:drawable=@drawable/startstopout / /selector Works like a champ. I'm now trying to make my app work on small screen devices, so I created a res/drawable-ldpi directory, and populated it with the two pngs plus the corresponding selector file: ?xml version=1.0 encoding=utf-8? selector xmlns:android=http://schemas.android.com/apk/res/android; item android:state_pressed=true android:drawable=@drawable-ldpi/startstopin / item android:drawable=@drawable-ldpi/startstopout / /selector No love. I get: ... res\drawable-ldpi\startstopbuttonimageselector.xml:3: ERROR Error: No resource found that matches the given name (at 'drawable' with value '@drawable-ldpi/startstopin'). ... res\drawable-ldpi\startstopbuttonimageselector.xml:5: ERROR Error: No resource found that matches the given name (at 'drawable' with value '@drawable-ldpi/startstopout'). Isn't this the right way to specify ldpi specific button images? If default device xmls and pngs go in drawable, then ldpi xmls and pngs go in drawable-ldpi, right? Could these errors be the result of an inappropriate supports-screens element in my manifest file? Neither the api-demos in the samples (for any SDK version), or the newer samples including multires, have any multi res image button examples. In fact, I couldn't find any example where there was an xml file in a res/drawable-... Anyone see what I'm doing wrong and/or have a working example of how to specify resolution specific drawables for image buttons? -- 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them -- 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them -- 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: multi resolution image button selectors broken?
Romain, Thanks so much for your help. I also had anyDensity=false in my manifest. Once I fixed that, my ldpi drawables are employed appropriately. Mark On Jan 6, 12:16 am, Romain Guy romain...@android.com wrote: Delete the XML from drawable-ldpi/ and make sure you have the pngs in both drawable/ and drawable-ldpi/ (at different sizes of course). On Tue, Jan 5, 2010 at 11:57 PM, OldSkoolMark m...@sublimeslime.com wrote: Roman, Thanks for the quick response! Unfortunately, I'm still having issues. It wasn't clear to me whether you were instructing me to just delete the selector xml file in drawable-ldpi, or copy the one from drawable into drawable-ldpi without change. I've tried it both ways to no avail. I don't have a layout-small set of resources yet. I shouldn't need layout-small for this one issue should I? On Jan 5, 11:27 pm, Romain Guy romain...@android.com wrote: It is not the right way. Do not use @drawable-ldpi/, just keep the same XML file, it will work. The system will find startstopin and startstopout in the right drawable-XXX/ directory. On Tue, Jan 5, 2010 at 11:24 PM, OldSkoolMark m...@sublimeslime.com wrote: In my res/drawable directory I have: ?xml version=1.0 encoding=utf-8? selector xmlns:android=http://schemas.android.com/apk/res/android; item android:state_pressed=true android:drawable=@drawable/startstopin / item android:drawable=@drawable/startstopout / /selector Works like a champ. I'm now trying to make my app work on small screen devices, so I created a res/drawable-ldpi directory, and populated it with the two pngs plus the corresponding selector file: ?xml version=1.0 encoding=utf-8? selector xmlns:android=http://schemas.android.com/apk/res/android; item android:state_pressed=true android:drawable=@drawable-ldpi/startstopin / item android:drawable=@drawable-ldpi/startstopout / /selector No love. I get: ... res\drawable-ldpi\startstopbuttonimageselector.xml:3: ERROR Error: No resource found that matches the given name (at 'drawable' with value '@drawable-ldpi/startstopin'). ... res\drawable-ldpi\startstopbuttonimageselector.xml:5: ERROR Error: No resource found that matches the given name (at 'drawable' with value '@drawable-ldpi/startstopout'). Isn't this the right way to specify ldpi specific button images? If default device xmls and pngs go in drawable, then ldpi xmls and pngs go in drawable-ldpi, right? Could these errors be the result of an inappropriate supports-screens element in my manifest file? Neither the api-demos in the samples (for any SDK version), or the newer samples including multires, have any multi res image button examples. In fact, I couldn't find any example where there was an xml file in a res/drawable-... Anyone see what I'm doing wrong and/or have a working example of how to specify resolution specific drawables for image buttons? -- 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them -- 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them -- 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: multi resolution image button selectors broken?
Roman, Thanks for the quick response! Unfortunately, I'm still having issues. It wasn't clear to me whether you were instructing me to just delete the selector xml file in drawable-ldpi, or copy the one from drawable into drawable-ldpi without change. I've tried it both ways to no avail. I don't have a layout-small set of resources yet. I shouldn't need layout-small for this one issue should I? On Jan 5, 11:27 pm, Romain Guy romain...@android.com wrote: It is not the right way. Do not use @drawable-ldpi/, just keep the same XML file, it will work. The system will find startstopin and startstopout in the right drawable-XXX/ directory. On Tue, Jan 5, 2010 at 11:24 PM, OldSkoolMark m...@sublimeslime.com wrote: In my res/drawable directory I have: ?xml version=1.0 encoding=utf-8? selector xmlns:android=http://schemas.android.com/apk/res/android; item android:state_pressed=true android:drawable=@drawable/startstopin / item android:drawable=@drawable/startstopout / /selector Works like a champ. I'm now trying to make my app work on small screen devices, so I created a res/drawable-ldpi directory, and populated it with the two pngs plus the corresponding selector file: ?xml version=1.0 encoding=utf-8? selector xmlns:android=http://schemas.android.com/apk/res/android; item android:state_pressed=true android:drawable=@drawable-ldpi/startstopin / item android:drawable=@drawable-ldpi/startstopout / /selector No love. I get: ... res\drawable-ldpi\startstopbuttonimageselector.xml:3: ERROR Error: No resource found that matches the given name (at 'drawable' with value '@drawable-ldpi/startstopin'). ... res\drawable-ldpi\startstopbuttonimageselector.xml:5: ERROR Error: No resource found that matches the given name (at 'drawable' with value '@drawable-ldpi/startstopout'). Isn't this the right way to specify ldpi specific button images? If default device xmls and pngs go in drawable, then ldpi xmls and pngs go in drawable-ldpi, right? Could these errors be the result of an inappropriate supports-screens element in my manifest file? Neither the api-demos in the samples (for any SDK version), or the newer samples including multires, have any multi res image button examples. In fact, I couldn't find any example where there was an xml file in a res/drawable-... Anyone see what I'm doing wrong and/or have a working example of how to specify resolution specific drawables for image buttons? -- 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them -- 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en