Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import android.app.Activity;

import android.view.View;
import android.widget.ListAdapter;
import android.widget.ListView;

public class Main {
    public static View findViewInList(Activity activity, ListView list, int index, String string) {
        View view = getViewInList(list, index);
        return view.findViewById(view.getResources().getIdentifier(string, "id", activity.getPackageName()));
    }

    public static View getViewInList(ListView list, int index) {
        ListAdapter adapter = list.getAdapter();
        return adapter.getView(index, null, list);
    }
}