The code that I am using is this:
In the method getView of the ArrayAdapter class, when you click in the
title of one of the items, I do this:
class EventoAdapter extends ArrayAdapter {
Activity context;
EventoAdapter(Activity context) {
super(context, R.layout.listitem_titular, miLista);
this.context = context;
}
public View getView(int position, View convertView,
ViewGroup parent) {
....................................
lblTitle.setOnClickListener(new
OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
TextView tv = (TextView)findViewById(
R.id.link2_view );
tv.setText(la_dire);
Linkify.addLinks( tv, Linkify.WEB_URLS );
}
});
}
.................
}
When I click labelTitle, the link appeared, and you can click there
and open the url . BUt What I want isn´t this, I want when I click in
the labelTitle to open the url directly, I don´t want to have to click
in the url.
How can I do this?
thank you very much, excuse my english.
On May 3, 12:04 pm, beginer <[email protected]> wrote:
> I resolved the problem, but known the link only appear sometimes. I
> have a List View, and the both elements have a link, but in some
> element appear the link and in others not.
> Wht is the problem?
> thaks very much
>
> On May 3, 10:42 am, Kostya Vasilyev <[email protected]> wrote:
>
>
>
>
>
>
>
> > Something is null at line 147 in your AndroidXml.java.
>
> > -- Kostya
>
> > 03.05.2011 12:11, beginer ?????:
>
> > > 05-03 08:05:16.051: ERROR/AndroidRuntime(339): FATAL EXCEPTION: main
> > > 05-03 08:05:16.051: ERROR/AndroidRuntime(339):
> > > java.lang.NullPointerException
> > > 05-03 08:05:16.051: ERROR/AndroidRuntime(339): at
> > > net.sgoliver.AndroidXml$EventoAdapter.getView(*AndroidXml.java:147*)
>
> > --
> > Kostya Vasilyev --http://kmansoft.wordpress.com
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en