[android-developers] Re: Customizing a RadioGroup

2010-09-16 Thread Kumar Bibek
Why do you need to make it a WebView? TextView can handle simple HTML
contents.

-Kumar Bibek
http://techdroid.kbeanie.com

On Sep 17, 2:22 am, Neilz  wrote:
> Hi all.
>
> I want to edit the appearance of a radio group, or the radio buttons
> within the group.
>
> As standard, you get a radio button, with what I assume is a TextView
> alongside it containing the text to be displayed. I want to somehow
> override this to be a WebView.
>
> Can this be done?

-- 
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: Customizing a RadioGroup

2010-09-17 Thread Neilz
I'm sorry but I really don't understand what you mean by this. Put a
WebView in what layout?

Here's a basic radio:

 

So, I want the text to appear in a WebView alongside the small round
button.

Putting a WebView within the RadioButton layout just causes a
ClassCastException...

On Sep 16, 11:15 pm, Mark Murphy  wrote:
> On Thu, Sep 16, 2010 at 5:22 PM, Neilz  wrote:
> > As standard, you get a radio button, with what I assume is a TextView
> > alongside it containing the text to be displayed. I want to somehow
> > override this to be a WebView.
>
> > Can this be done?
>
> Step #1: android:text="" on the RadioButton
>
> Step #2: Put a WebView in the layout
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy

-- 
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: Customizing a RadioGroup

2010-09-17 Thread Kumar Bibek
If you have a text that is HTML, you can set the text to a RadioButton
like this.

RadioButton.setText(Html.from(htmlString));

Try this out, this should work.

-Kumar Bibek
http://techdroid.kbeanie.com

On Sep 17, 1:20 pm, Neilz  wrote:
> I'm sorry but I really don't understand what you mean by this. Put a
> WebView in what layout?
>
> Here's a basic radio:
>
>             android:layout_width="wrap_content"
>           android:layout_height="wrap_content"
>           android:text="I want this text to appear in a WebView" />
>
> So, I want the text to appear in a WebView alongside the small round
> button.
>
> Putting a WebView within the RadioButton layout just causes a
> ClassCastException...
>
> On Sep 16, 11:15 pm, Mark Murphy  wrote:
>
> > On Thu, Sep 16, 2010 at 5:22 PM, Neilz  wrote:
> > > As standard, you get a radio button, with what I assume is a TextView
> > > alongside it containing the text to be displayed. I want to somehow
> > > override this to be a WebView.
>
> > > Can this be done?
>
> > Step #1: android:text="" on the RadioButton
>
> > Step #2: Put a WebView in the layout
>
> > --
> > Mark Murphy (a Commons 
> > Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
>

-- 
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: Customizing a RadioGroup

2010-09-17 Thread Neilz
Unfortunately I'm using a lot of tags that, as far as I know, this
won't support. The reason I'm using WebView is that I need javascript
calls, links with OnClick() etc. I don't think that's supported by
that method?

On Sep 17, 9:39 am, Kumar Bibek  wrote:
> If you have a text that is HTML, you can set the text to a RadioButton
> like this.
>
> RadioButton.setText(Html.from(htmlString));
>
> Try this out, this should work.
>
> -Kumar Bibekhttp://techdroid.kbeanie.com
>

-- 
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: Customizing a RadioGroup

2010-09-17 Thread Kumar Bibek
Then, probably, you can Have a WebView, not on the side. This WebView
would be your base layout. The Dump any html code into this WebView,
and let the WebView have a RadioGroup as it's child.

-Kumar Bibek
http://techdroid.kbeanie.com

On Sep 17, 3:02 pm, YuviDroid  wrote:
> Then try out what Mark suggested: set an empty text on the RadioButton, and
> on its side put a WebView.
> I haven't tried this myself, but it should be something like this:
>
> 
>              
>         android:text=""
>         ...
>      />
>
>               ...
>      />
> 
>
>
>
> On Fri, Sep 17, 2010 at 11:26 AM, Neilz  wrote:
> > Unfortunately I'm using a lot of tags that, as far as I know, this
> > won't support. The reason I'm using WebView is that I need javascript
> > calls, links with OnClick() etc. I don't think that's supported by
> > that method?
>
> > On Sep 17, 9:39 am, Kumar Bibek  wrote:
> > > If you have a text that is HTML, you can set the text to a RadioButton
> > > like this.
>
> > > RadioButton.setText(Html.from(htmlString));
>
> > > Try this out, this should work.
>
> > > -Kumar Bibekhttp://techdroid.kbeanie.com
>
> > --
> > 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
>
> --
> YuviDroid
> Check out Launch-X  (a widget to
> quickly access your favorite apps and contacts!)http://android.yuvalsharon.net

-- 
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: Customizing a RadioGroup

2010-09-17 Thread Neilz
Yes... this is kind of what I did. But... that breaks the RadioGroup,
as the RadioButtons are not direct children anymore - it has a
LinearLayout instead, so can't do anything with the radio buttons.

So, I had to create my own class which extended RadioGroup, and
implement my own handling of the radio buttons (switching the others
off when one is checked, returning the checked button, etc).

Got there in the end :-)

On Sep 17, 11:12 am, Kumar Bibek  wrote:
> Then, probably, you can Have a WebView, not on the side. This WebView
> would be your base layout. The Dump any html code into this WebView,
> and let the WebView have a RadioGroup as it's child.
>
> -Kumar Bibekhttp://techdroid.kbeanie.com
>
> On Sep 17, 3:02 pm, YuviDroid  wrote:
>
> > Then try out what Mark suggested: set an empty text on the RadioButton, and
> > on its side put a WebView.
> > I haven't tried this myself, but it should be something like this:
>
> > 
> >      >         
> >         android:text=""
> >         ...
> >      />
>
> >       >         ...
> >      />
> > 
>
> > On Fri, Sep 17, 2010 at 11:26 AM, Neilz  wrote:
> > > Unfortunately I'm using a lot of tags that, as far as I know, this
> > > won't support. The reason I'm using WebView is that I need javascript
> > > calls, links with OnClick() etc. I don't think that's supported by
> > > that method?
>
> > > On Sep 17, 9:39 am, Kumar Bibek  wrote:
> > > > If you have a text that is HTML, you can set the text to a RadioButton
> > > > like this.
>
> > > > RadioButton.setText(Html.from(htmlString));
>
> > > > Try this out, this should work.
>
> > > > -Kumar Bibekhttp://techdroid.kbeanie.com
>
> > > --
> > > 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
>
> > --
> > YuviDroid
> > Check out Launch-X  (a widget to
> > quickly access your favorite apps and 
> > contacts!)http://android.yuvalsharon.net
>
>

-- 
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: Customizing a RadioGroup

2010-09-17 Thread YuviDroid
Then try out what Mark suggested: set an empty text on the RadioButton, and
on its side put a WebView.
I haven't tried this myself, but it should be something like this:




 


On Fri, Sep 17, 2010 at 11:26 AM, Neilz  wrote:

> Unfortunately I'm using a lot of tags that, as far as I know, this
> won't support. The reason I'm using WebView is that I need javascript
> calls, links with OnClick() etc. I don't think that's supported by
> that method?
>
> On Sep 17, 9:39 am, Kumar Bibek  wrote:
> > If you have a text that is HTML, you can set the text to a RadioButton
> > like this.
> >
> > RadioButton.setText(Html.from(htmlString));
> >
> > Try this out, this should work.
> >
> > -Kumar Bibekhttp://techdroid.kbeanie.com
> >
>
> --
> 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
>



-- 
YuviDroid
Check out Launch-X  (a widget to
quickly access your favorite apps and contacts!)
http://android.yuvalsharon.net

-- 
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