Skip to content

Commit

Permalink
fix: markdown options hidden behind keyboard
Browse files Browse the repository at this point in the history
  • Loading branch information
rebelonion committed Jun 26, 2024
1 parent f62bdf9 commit b109d50
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@
android:parentActivityName=".MainActivity" />
<activity
android:name=".util.ActivityMarkdownCreator"
android:windowSoftInputMode="adjustResize" />
android:windowSoftInputMode="adjustResize|stateHidden" />
<activity android:name=".parsers.ParserTestActivity" />
<activity
android:name=".media.ReviewActivity"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import android.view.ViewGroup
import android.widget.FrameLayout
import android.widget.ImageView
import android.widget.LinearLayout
import androidx.appcompat.app.AlertDialog
import androidx.appcompat.app.AppCompatActivity
import androidx.core.view.updateLayoutParams
import androidx.core.widget.addTextChangedListener
Expand All @@ -16,6 +15,7 @@ import ani.dantotsu.databinding.ActivityMarkdownCreatorBinding
import ani.dantotsu.initActivity
import ani.dantotsu.navBarHeight
import ani.dantotsu.openLinkInBrowser
import ani.dantotsu.others.AndroidBug5497Workaround
import ani.dantotsu.statusBarHeight
import ani.dantotsu.themes.ThemeManager
import ani.dantotsu.toast
Expand All @@ -42,7 +42,7 @@ class ActivityMarkdownCreator : AppCompatActivity() {
BOLD("****", 2, R.id.formatBold),
ITALIC("**", 1, R.id.formatItalic),
STRIKETHROUGH("~~~~", 2, R.id.formatStrikethrough),
SPOILER("||", 2, R.id.formatSpoiler),
SPOILER("~||~", 2, R.id.formatSpoiler),
LINK("[Placeholder](%s)", 0, R.id.formatLink),
IMAGE("img(%s)", 0, R.id.formatImage),
YOUTUBE("youtube(%s)", 0, R.id.formatYoutube),
Expand All @@ -68,6 +68,7 @@ class ActivityMarkdownCreator : AppCompatActivity() {
bottomMargin += navBarHeight
}
setContentView(binding.root)
AndroidBug5497Workaround.assistActivity(this) {}

val params = binding.createButton.layoutParams as ViewGroup.MarginLayoutParams
params.marginEnd = 16 * resources.displayMetrics.density.toInt()
Expand Down

0 comments on commit b109d50

Please sign in to comment.