Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid- List items won't activate in 2-pane Detail/Flow with custom list adapter
    primarykey
    data
    text
    <p>I'm using the Master detail flow template from Eclipse with a custom list adapter which displays an image and 3 pieces of text:</p> <pre><code>public class CustomAdapter extends BaseAdapter { private Activity activity; private ArrayList&lt;HashMap&lt;String,String&gt;&gt; data; private static LayoutInflater inflater=null; public ImageLoader imageLoader;//I have a class for loading images public CustomAdapter(Activity a, ArrayList&lt;HashMap&lt;String, String&gt;&gt; d) { activity = a; data = d; inflater = (LayoutInflater)activity.getSystemService( Context.LAYOUT_INFLATER_SERVICE); imageLoader = new ImageLoader(activity.getApplicationContext()); } public int getCount() { return data.size(); } public Object getItem(int position) { return position; } public long getItemId(int position) { return position; } public View getView(int position, View convertView, ViewGroup parent) { View vi = convertView; if(convertView == null) vi = inflater.inflate(R.layout.list_row, null); TextView text1 = (TextView) vi.findViewById(R.id.text1); TextView text2 = (TextView) vi.findViewById(R.id.text2); TextView text3 = (TextView) vi.findViewById(R.id.text3); ImageView image= (ImageView) vi.findViewById(R.id.image); HashMap&lt;String, String&gt; tap = new HashMap&lt;String, String&gt;(); tap = data.get(position); // Setting all values in listview text1.setText("item1"); text2.setText("item2"); text3.setText("item3"); imageLoader.DisplayImage(R.drawable.display_image, R.drawable.loading_image, image); return vi; } } </code></pre> <p>The method <code>setActiveOnItemClick()</code> has been unchanged in the <code>ItemListFragment</code> class and this method is called from the <code>ItemListActivity</code> class when in two-pane-mode, exactly as in the template. However list items are not given the 'activated' state when clicked in two-pane mode. Why is this and How do I fix?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload