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

  • Home
  • SEARCH
  • 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 8032799
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T01:30:02+00:00 2026-06-05T01:30:02+00:00

I have an Scrollview in my app that has quite a large amount of

  • 0

I have an Scrollview in my app that has quite a large amount of data to load, all of them are TextViews that load an object attribute, but when i scroll the view, it sometimes load the object content to be shown, sometimes not. So what can i do to make this happen?

Here’s the ViewHolder class(it’s kinda ugly):
Something i forgot to mention, this class extends BaseAdapter, so, there’s no activity

private class ViewHolder {
    TextView txtName;
    TextView txtFaults;
    TextView txtA;
    TextView txtB;
    TextView txtC;
    TextView txtD;
    TextView txtE;
    TextView txtF;
    TextView txtG;
    TextView txtH;
    TextView txtI;
    TextView txtPFinal;
    TextView txtPart;
    TextView txtMF;
    TextView txtMP;
    TextView txtForm;
    TextView txtMN;
}

@Override
public View getView(int position, View convertView, ViewGroup parent) {
    ViewHolder holder;
    LayoutInflater inflater = activity.getLayoutInflater();

    if (convertView == null) {
        convertView = inflater.inflate(R.layout.row, null);
        holder = new ViewHolder();
        holder.txtName = (TextView) convertView
                .findViewById(R.id.txtMateria);
        holder.txtFaults = (TextView) convertView
                .findViewById(R.id.txtFaults);
        holder.txtA = (TextView) convertView.findViewById(R.id.txtA);
        holder.txtB = (TextView) convertView.findViewById(R.id.txtB);
        holder.txtC = (TextView) convertView.findViewById(R.id.txtC);
        holder.txtD = (TextView) convertView.findViewById(R.id.txtD);
        holder.txtE = (TextView) convertView.findViewById(R.id.txtE);
        holder.txtF = (TextView) convertView.findViewById(R.id.txtF);
        holder.txtG = (TextView) convertView.findViewById(R.id.txtG);
        holder.txtH = (TextView) convertView.findViewById(R.id.txtH);
        holder.txtI = (TextView) convertView.findViewById(R.id.txtI);
        holder.txtPFinal = (TextView) convertView.findViewById(R.id.txtPFinal);
        holder.txtPart = (TextView) convertView
                .findViewById(R.id.txtPart);
        holder.txtMF = (TextView) convertView.findViewById(R.id.txtMF);
        holder.txtMP = (TextView) convertView.findViewById(R.id.txtMP);
        holder.txtForm = (TextView) convertView
                .findViewById(R.id.txtForm);
        holder.txtMN = (TextView) convertView
                .findViewById(R.id.txtMN);
        convertView.setTag(holder);
    } else {
        holder = (ViewHolder) convertView.getTag();
    }

    Materia materia = list.get(position);
    holder.txtName.setText(materia.getMateria());
    holder.txtName.setTypeface(null, Typeface.BOLD);
    holder.txtFaults.setText("Faults:"
            + Double.toString(materia.getFaltas()) + "%");

    holder.txtA.setText("A:" + Double.toString(materia.getA()));
    if (materia.getA() == 98.9)
        holder.txtA.setVisibility(View.GONE);

    holder.txtB.setText("B:" + Double.toString(materia.getB()));
    if (materia.getB() == 98.9)
        holder.txtB.setVisibility(View.GONE);

    holder.txtC.setText("C:" + Double.toString(materia.getC()));
    if (materia.getC() == 98.9)
        holder.txtC.setVisibility(View.GONE);

    holder.txtD.setText("D:" + Double.toString(materia.getD()));
    if (materia.getD() == 98.9)
        holder.txtD.setVisibility(View.GONE);

    holder.txtE.setText("E:" + Double.toString(materia.getE()));
    if (materia.getE() == 98.9)
        holder.txtE.setVisibility(View.GONE);

    holder.txtF.setText("F:" + Double.toString(materia.getF()));
    if (materia.getF() == 98.9)
        holder.txtF.setVisibility(View.GONE);

    holder.txtG.setText("G:" + Double.toString(materia.getG()));
    if (materia.getG() == 98.9)
        holder.txtG.setVisibility(View.GONE);

    holder.txtH.setText("H:" + Double.toString(materia.getH()));
    if (materia.getH() == 98.9)
        holder.txtH.setVisibility(View.GONE);

    holder.txtI.setText("I:" + Double.toString(materia.getI()));
    if (materia.getI() == 98.9)
        holder.txtI.setVisibility(View.GONE);

    holder.txtPFinal.setText("PF:" + Double.toString(materia.getPf()));
    if (materia.getPfinal() == 98.9)
        holder.txtPFinal.setVisibility(View.GONE);

    holder.txtPart.setText("Partic:"
            + Double.toString(materia.getPartic()));
    if (materia.getPart() == 98.9)
        holder.txtPart.setVisibility(View.GONE);

    holder.txtMF.setText("MF:" + Double.toString(materia.getMf()));
    if (materia.getMf() == 98.9)
        holder.txtMF.setVisibility(View.GONE);

    holder.txtMP.setVisibility(View.GONE);
    if (!materia.getForm().toLowerCase().contains("inform")) {
        holder.txtMP.setText("MP:"
                + String.format("%.2f", materia.getMP()));
        holder.txtMP.setVisibility(View.VISIBLE);
    }
    holder.txtMN.setText("MN:LongClick to simulate");
    holder.txtMN.setTextColor(Color.GRAY);
    if (materia.getFormula().toLowerCase().contains("inform"))
        holder.txtMN
                .setText("Form not avaiable");

    holder.txtForm.setText("Form not informed");
    if (!materia.getFormula().toLowerCase().contains("inform"))
        holder.txtForm.setText("Form:" + materia.getForm());

    return convertView;
}

Tks

  • 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-06-05T01:30:03+00:00Added an answer on June 5, 2026 at 1:30 am

    Just realize that the lack of else on the logic were causing the trouble, thanks everyone who tried to help!

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

Sidebar

Related Questions

I have an app that has a scrollview with a bunch of different textviews
I have an app, that has an Activity that uses a ScrollView . I
I have an app that shows a series of UIImageView s on a ScrollView
I have a scrollview control that has a StackPanel (Orientation=Vertical) UI Element inside of
I currently have an app that has a UIScrollView with paging as the primary
Basically, I want to have an app with only one view that has an
Everyone, I have a WPF app that has a canvas that I have wrapped
I have an Activity that consists of a large scrollview (that contains EditText fields)
I have a scrollview with all my data to be showed and I want
In portrait mode, my app has a scrollview that shows 4 images in a

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.