http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/view/List6.html
Taking Referece of the above link, whenI test sample and I added linkify getView function, does not work toggle.
public View getView(int position, View convertView, ViewGroup parent) {
SpeechView sv;
if (convertView == null) {
sv = new SpeechView(mContext, myTitle[position], myContent[position], mExpanded[position]);
} else {
sv = (SpeechView)convertView;
sv.setTitle(myTitle[position]);
sv.setDialogue(myContent[position]);
sv.setExpanded(mExpanded[position]);
TextView body = (TextView)sv.getChildAt(1);开发者_开发问答
body.setTextColor(Color.GRAY);
body.setText(myContent[position]);
Linkify.addLinks(body, Linkify.PHONE_NUMBERS);
body.setMovementMethod(LinkMovementMethod.getInstance());
}
TextView title = (TextView)sv.getChildAt(0);
title.setTextColor(Color.LTGRAY);
return sv;
}
精彩评论