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
initialize ContextThemeWrapper to load the style ContextThemeWrapper themeWrapper = new ContextThemeWrapper(flexbox.getContext(),R.style.style_text_black);
Create multiple new Textview instances and add them to FlexboxLayout
for (...) {
TextView text = new TextView(themeWrapper);
text.setText("test");
flexbox.addView(text);
}
Expected behavior
TextView elements appear in the flexbox layout while considering the margins from the applied style.
Observed behavior
Margins applied by a style using ContextThemeWrapper are ignored
I agree that this might be kind of an edge case, but it took me a few minutes of trying and browsing. Finally I ended up adding separate MarginLayoutParams to my Textviews.
Version of the flexbox library
flexbox:0.3.2
The text was updated successfully, but these errors were encountered:
Issues and steps to reproduce
initialize ContextThemeWrapper to load the style
ContextThemeWrapper themeWrapper = new ContextThemeWrapper(flexbox.getContext(),R.style.style_text_black);
Create multiple new Textview instances and add them to FlexboxLayout
Expected behavior
TextView elements appear in the flexbox layout while considering the margins from the applied style.
Observed behavior
Margins applied by a style using ContextThemeWrapper are ignored
I agree that this might be kind of an edge case, but it took me a few minutes of trying and browsing. Finally I ended up adding separate MarginLayoutParams to my Textviews.
Version of the flexbox library
flexbox:0.3.2
The text was updated successfully, but these errors were encountered: