Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
codebreaker9904 opened this issue Apr 28, 2018 · 0 comments
Open

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

codebreaker9904 opened this issue Apr 28, 2018 · 0 comments

Comments

@codebreaker9904
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant