[android-developers] Re: Creating custom button looks?
use an imagebutton On Jan 15, 1:35 pm, Tommy droi...@gmail.com wrote: Hey, Is there a way to create a custom button style? Say I want a round button do I simply take the pre-made round graphic and make it the background of the button or will the button still be a rectangle? -- 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
Re: [android-developers] Re: Creating custom button looks?
Ok so its shape will changed based on the image I assign to it? On Fri, Jan 15, 2010 at 2:11 PM, theSmith chris.smith...@gmail.com wrote: use an imagebutton On Jan 15, 1:35 pm, Tommy droi...@gmail.com wrote: Hey, Is there a way to create a custom button style? Say I want a round button do I simply take the pre-made round graphic and make it the background of the button or will the button still be a rectangle? -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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
Re: [android-developers] Re: Creating custom button looks?
You can use a png I believe with transparency to produce any style button you want. I don't know if the hit-test for clicking on it will work only on the image part or the whole square width/height size of the button itself tho. On Fri, Jan 15, 2010 at 11:18 AM, Tommy Hartz droi...@gmail.com wrote: Ok so its shape will changed based on the image I assign to it? On Fri, Jan 15, 2010 at 2:11 PM, theSmith chris.smith...@gmail.comwrote: use an imagebutton On Jan 15, 1:35 pm, Tommy droi...@gmail.com wrote: Hey, Is there a way to create a custom button style? Say I want a round button do I simply take the pre-made round graphic and make it the background of the button or will the button still be a rectangle? -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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: Creating custom button looks?
I had added a D-Pad image button to a game, and the transparent areas still registered hits. This was using the 1.5 SDK so I am not sure if any of the newer SDKs have changed this. On Jan 15, 12:30 pm, Kevin Duffey andjar...@gmail.com wrote: You can use a png I believe with transparency to produce any style button you want. I don't know if the hit-test for clicking on it will work only on the image part or the whole square width/height size of the button itself tho. On Fri, Jan 15, 2010 at 11:18 AM, Tommy Hartz droi...@gmail.com wrote: Ok so its shape will changed based on the image I assign to it? On Fri, Jan 15, 2010 at 2:11 PM, theSmith chris.smith...@gmail.comwrote: use an imagebutton On Jan 15, 1:35 pm, Tommy droi...@gmail.com wrote: Hey, Is there a way to create a custom button style? Say I want a round button do I simply take the pre-made round graphic and make it the background of the button or will the button still be a rectangle? -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en- Hide quoted text - - Show quoted text - -- 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: Creating custom button looks?
None of the SDK versions will automatically check what areas in the button should be a hit area... it's just a plane W x H area You will need to create a custom image button class and catch the touch events and decide if it's a hit or not... :) -Moto On Jan 15, 4:14 pm, clark clarkd...@gmail.com wrote: I had added a D-Pad image button to a game, and the transparent areas still registered hits. This was using the 1.5 SDK so I am not sure if any of the newer SDKs have changed this. On Jan 15, 12:30 pm, Kevin Duffey andjar...@gmail.com wrote: You can use a png I believe with transparency to produce any style button you want. I don't know if the hit-test for clicking on it will work only on the image part or the whole square width/height size of the button itself tho. On Fri, Jan 15, 2010 at 11:18 AM, Tommy Hartz droi...@gmail.com wrote: Ok so its shape will changed based on the image I assign to it? On Fri, Jan 15, 2010 at 2:11 PM, theSmith chris.smith...@gmail.comwrote: use an imagebutton On Jan 15, 1:35 pm, Tommy droi...@gmail.com wrote: Hey, Is there a way to create a custom button style? Say I want a round button do I simply take the pre-made round graphic and make it the background of the button or will the button still be a rectangle? -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en-Hide quoted text - - Show quoted text - -- 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: Creating custom button looks?
If you need multiple hit areas you may want to consider using several images to create 'one' button. For example a d-pad could be 5 imagebuttons, u/d/l/r and the middle. This approach will most likely save you quite a headache. -theSmith On Jan 15, 4:22 pm, Moto medicalsou...@gmail.com wrote: None of the SDK versions will automatically check what areas in the button should be a hit area... it's just a plane W x H area You will need to create a custom image button class and catch the touch events and decide if it's a hit or not... :) -Moto On Jan 15, 4:14 pm, clark clarkd...@gmail.com wrote: I had added a D-Pad image button to a game, and the transparent areas still registered hits. This was using the 1.5 SDK so I am not sure if any of the newer SDKs have changed this. On Jan 15, 12:30 pm, Kevin Duffey andjar...@gmail.com wrote: You can use a png I believe with transparency to produce any style button you want. I don't know if the hit-test for clicking on it will work only on the image part or the whole square width/height size of the button itself tho. On Fri, Jan 15, 2010 at 11:18 AM, Tommy Hartz droi...@gmail.com wrote: Ok so its shape will changed based on the image I assign to it? On Fri, Jan 15, 2010 at 2:11 PM, theSmith chris.smith...@gmail.comwrote: use an imagebutton On Jan 15, 1:35 pm, Tommy droi...@gmail.com wrote: Hey, Is there a way to create a custom button style? Say I want a round button do I simply take the pre-made round graphic and make it the background of the button or will the button still be a rectangle? -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en-Hidequoted text - - Show quoted text - -- 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