Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to change layout of only selected listview row with in onitemclicklistener of listview
    primarykey
    data
    text
    <p>I need to create <code>ListView</code> like <code>Samsung Contact List</code>. And I need to show custom layout for that row while that row is <code>swiped</code>. And also need to show contact detail at background of that row. Please give me some ideas or reference.</p> <p>Thank You.</p> <pre><code>list.setOnItemClickListener(stationSelectionListener); final ListSwipeDetector listSwipeDetector=new ListSwipeDetector(); list.setOnTouchListener(listSwipeDetector); new UserAndMessageCount(StationListActivity.this).execute(); list.setOnItemClickListener(new OnItemClickListener() { public void onItemClick(AdapterView&lt;?&gt; parent, View view, int position, long id) { if (listSwipeDetector.swipeDetected()){ Toast.makeText(StationListActivity.this,"sWIPE1",Toast.LENGTH_LONG).show(); LayoutInflater inflater=(LayoutInflater)getApplicationContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE); View viewNew=inflater.inflate(R.layout.view_flow_common_page, null); view=viewNew; } else { ConstantValues.STATION_NAME=((TextView)view.findViewById(R.id.textView)).getText().toString(); LayoutInflater inflater=(LayoutInflater)getApplicationContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE); View viewNew=inflater.inflate(R.layout.view_flow_common_page, null); //startActivity(new Intent(getApplicationContext(), StationSelectionActivity.class)); } } }); list.setOnItemLongClickListener(new OnItemLongClickListener() { public boolean onItemLongClick(AdapterView&lt;?&gt; parent, View view,int position, long id) { if (listSwipeDetector.swipeDetected()){ Toast.makeText(StationListActivity.this,"sWIPE3",Toast.LENGTH_LONG).show(); } else { Toast.makeText(StationListActivity.this,"sWIPE4",Toast.LENGTH_LONG).show(); } return false; } }); </code></pre>
    singulars
    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.
 

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