dimanche 28 juin 2015

Get Database sqLite values ArrayAdapter

I'm using this library to have a HorizontalListview http://ift.tt/1h2Z6Jj

Actually to try it i have this code:

shOperations = new ShortcutsOperations(getActivity());
        shOperations.open();

        List values = shOperations.getAllShortcuts();

        if (values != null) {
            ArrayAdapter<String> aItems = new ArrayAdapter<String>(getActivity(), R.layout.shortcuts_list_layout, values);
            TwoWayView lvTest = (TwoWayView)getActivity().findViewById(R.id.shortcutsListLayout);
            lvTest.setAdapter(aItems);
        }

The R.layout.shortcuts_list_layout contains a TextView and when i start the application it shows me corrected values... Now i would have inside the layout an imageview to set a drawable but i can't "access" in that layout to set the drawable.. How can i do it?

Aucun commentaire:

Enregistrer un commentaire