FileDocCategorySizeDatePackage
ListRecyclerProfiling.javaAPI DocAndroid 5.1 API1787Thu Mar 12 22:22:12 GMT 2015android.widget.listview

ListRecyclerProfiling

public class ListRecyclerProfiling extends android.app.Activity

Fields Summary
Constructors Summary
Methods Summary
public voidonCreate(android.os.Bundle icicle)

        super.onCreate(icicle);

        setContentView(R.layout.list_recycler_profiling);

        String values[] = new String[1000];
        for (int i = 0; i < 1000; i++) {
            values[i] = ((Integer) i).toString();
        }

        ListView listView = (ListView) findViewById(R.id.list);

        ViewDebug.startRecyclerTracing("SimpleList", listView);

        listView.setAdapter(new ArrayAdapter<String>(this,
                android.R.layout.simple_list_item_1, values));

        ImageButton stopProfiling = (ImageButton) findViewById(R.id.pause);
        stopProfiling.setOnClickListener(new View.OnClickListener() {
            public void onClick(View v) {
                ViewDebug.stopRecyclerTracing();
            }
        });