Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7038157
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T01:38:07+00:00 2026-05-28T01:38:07+00:00

I am displaying the Data in to ListView as like below code: private class

  • 0

I am displaying the Data in to ListView as like below code:

private class OrderAdapter extends ArrayAdapter<Employer> {

    private ArrayList<Employer> items;

    public OrderAdapter(Context context, int textViewResourceId, ArrayList<Employer> items) {
            super(context, textViewResourceId, items);
            this.items = items;
    }
    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
            View v = convertView;
            if (v == null) {
                LayoutInflater vi = (LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE);
                v = vi.inflate(R.layout.paye_list_row, null);
            }
            Employer o = items.get(position);
            if (o != null) {
                    TextView tt = (TextView) v.findViewById(R.id.toptext);
                    TextView bt = (TextView) v.findViewById(R.id.value);

                    if (tt != null) {
                        tt.setText(o.getOrderName()); // Setting the Value here      

                    }
                    if(bt != null){

                        if(position==0)
                           bt.setText(o.getTaxcode()); // Setting the Value here
                        if(position==1)
                            bt.setText(o.getPayPeriod()); // Setting the Value here
                        if(position==2)
                            bt.setText(o.getPayFrequency()); // Setting the Value here
                        if(position==3)
                            bt.setText(o.getSalaryWage()); // Setting the Value here
                        if(position==4)
                            bt.setText(o.getNetGrossAmount()); // Setting the Value here
                        if(position==5)
                            bt.setText(o.getKiwiSaverMember()); // Setting the Value here
                        if(position==6)
                            bt.setText(o.getEmployeeDeduction()); // Setting the Value here
                        if(position==7)
                            bt.setText(o.getEmployeeContribution()); // Setting the Value here
                        if(position==8)
                            bt.setText(o.getComplyingFundMember()); // Setting the Value here
                        if(position==9)
                            bt.setText(o.getFundContribution()); // Setting the Value here
                        if(position==10)
                            bt.setText(o.getESCTTaxRate()); // Setting the Value here
                        if(position==11)
                            bt.setText(o.getChildSupportDeduction()); // Setting the Value here
                        if(position==12)
                            bt.setText(o.getPayrollDonation()); // Setting the Value here

                    }
            }
            return v;
    }
}

And i am adding the data manualy to my another ArrayList like below code:

// Set Employee one by one
                ArrayList<Employer> tempEmployerList = employerList;
                System.out.println("=================================" +
                        "=IN end Document================================");
                System.out.println(" tempEmployerList Size:" +tempEmployerList.size());
                Employer m = new Employer();
                //  My Code for to add data
                m = new Employer();
                m.setTaxcode(taxCodeValue);
                m.setPayPeriod(payPeriodValue);
                m.setPayFrequency(payFrequencyValue);
                m.setSalaryWage(salaryWageValue);
                m.setNetGrossAmount("Gross");
                m.setKiwiSaverMember(kiwiSaverMemberValue);
                m.setEmployeeDeduction(employeeDeductionValue);
                m .setEmployeeContribution(employeeContributionValue);
                m.setComplyingFundMember(complyingFundMemberValue);
                m.setFundContribution(fundContributionValue);
                m.setESCTTaxRate(ESCTTaxRateValue);
                m.setChildSupportDeduction(childSupportDeductionValue);
                m.setPayrollDonation(payrollDonationValue);
                employerList.add(m); 

If I want to display that data in log cat then i can see it by below code:

//  TO DISPLAY DATA
                for(int j=0;j<tempEmployerList.size();j++)
                {
                    System.out.println("================ Employee: "+(j+1)+"======================");
                    m = new Employer();

                    m=tempEmployerList.get(j);
                    //System.out.println("TaxCodeHeading: "+(j+1)+" = "+m.getOrderName());
                    System.out.println("TaxCode: "+(j+1)+" = "+m.getTaxcode());
                    System.out.println("PayPeriod: "+(j+1)+" = "+m.getPayPeriod());
                    System.out.println("Frequency: "+(j+1)+" = "+m.getPayFrequency());
                    System.out.println("Salary/Wage: "+(j+1)+" = "+m.getSalaryWage());
                    System.out.println("NetGross Amount: "+(j+1)+" = "+m.getNetGrossAmount());
                    System.out.println("KiwiSaverMember: "+(j+1)+" = "+m.getKiwiSaverMember());
                    System.out.println("Employee Deduction: "+(j+1)+" = "+m.getEmployeeDeduction());
                    System.out.println("Complying Fund Member: "+(j+1)+" = "+m.getComplyingFundMember());
                    System.out.println("Fund Contribution: "+(j+1)+" = "+m.getFundContribution());
                    System.out.println("ESCT Tax Rate: "+(j+1)+" = "+m.getESCTTaxRate());
                    System.out.println("Child Support Deduction: "+(j+1)+" = "+m.getChildSupportDeduction());
                    System.out.println("Payroll giving Donation: "+(j+1)+" = "+m.getPayrollDonation());
                }

All Works fine. But now if i have added more then one employee then i want to display it on the List view one by one on the click of the next button click.

So how it is Possible.
Please help me for that.
Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T01:38:08+00:00Added an answer on May 28, 2026 at 1:38 am

    Declare an Employee Object as a Field in Activity, and load your adapter data from that field, in case of next and previous button event change Employer object to next or previous item in list and call adapter.notifyDataSetChanged() method.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created a custom ArrayAdapter to display data within ListView items from an
I'm displaying data from an XML file (simplified below) with an mx:Tree class in
Following shows the code and screenshot for displaying data in listview containing 3 textview
I am trying to implement a ListView data control for displaying and editing lookup
I would like to use databinding when displaying data in a TextBox. I'm basically
I'm using linqdatasource for displaying data in listview (nested because of grouping) control. I
The Code below displays a dialog after clicking on a ListView's Item.I would instead
I'm displaying data in a ListView. The data (gotten through a DLL and set
I am developing an application,In my application,I am using Listview for displaying data using
I have a ListView that is displaying data stored in a file, normally, we

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.