Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- "data": {
- "mData": [
- {
- "Field1": 262,
- "Field2": 6695,
- },
- {
- "Field1": 252,
- "Field2": 3295,
- }
- ]
- },
- "errors": false}
- LinearLayout parentLayout = (LinearLayout)findViewById(R.id.layout);
- LayoutInflater layoutInflater = getLayoutInflater();
- View view;
- for (int i = 1; i < jsonObjctsCount; i++){
- // Add the text layout to the parent layout
- view = layoutInflater.inflate(R.layout.text_layout, parentLayout, false);
- // In order to get the view we have to use the new view with text_layout in it
- TextView textView = (TextView)view.findViewById(R.id.text);
- textView.setText("Row " + i);
- // Add the text view to the parent layout
- parentLayout.addView(textView);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement