Android examples for User Interface:ListView
find ListView By Item View
//package com.java2s; import android.util.Log; import android.view.View; import android.view.ViewGroup; import android.widget.ListView; public class Main { public static View findListViewByItemView(View view) { if (view == null || view.getParent() instanceof ListView) { return view; } else {/* www . j a v a2 s . c o m*/ Log.i("---", "---" + view); return findListViewByItemView((ViewGroup) view.getParent()); } } }