Fix paddings
This commit is contained in:
parent
de763ab6f7
commit
1874267b32
5 changed files with 3 additions and 6 deletions
|
@ -260,7 +260,7 @@ public class HeaderStatusDisplayItem extends StatusDisplayItem{
|
||||||
time=item.parentFragment.getString(R.string.edited_timestamp, UiUtils.formatRelativeTimestamp(itemView.getContext(), item.status.editedAt));
|
time=item.parentFragment.getString(R.string.edited_timestamp, UiUtils.formatRelativeTimestamp(itemView.getContext(), item.status.editedAt));
|
||||||
|
|
||||||
timeAndUsername.setText(time+" · @"+item.user.acct);
|
timeAndUsername.setText(time+" · @"+item.user.acct);
|
||||||
itemView.setPadding(itemView.getPaddingLeft(), itemView.getPaddingTop(), itemView.getPaddingRight(), item.needBottomPadding ? V.dp(16) : V.dp(4));
|
itemView.setPadding(itemView.getPaddingLeft(), itemView.getPaddingTop(), itemView.getPaddingRight(), item.needBottomPadding ? V.dp(6) : V.dp(4));
|
||||||
if(TextUtils.isEmpty(item.extraText)){
|
if(TextUtils.isEmpty(item.extraText)){
|
||||||
extraText.setVisibility(View.GONE);
|
extraText.setVisibility(View.GONE);
|
||||||
}else{
|
}else{
|
||||||
|
|
|
@ -144,7 +144,6 @@ public abstract class StatusDisplayItem{
|
||||||
HtmlParser.applyFilterHighlights(fragment.getActivity(), parsedText, status.filtered);
|
HtmlParser.applyFilterHighlights(fragment.getActivity(), parsedText, status.filtered);
|
||||||
}
|
}
|
||||||
TextStatusDisplayItem text=new TextStatusDisplayItem(parentID, parsedText, fragment, statusForContent);
|
TextStatusDisplayItem text=new TextStatusDisplayItem(parentID, parsedText, fragment, statusForContent);
|
||||||
text.reduceTopPadding=header==null;
|
|
||||||
contentItems.add(text);
|
contentItems.add(text);
|
||||||
}else if(header!=null){
|
}else if(header!=null){
|
||||||
header.needBottomPadding=true;
|
header.needBottomPadding=true;
|
||||||
|
|
|
@ -32,7 +32,6 @@ public class TextStatusDisplayItem extends StatusDisplayItem{
|
||||||
private CharSequence translatedText;
|
private CharSequence translatedText;
|
||||||
private CustomEmojiHelper translationEmojiHelper=new CustomEmojiHelper();
|
private CustomEmojiHelper translationEmojiHelper=new CustomEmojiHelper();
|
||||||
public boolean textSelectable;
|
public boolean textSelectable;
|
||||||
public boolean reduceTopPadding;
|
|
||||||
public final Status status;
|
public final Status status;
|
||||||
|
|
||||||
public TextStatusDisplayItem(String parentID, CharSequence text, BaseStatusListFragment parentFragment, Status status){
|
public TextStatusDisplayItem(String parentID, CharSequence text, BaseStatusListFragment parentFragment, Status status){
|
||||||
|
@ -94,7 +93,6 @@ public class TextStatusDisplayItem extends StatusDisplayItem{
|
||||||
text.setTextIsSelectable(item.textSelectable);
|
text.setTextIsSelectable(item.textSelectable);
|
||||||
text.setInvalidateOnEveryFrame(false);
|
text.setInvalidateOnEveryFrame(false);
|
||||||
itemView.setClickable(false);
|
itemView.setClickable(false);
|
||||||
text.setPadding(text.getPaddingLeft(), item.reduceTopPadding ? V.dp(8) : V.dp(12), text.getPaddingRight(), text.getPaddingBottom());
|
|
||||||
itemView.setPaddingRelative(V.dp(item.fullWidth ? 0 : 48), 0, 0, 0);
|
itemView.setPaddingRelative(V.dp(item.fullWidth ? 0 : 48), 0, 0, 0);
|
||||||
text.setTextColor(UiUtils.getThemeColor(text.getContext(), R.attr.colorM3OnSurface));
|
text.setTextColor(UiUtils.getThemeColor(text.getContext(), R.attr.colorM3OnSurface));
|
||||||
text.setTextSize(TypedValue.COMPLEX_UNIT_SP, item.fullWidth ? 18 : 16);
|
text.setTextSize(TypedValue.COMPLEX_UNIT_SP, item.fullWidth ? 18 : 16);
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:paddingLeft="16dp"
|
android:paddingLeft="16dp"
|
||||||
android:paddingTop="16dp"
|
android:paddingTop="6dp"
|
||||||
android:paddingRight="16dp">
|
android:paddingRight="16dp">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
android:textColor="?colorM3OnSurface"
|
android:textColor="?colorM3OnSurface"
|
||||||
android:paddingLeft="16dp"
|
android:paddingLeft="16dp"
|
||||||
android:paddingRight="16dp"
|
android:paddingRight="16dp"
|
||||||
android:paddingTop="16dp"
|
android:paddingTop="6dp"
|
||||||
android:paddingBottom="8dp"
|
android:paddingBottom="8dp"
|
||||||
android:lineSpacingExtra="5.25dp"/>
|
android:lineSpacingExtra="5.25dp"/>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue