Android "Shanxi illegal query Implementation 4" (parse the Web source and then the ListView display)---to put the parsed data into the ListView

Source: Internet
Author: User

It's even easier this time.

New Arraylist<map<string, string>>(); MapNew hashmap<string, string> ();

Then take the data from Mr.group (i) and put it in.

protected voidOnPostExecute (String result) {List<map<string, string>> data =NewArraylist<map<string, string>>(); Pattern P= Pattern.compile ("Here is the regular expression"); Matcher m=P.matcher (Result);  while(M.find ()) {Matchresult Mr=M.tomatchresult (); Map<string, string> map =NewHashmap<string, string>(); Map.put ("Time", (Mr.group (1)). Trim () + "" +mr.group (2). Trim ()); Map.put ("Address", Mr.group (3). Trim ()); Map.put ("Action", "(" +mr.group (4). Trim () + ")" +mr.group (5). Trim ()); Map.put ("Money", "Buckle" +mr.group (6). Trim () + "sub-penalty" +mr.group (7). Trim () + "meta"); Map.put ("Chuli", (Mr.group (12). Trim ()));                Data.add (map); }//CustomAdapter
New
Item_lv.setadapter (adapter);

}

The results can be achieved.

Get some beautiful UI, and then add database operation (save license plate and frame number), a basic Shanxi illegal query on OK.

Android "Shanxi illegal query Implementation 4" (parse the Web source and then the ListView display)---to put the parsed data into the ListView

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.