44import android .content .pm .PackageManager ;
55import android .os .Bundle ;
66import android .util .Log ;
7+ import android .view .View ;
78import android .view .ViewGroup ;
9+ import android .view .WindowManager ;
810import android .widget .TextView ;
911import android .widget .Toast ;
1012
@@ -40,7 +42,12 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
4042 .getString (Constants .EXTRA_MARKDOWN_TITLE );
4143 String config = intent .getExtras ()
4244 .getString (Constants .EXTRA_MARKDOWN_CONFIG );
43- if (title != null && !title .isEmpty ()) setTitle (title );
45+ if (title != null && !title .isEmpty ()) {
46+ setTitle (title );
47+ }
48+ this .getWindow ().setFlags (
49+ WindowManager .LayoutParams .FLAG_TRANSLUCENT_NAVIGATION ,
50+ WindowManager .LayoutParams .FLAG_TRANSLUCENT_NAVIGATION );
4451 if (config != null && !config .isEmpty ()) {
4552 String configPkg = IntentHelper .getPackageOfConfig (config );
4653 try {
@@ -75,6 +82,8 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
7582 String markdown = new String (rawMarkdown , StandardCharsets .UTF_8 );
7683 Log .d (TAG , "Done!" );
7784 runOnUiThread (() -> {
85+ findViewById (R .id .markdownFooter )
86+ .setMinimumHeight (this .getNavigationBarHeight ());
7887 MainApplication .getINSTANCE ().getMarkwon ().setMarkdown (
7988 textView , MarkdownUrlLinker .urlLinkify (markdown ));
8089 if (markdownBackground != null ) {
@@ -92,4 +101,11 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
92101 }
93102 }, "Markdown load thread" ).start ();
94103 }
104+
105+ @ Override
106+ protected void onResume () {
107+ super .onResume ();
108+ View footer = findViewById (R .id .markdownFooter );
109+ if (footer != null ) footer .setMinimumHeight (this .getNavigationBarHeight ());
110+ }
95111}
0 commit comments