Skip to content

LoopView - Does not work with dynamic values from server #56

Open

Description

@codebreaker9904

LoopView is not refreshing itself:

  1. Never shows rows in loopview, when i pass a arraylist from server, after fetching it.
  2. Once i put app in background and bring it back, it shows the rows.

P.S: I tried invalidate() , postinvalidate() , recreate() . Nothing works.

Below is my code:

public void refreshcategoryloop(){
    categoryLoop = (LoopView)findViewById(R.id.categoryLoop);
    categoryView.setVisibility(View.VISIBLE);
    categoryLoop.setInitPosition(0);
    categoryLoop.setCanLoop(false);
    categoryLoop.setLoopListener(new LoopScrollListener() {
        @Override
        public void onItemSelect(int item) {

        }
    });
    categoryLoop.setTextSize(15);
    categories = new ArrayList<String>();

    for (int l = 0; l < servicesArr.length(); l++) {
        try {
            categories.add(servicesArr.getJSONObject(l).getString("Performance").toString());
        } catch (JSONException e) {
            e.printStackTrace();
        }
    }
    categoryLoop.setDataList(categories);


}

And find attached the screenshots.
3e1cc379-a2e8-4862-88b3-4d6b0ec5c7ac
d087a820-29c0-43d5-8e17-5976e204ff4d

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions