fix HeaderCell

This commit is contained in:
luvletter2333 2022-07-12 21:09:32 +08:00
parent e8accc449d
commit 8f4741f8ab
No known key found for this signature in database
GPG Key ID: A26A8880836E1978
1 changed files with 3 additions and 2 deletions

View File

@ -77,7 +77,8 @@ public class HeaderCell extends LinearLayout {
textView.setGravity((LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT) | Gravity.CENTER_VERTICAL);
textView.setTextColor(getThemedColor(textColorKey));
textView.setTag(textColorKey);
addView(textView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT, (LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT) | Gravity.TOP, 0, topMargin, padding, text2 ? 0 : bottomMargin));
// addView(textView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT, (LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT) | Gravity.TOP, padding, topMargin, padding, text2 ? 0 : bottomMargin));
addView(textView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT));
textView2 = new TextView(getContext());
textView2.setTextSize(13);
@ -107,7 +108,7 @@ public class HeaderCell extends LinearLayout {
}
public void setHeight(int value) {
textView.setMinHeight(AndroidUtilities.dp(height = value) - ((LayoutParams) textView.getLayoutParams()).topMargin);
textView.setMinHeight(AndroidUtilities.dp(value) - ((LayoutParams) textView.getLayoutParams()).topMargin);
}
public void setEnabled(boolean value, ArrayList<Animator> animators) {