Re: [android-developers] draw button's background as a filled circle with transparent background
Thanks Kumar, i'm trying 9 patch. tell you On 24/11/2010, Kumar Bibek wrote: > Well, I tried it, and it looks fine. Both on the emulator and the phone. > > Kumar Bibek > http://techdroid.kbeanie.com > http://www.kbeanie.com > > > > On Thu, Nov 25, 2010 at 1:51 AM, gato chlr wrote: > >> thanks for the answer!, any way , I'm trying to work without images. >> As far as i can see, the Button view is painted inside a gray >> rectangle, so when i draw the oval shape that gray background appear >> behind the shape. >> >> Some idea? >> >> On 24/11/2010, Kumar Bibek wrote: >> > Well, you could use a 9 patch png for your button's background. Your >> > approach is also fine. I guess, you need a little modificaton with your >> > shape file. >> > >> > >> > Kumar Bibek >> > http://techdroid.kbeanie.com >> > http://www.kbeanie.com >> > >> > >> > >> > On Thu, Nov 25, 2010 at 12:35 AM, gato chlr wrote: >> > >> >> Hi, I'm trying to customize a button in order to have a rounded >> >> button. Also i can't use an image s background. So i need to do draw >> >> a circle and set it as the background of the button. >> >> >> >> I have been trying to draw a shape and use it as button's background >> >> but, it looks like a rectangle button, with a circle inside. I'm sure >> >> there is an easy way to do it, thanks for your help >> >> >> >> my shape >> >> >> >> http://schemas.android.com/apk/res/android"; >> >> android:shape="oval"> >> >> >> >> >> >> >> >> >> >> >> >> >> >> My button >> >> >> >> http://schemas.android.com/apk/res/android"; >> >> android:id="@+id/btnOval" >> >> android:layout_width="wrap_content" >> >> android:layout_height="wrap_content" >> >> android:text="Click Me2" >> >> android:background="@drawable/shape" >> >> android:width="150px" >> >> android:height="150px" >> >> android:textSize="25sp" >> >> android:layout_marginLeft="100px" >> >> android:layout_marginRight="100px" >> >> android:layout_marginBottom="5px" >> >> android:layout_marginTop="5px" >> >> > >> >> >> >> i have attached the current result in a gif. >> >> >> >> thanks for the help >> >> >> >> -- >> >> 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 >> > >> > -- >> > 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 >> >> -- >> 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 >> > > -- > 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 -- 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] draw button's background as a filled circle with transparent background
Well, I tried it, and it looks fine. Both on the emulator and the phone. Kumar Bibek http://techdroid.kbeanie.com http://www.kbeanie.com On Thu, Nov 25, 2010 at 1:51 AM, gato chlr wrote: > thanks for the answer!, any way , I'm trying to work without images. > As far as i can see, the Button view is painted inside a gray > rectangle, so when i draw the oval shape that gray background appear > behind the shape. > > Some idea? > > On 24/11/2010, Kumar Bibek wrote: > > Well, you could use a 9 patch png for your button's background. Your > > approach is also fine. I guess, you need a little modificaton with your > > shape file. > > > > > > Kumar Bibek > > http://techdroid.kbeanie.com > > http://www.kbeanie.com > > > > > > > > On Thu, Nov 25, 2010 at 12:35 AM, gato chlr wrote: > > > >> Hi, I'm trying to customize a button in order to have a rounded > >> button. Also i can't use an image s background. So i need to do draw > >> a circle and set it as the background of the button. > >> > >> I have been trying to draw a shape and use it as button's background > >> but, it looks like a rectangle button, with a circle inside. I'm sure > >> there is an easy way to do it, thanks for your help > >> > >> my shape > >> > >> http://schemas.android.com/apk/res/android"; > >> android:shape="oval"> > >> > >> > >> > >> > >> > >> > >> My button > >> > >> http://schemas.android.com/apk/res/android"; > >> android:id="@+id/btnOval" > >> android:layout_width="wrap_content" > >> android:layout_height="wrap_content" > >> android:text="Click Me2" > >> android:background="@drawable/shape" > >> android:width="150px" > >> android:height="150px" > >> android:textSize="25sp" > >> android:layout_marginLeft="100px" > >> android:layout_marginRight="100px" > >> android:layout_marginBottom="5px" > >> android:layout_marginTop="5px" > >> > > >> > >> i have attached the current result in a gif. > >> > >> thanks for the help > >> > >> -- > >> 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 > > > > -- > > 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 > > -- > 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 > -- 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] draw button's background as a filled circle with transparent background
thanks for the answer!, any way , I'm trying to work without images. As far as i can see, the Button view is painted inside a gray rectangle, so when i draw the oval shape that gray background appear behind the shape. Some idea? On 24/11/2010, Kumar Bibek wrote: > Well, you could use a 9 patch png for your button's background. Your > approach is also fine. I guess, you need a little modificaton with your > shape file. > > > Kumar Bibek > http://techdroid.kbeanie.com > http://www.kbeanie.com > > > > On Thu, Nov 25, 2010 at 12:35 AM, gato chlr wrote: > >> Hi, I'm trying to customize a button in order to have a rounded >> button. Also i can't use an image s background. So i need to do draw >> a circle and set it as the background of the button. >> >> I have been trying to draw a shape and use it as button's background >> but, it looks like a rectangle button, with a circle inside. I'm sure >> there is an easy way to do it, thanks for your help >> >> my shape >> >> http://schemas.android.com/apk/res/android"; >> android:shape="oval"> >> >> >> >> >> >> >> My button >> >> http://schemas.android.com/apk/res/android"; >> android:id="@+id/btnOval" >> android:layout_width="wrap_content" >> android:layout_height="wrap_content" >> android:text="Click Me2" >> android:background="@drawable/shape" >> android:width="150px" >> android:height="150px" >> android:textSize="25sp" >> android:layout_marginLeft="100px" >> android:layout_marginRight="100px" >> android:layout_marginBottom="5px" >> android:layout_marginTop="5px" >> > >> >> i have attached the current result in a gif. >> >> thanks for the help >> >> -- >> 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 > > -- > 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 -- 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] draw button's background as a filled circle with transparent background
Well, you could use a 9 patch png for your button's background. Your approach is also fine. I guess, you need a little modificaton with your shape file. Kumar Bibek http://techdroid.kbeanie.com http://www.kbeanie.com On Thu, Nov 25, 2010 at 12:35 AM, gato chlr wrote: > Hi, I'm trying to customize a button in order to have a rounded > button. Also i can't use an image s background. So i need to do draw > a circle and set it as the background of the button. > > I have been trying to draw a shape and use it as button's background > but, it looks like a rectangle button, with a circle inside. I'm sure > there is an easy way to do it, thanks for your help > > my shape > > http://schemas.android.com/apk/res/android"; > android:shape="oval"> > > > > > > > My button > > http://schemas.android.com/apk/res/android"; > android:id="@+id/btnOval" > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:text="Click Me2" > android:background="@drawable/shape" > android:width="150px" > android:height="150px" > android:textSize="25sp" > android:layout_marginLeft="100px" > android:layout_marginRight="100px" > android:layout_marginBottom="5px" > android:layout_marginTop="5px" > > > > i have attached the current result in a gif. > > thanks for the help > > -- > 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 -- 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] draw button's background as a filled circle with transparent background
Hi, I'm trying to customize a button in order to have a rounded button. Also i can't use an image s background. So i need to do draw a circle and set it as the background of the button. I have been trying to draw a shape and use it as button's background but, it looks like a rectangle button, with a circle inside. I'm sure there is an easy way to do it, thanks for your help my shape http://schemas.android.com/apk/res/android"; android:shape="oval"> My button http://schemas.android.com/apk/res/android"; android:id="@+id/btnOval" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Click Me2" android:background="@drawable/shape" android:width="150px" android:height="150px" android:textSize="25sp" android:layout_marginLeft="100px" android:layout_marginRight="100px" android:layout_marginBottom="5px" android:layout_marginTop="5px" > i have attached the current result in a gif. thanks for the help -- 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<>