Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Create your own custom Adapter which extends Base Adapter. Try the code below(I have used 7 textview,wrapped in a customized layout xml file):</p> <pre><code>public class Received_invitationAdapter extends BaseAdapter{ Context ctx_invitation; public Received_invitationAdapter(Context ctx_invitation) { super(); this.ctx_invitation = ctx_invitation; } @Override public int getCount() { // TODO Auto-generated method stub return PartyName.length; } @Override public Object getItem(int position) { // TODO Auto-generated method stub return PartyName[position]; } @Override public long getItemId(int position) { // TODO Auto-generated method stub return 0; } @Override public View getView(int position, View convertView, ViewGroup parent) { // TODO Auto-generated method stub View v = null; try { String inflater = Context.LAYOUT_INFLATER_SERVICE; LayoutInflater li = (LayoutInflater)ctx_invitation.getSystemService(inflater); v = li.inflate(R.layout.receivedinvitations, null); TextView tv_partyname = (TextView)v.findViewById(R.id.tv_receivedinvitation_PartyTitle); TextView tv_partydate = (TextView)v.findViewById(R.id.tv_receivedinvitation_date); TextView tv_partytime = (TextView)v.findViewById(R.id.tv_receivedinvitation_time); TextView tv_partylocation = (TextView)v.findViewById(R.id.tv_receivedinvitation_PartyLocation); TextView img_chkbox = (TextView)v.findViewById(R.id.img_chkbox_receivedinvitation); TextView img_inv_accepted = (TextView)v.findViewById(R.id.img_accept_receivedinvitation); TextView img_inv_rejected = (TextView)v.findViewById(R.id.img_reject_receivedinvitation); tv_partyname.setText(PartyName[position]); tv_partydate.setText(PartyDate[position]); tv_partytime.setText(PartyTime[position]); tv_partylocation.setText(PartyLocation[position]); System.out.println(""+img_chkbox.getVisibility()); } catch(Exception e) { e.printStackTrace(); } return v; } </code></pre> <p>The receivedinvitations.xml file contains the 7 textview defined in the getview method.</p>
    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.
    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