You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I solved mine, give it a try :
TextView textView = new TextView(context);
FlowLayout.LayoutParams layoutParams = new FlowLayout.LayoutParams(FlowLayout.LayoutParams.WRAP_CONTENT, FlowLayout.LayoutParams.WRAP_CONTENT);
textView.setBackgroundColor(Color.GRAY);
textView.setText("New Item");
textView.setLayoutParams(layoutParams);
flowLayout.addView(textView);
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);
The text was updated successfully, but these errors were encountered: