简体   繁体   中英

How to Delete part of text in all items Listview android?

I have list of directory and list in listview

在此处输入图片说明

I want remove part of text in all items 00 3-0 rec delele from items.

The simple way to do this is to format your text in your adapter for the list view.

You can do it in getView of your adapter

Use yourString.replace("00 3-0",""); in getView or in your List of items by iterating through them.

See here

Change this

list.add(m.group(1));

to

list.add((m.group(1)).replace("00 3-0",""));

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM