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 am using the FlowLayout in a ScrollView and the right side of the layout is getting cut off. Not sure if this is related it to being in a ScrollView or not.
The last entry is getting cut off too.
I am programmatically adding TextViews to the FlowLayout:
private void updateMoviesTvTags() {
moviesTvContainer.removeAllViews();
for (int i = 0; i < 50; i++) {
CustomTextView tag = new CustomTextView(getActivity());
FlowLayout.LayoutParams lp = new FlowLayout.LayoutParams(FlowLayout.LayoutParams
.WRAP_CONTENT, FlowLayout.LayoutParams.WRAP_CONTENT);
lp.setMargins(0, 0, 10, 10);
tag.setLayoutParams(lp);
tag.setBackground(getResources().getDrawable(R.drawable.tag_bg));
tag.setText("test");
tag.setTextSize(16);
tag.setTextColor(getResources().getColor(R.color.primary_blue));
tag.setPadding(10, 10, 10, 10);
moviesTvContainer.addView(tag);
}
}
<com.wefika.flowlayout.FlowLayout
android:id="@+id/movies_tv_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="start|top"
android:padding="10dp"/>
The text was updated successfully, but these errors were encountered:
Could it be that you set padding in your XML-Layout? I got the same problem if I add padding to the FlowLayout. Without the padding everything is working correctly.
I am using the FlowLayout in a ScrollView and the right side of the layout is getting cut off. Not sure if this is related it to being in a ScrollView or not.
The last entry is getting cut off too.
I am programmatically adding TextViews to the FlowLayout:
The text was updated successfully, but these errors were encountered: