Code example for HashMap

Methods: put

0
        mList.setOnItemClickListener(mOnClickListener);
    } 
 
    private void addItem(List<Map<String, Object>> data, String name,
            Class<? extends Fragment> clazz, int fragmentId) {
        Map<String, Object> temp = new HashMap<String, Object>();
        temp.put(KEY_TITLE, name);
        temp.put(KEY_CLASS, clazz);
        temp.put(KEY_FRAGMENT_ID, fragmentId);
        data.add(temp);
    } 
 
    private List<Map<String, Object>> getTests() {
        List<Map<String, Object>> result = new ArrayList<Map<String, Object>>();
 
        addItem(result, "Basic", BiDiTestBasic.class, R.id.basic);
 
        addItem(result, "Canvas2", BiDiTestCanvas2.class, R.id.canvas2);
 
        addItem(result, "TextView LTR", BiDiTestTextViewLtr.class, R.id.textview_ltr);
        addItem(result, "TextView RTL", BiDiTestTextViewRtl.class, R.id.textview_rtl);