TagCloudLinkView
½éÉÜ£º
¿ÉÒÔÍê³ÉÌí¼Ó¡¢É¾³ý¡¢Ñ¡Ôñ²Ù×÷µÄ±êÇ©¿Ø¼þ£¬¿ÉÒÔ×Ô¶¨Ñùʽ£¨ÑÕÉ«µÈ£©£¬¿Éɾ³ýµÄ±êǩĩβ´øÓÐ'¡Á'·ûºÅ¡£ºÍAndroid-Cloud-TagView-Plus£¨¼ûÕýÎÄÏà¹Ø´úÂ룩ÀàËÆ¡£
ÔËÐÐЧ¹û£º
ʹÓÃ˵Ã÷£º
xml²¼¾ÖÖУº
<com.ns.developer.tagview.widget.TagCloudLinkView
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/test"
android:layout_width="500px"
android:layout_height="match_parent"
android:padding="4dp"
android:background="#ffffff"
app:isDeletable="false"
app:tagLayoutColor="#ffff0000"
app:tagTextSize="8sp"
app:tagTextColor="#ff9acd32"
app:deletableTextSize="8sp"
app:deletableTextColor="#ff9acd32"/>
Ìí¼Ó±êÇ©¶ÔÏó
TagCloudLinkView view = (TagCloudLinkView) findViewById(R.id.xxx);
view.add(new Tag(1,"TAG TEXT 1"));
view.add(new Tag(1,"TAG TEXT 2"));
view.add(new Tag(1,"TAG TEXT 3"));
view.drawTags();
¼àÌýÑ¡Ôñʼþ
view.setOnTagSelectListener(new TagCloudLinkView.OnTagSelectListener(){
@Override
public void onTagSelected(Tag tag, int i) {
// write something
}
});
¼àÌýɾ³ýʼþ
view.setOnTagDeleteListener(new TagCloudLinkView.OnTagDeleteListener() {
@Override
public void onTagDeleted(Tag tag, int i) {
// write something
}
});
已下载
0