Open codebreaker9904 opened 6 years ago
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.
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:
And find attached the screenshots.