Note that there are some explanatory texts on larger screens.

plurals
  1. POlistfragment on click into custom list in another fragment
    primarykey
    data
    text
    <p>when i click on listfragment particular data that data has to be shown in custom listview in second fragment.means that clicked item has to be add in the second fragment. but list view is not appearing..</p> <pre><code>public class MyPlayerFrag extends Fragment { Context context; CustomDetailAdapter adapter; ListView list; LayoutInflater mInflater; ArrayList&lt;String&gt; title =new ArrayList&lt;String&gt;(); ArrayList&lt;String&gt; description =new ArrayList&lt;String&gt;(); @Override public void onAttach(Activity activity) { // TODO Auto-generated method stub super.onAttach(activity); } public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // TODO Auto-generated method stub View v = inflater.inflate(R.layout.detail, container,false); list = (ListView)v.findViewById(R.id.listview); return v; } public void detailData(Context applicationContext,ArrayList&lt;String&gt; data1,ArrayList&lt;String&gt; data2){ this.title =data1; this.description=data2; CustomDetailAdapter adapter =new CustomDetailAdapter(context, title, description); list.setAdapter(adapter); here am getting output like in log System.out.println(" title::"+ title); as[keyboard1,keyboard2] } } public class CustomDetailAdapter extends BaseAdapter { Context context ; ArrayList&lt;String&gt; items= null; ArrayList&lt;String&gt; items1= null; public CustomDetailAdapter(Context context,ArrayList&lt;String&gt; items, ArrayList&lt;String&gt; items1) { this.context =context; // TODO Auto-generated constructor stub this.items = items; this.items1 = items1; } /*private view holder class*/ private class ViewHolder { TextView txtTitle; TextView txtDesc; } public View getView(final int position, View convertView, ViewGroup parent) { // TODO Auto-generated method stub ViewHolder holder = null; System.out.println("am in getview"); mInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); if (convertView == null) { convertView = mInflater.inflate(R.layout.player, null); holder = new ViewHolder(); holder.txtTitle = (TextView) convertView.findViewById(R.id.title); holder.txtDesc = (TextView) convertView.findViewById(R.id.desc); convertView.setTag(holder); } else { holder = (ViewHolder) convertView.getTag(); } holder.txtTitle.setText(items1.get(position)); holder.txtDesc.setText(items.get(position)); return convertView; } @Override public Object getItem(int position) { return items; } @Override public int getCount() { // TODO Auto-generated method stub return 0; } @Override public long getItemId(int arg0) { // TODO Auto-generated method stub return 0; } } </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.
    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