Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>make sure, HomeActivity.select1.length, and GlobalClass.myval.size() and GlobalClass.myvals.size() are of same size.</p> <p>I am editing your answer, please make a note its just a workaround, coz to get a proper solution I need to understand these data sources well.</p> <pre><code>public class TicketActivity extends Activity{ TextView t1; TextView t2; ListView l1; TextView t6; public void onCreate(Bundle savedInstanceState){ super.onCreate(savedInstanceState); setContentView(R.layout.ticket); t1=(TextView)findViewById(R.id.textView3); t2=(TextView)findViewById(R.id.textView5); l1=(ListView)findViewById(R.id.listView1); //Get the Table no Value From Edit Text Intent i1=getIntent(); Bundle b=i1.getExtras(); int num=b.getInt("Table No:"); String pno=Integer.toString(num); t1.setText(pno); //Get The Guest Value From Edit Text Intent i2=getIntent(); Bundle b1=i2.getExtras(); int num1=b1.getInt("Guest:"); String pno1=Integer.toString(num1); t2.setText(pno1); l1.setAdapter(new EfficientAdapter(TicketActivity.this)); } private static class EfficientAdapter extends BaseAdapter{ private LayoutInflater mInflater; public EfficientAdapter(Context context){ mInflater=LayoutInflater.from(context); // implementation of EfficientAdapter } public int getCount() { return GlobalClass.myval.size()&lt;GlobalClass.myvals.size()?GlobalClass.myval.size():GlobalClass.myvals.size(); } public Object getItem(int position) { return position; } public long getItemId(int position) { return position ; } public View getView(int position, View convertView, ViewGroup parent) { ViewHolder holder; String[] stockArr = new String[GlobalClass.myval.size()]; stockArr = GlobalClass.myval.toArray(stockArr); String[] stockArr1=new String[GlobalClass.myvals.size()]; stockArr1=GlobalClass.myvals.toArray(stockArr1); if(convertView==null){ convertView=mInflater.inflate(R.layout.list_ticket, null); holder=new ViewHolder(); holder.Text1=(TextView) convertView.findViewById(R.id.textView1); holder.Text2=(TextView) convertView.findViewById(R.id.textView2); holder.Text3=(TextView) convertView.findViewById(R.id.textView3); convertView.setTag(holder); } else{ holder=(ViewHolder)convertView.getTag(); } holder.Text2.setText(stockArr[position]); holder.Text3.setText(stockArr1[position]); return convertView; } } static class ViewHolder{ TextView Text1; TextView Text2; TextView Text3; } } </code></pre>
    singulars
    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. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      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