From 1f5a28fb335a0564f538e9b8afca588395276a87 Mon Sep 17 00:00:00 2001 From: Grishka Date: Thu, 23 Nov 2023 00:27:24 +0300 Subject: [PATCH] Add top margin to pre-reply shits --- mastodon/build.gradle | 4 ++-- .../main/java/org/joinmastodon/android/ui/PreReplySheet.java | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/mastodon/build.gradle b/mastodon/build.gradle index 28f2f078e..9c94c26e2 100644 --- a/mastodon/build.gradle +++ b/mastodon/build.gradle @@ -9,8 +9,8 @@ android { applicationId "org.joinmastodon.android" minSdk 23 targetSdk 33 - versionCode 79 - versionName "2.2.3" + versionCode 80 + versionName "2.2.4" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" resConfigs "ar-rSA", "be-rBY", "bn-rBD", "bs-rBA", "ca-rES", "cs-rCZ", "da-rDK", "de-rDE", "el-rGR", "es-rES", "eu-rES", "fa-rIR", "fi-rFI", "fil-rPH", "fr-rFR", "ga-rIE", "gd-rGB", "gl-rES", "hi-rIN", "hr-rHR", "hu-rHU", "hy-rAM", "ig-rNG", "in-rID", "is-rIS", "it-rIT", "iw-rIL", "ja-rJP", "kab", "ko-rKR", "my-rMM", "nl-rNL", "no-rNO", "oc-rFR", "pl-rPL", "pt-rBR", "pt-rPT", "ro-rRO", "ru-rRU", "si-rLK", "sl-rSI", "sv-rSE", "th-rTH", "tr-rTR", "uk-rUA", "ur-rIN", "vi-rVN", "zh-rCN", "zh-rTW" } diff --git a/mastodon/src/main/java/org/joinmastodon/android/ui/PreReplySheet.java b/mastodon/src/main/java/org/joinmastodon/android/ui/PreReplySheet.java index 2fb3c9a7a..208076567 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/ui/PreReplySheet.java +++ b/mastodon/src/main/java/org/joinmastodon/android/ui/PreReplySheet.java @@ -5,6 +5,7 @@ import android.graphics.drawable.ColorDrawable; import android.view.LayoutInflater; import android.view.View; import android.widget.Button; +import android.widget.FrameLayout; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; @@ -13,6 +14,7 @@ import org.joinmastodon.android.R; import org.joinmastodon.android.ui.utils.UiUtils; import androidx.annotation.NonNull; +import me.grishka.appkit.utils.V; import me.grishka.appkit.views.BottomSheet; public abstract class PreReplySheet extends BottomSheet{ @@ -26,6 +28,8 @@ public abstract class PreReplySheet extends BottomSheet{ View content=context.getSystemService(LayoutInflater.class).inflate(R.layout.sheet_pre_reply, null); setContentView(content); + FrameLayout.LayoutParams lp=(FrameLayout.LayoutParams) content.getLayoutParams(); + lp.topMargin=V.dp(72); setNavigationBarBackground(new ColorDrawable(UiUtils.alphaBlendColors(UiUtils.getThemeColor(context, R.attr.colorM3Surface), UiUtils.getThemeColor(context, R.attr.colorM3Primary), 0.05f)), !UiUtils.isDarkTheme());