In my application i have used list view and custom cell which contain product name , image ,quantity and price now i want to implement that if use click on the product name then it should open a new quick action showing delete /edit .
But problem is that when i m touching the listview cell, complete cell is showing focused. which is not desired. So please help me to implement this.
listviewObj = (ListView) findViewById(R.id.cart_items_listview);
listAdapter = new CustomListAdapter(ShowCart.this);
listviewObj.setAdapter(listAdapter);
listviewObj.addFocusables(views, direction)
listviewObj.setOnItemClickListener(new OnItemClickListener() {
public void onItemClick(AdapterView<?> arg0, View arg1,
int position, long arg3) {
Toast.makeText(ShowCart.this, "click on the position"+position, Toast.LENGTH_SHORT).show();
}
});
Any help is appreciated?
Thanks in advance.
You will need
listviewObj.setItemsCanFocus(true);in order for items inside listview cells to gain focus.