fix fab being hidden when scrolling to top
closes sk22#528
This commit is contained in:
@@ -65,7 +65,6 @@ public class TextStatusDisplayItem extends StatusDisplayItem{
|
||||
spoilerEmojiHelper.setText(parsedSpoilerText);
|
||||
}
|
||||
session = AccountSessionManager.getInstance().getAccount(parentFragment.getAccountID());
|
||||
UiUtils.loadMaxWidth(parentFragment.getContext());
|
||||
}
|
||||
|
||||
public void setTranslationShown(boolean translationShown) {
|
||||
|
||||
@@ -17,6 +17,7 @@ import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.res.ColorStateList;
|
||||
import android.content.res.Configuration;
|
||||
import android.content.res.Resources;
|
||||
import android.content.res.TypedArray;
|
||||
import android.database.Cursor;
|
||||
import android.graphics.Bitmap;
|
||||
@@ -141,15 +142,11 @@ public class UiUtils {
|
||||
private static Handler mainHandler = new Handler(Looper.getMainLooper());
|
||||
private static final DateTimeFormatter DATE_FORMATTER_SHORT_WITH_YEAR = DateTimeFormatter.ofPattern("d MMM uuuu"), DATE_FORMATTER_SHORT = DateTimeFormatter.ofPattern("d MMM");
|
||||
public static final DateTimeFormatter DATE_TIME_FORMATTER = DateTimeFormatter.ofLocalizedDateTime(FormatStyle.LONG, FormatStyle.SHORT);
|
||||
public static int MAX_WIDTH;
|
||||
public static int MAX_WIDTH, SCROLL_TO_TOP_DELTA;
|
||||
|
||||
private UiUtils() {
|
||||
}
|
||||
|
||||
public static void loadMaxWidth(Context ctx) {
|
||||
if (MAX_WIDTH == 0) MAX_WIDTH = (int) ctx.getResources().getDimension(R.dimen.layout_max_width);
|
||||
}
|
||||
|
||||
public static void launchWebBrowser(Context context, String url) {
|
||||
try {
|
||||
if (GlobalUserPreferences.useCustomTabs) {
|
||||
@@ -898,6 +895,10 @@ public class UiUtils {
|
||||
|
||||
ColorPalette palette = ColorPalette.palettes.get(GlobalUserPreferences.color);
|
||||
if (palette != null) palette.apply(context);
|
||||
|
||||
Resources res = context.getResources();
|
||||
MAX_WIDTH = (int) res.getDimension(R.dimen.layout_max_width);
|
||||
SCROLL_TO_TOP_DELTA = (int) res.getDimension(R.dimen.scroll_to_top_delta);
|
||||
}
|
||||
|
||||
public static boolean isDarkTheme() {
|
||||
|
||||
@@ -23,7 +23,6 @@ public class ComposeMediaLayout extends ViewGroup{
|
||||
|
||||
public ComposeMediaLayout(Context context, AttributeSet attrs, int defStyle){
|
||||
super(context, attrs, defStyle);
|
||||
UiUtils.loadMaxWidth(context);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -27,7 +27,6 @@ public class MediaGridLayout extends ViewGroup{
|
||||
|
||||
public MediaGridLayout(Context context, AttributeSet attrs, int defStyle){
|
||||
super(context, attrs, defStyle);
|
||||
UiUtils.loadMaxWidth(context);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user