Skip to content

Add view at runtime #27

@johnpilll

Description

@johnpilll

I am trying to add view at runtime, but it's not working properly.

TextView textView = new TextView(context);
ViewGroup.LayoutParams layoutParams = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
textView.setBackgroundColor(Color.GRAY);
textView.setText("New Item");
flowLayout.addView(textView,layoutParams);

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions