返回
顶部

修改密码

Searching the custom listview in android studio

+1

-1

收藏

+1

-1

点赞0

评论0

I have created static listview using custom adapter. Each row of a listview has 5 fields including textviews and images.I wanted to search the listview for which i have a edittext. public ArrayList getListData() {results = new ArrayList();Events event…

I have created static listview using custom adapter. Each row of a listview has 5 fields including textviews and images.I wanted to search the listview for which i have a edittext.

public ArrayList getListData() {results = new ArrayList<Events>();Events eventData = new Events();eventData.setName("Sales Visit - logic Conference");eventData.setDetails("The first caller you can hear the awesome song.");eventData.setStartTime("2:00 pm");eventData.setEndTime("3:00 pm");eventData.setCity("Irvine");eventData.setState("CA");results.add(eventData);eventData = new Events();eventData.setName("Admin Support - Once");eventData.setDetails("One time thing. Only once. Firefly.");eventData.setStartTime("10:30 am");eventData.setEndTime("11:30 am");eventData.setState("Stanford");eventData.setCity("CA");results.add(eventData);return results;} public void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);setContentView(R.layout.activity_week_view);listview = (ListView) findViewById(R.id.listView);ArrayList image_details = getListData();listview.setAdapter(new CustomListAdapter(this, image_details)); }

扫一扫在手机打开

评论
已有0条评论
0/150
提交
热门评论
相关推荐
Get your hands on Android Studio 1.3,handsandroid
  • AndroidStudio
  • 2022-05-20 18:29
  • 9 0 0
+1
How to Use OpenCV in Android Studio,opencvandroid
  • AndroidStudio
  • 2022-05-20 18:29
  • 11 0 0
+1
Useful Android Studio Shortcuts
  • AndroidStudio
  • 2022-05-20 18:29
  • 5 0 0
+1
Android Studio tutorial for beginners
  • AndroidStudio
  • 2022-05-20 18:29
  • 11 0 0
+1
Android Studio: Simple webview setup
  • AndroidStudio
  • 2022-05-20 18:29
  • 7 0 0
+1
今日要闻
换一批
热点排行