Browse Source

Hide navigation bar after dialog dismiss

Wayne 6 years ago
parent
commit
520506daba
1 changed files with 6 additions and 1 deletions
  1. 6 1
      src/main/java/com/bomostory/sceneeditmodule/MovieEditActivity.kt

+ 6 - 1
src/main/java/com/bomostory/sceneeditmodule/MovieEditActivity.kt

@@ -269,7 +269,10 @@ class MovieEditActivity : AppCompatActivity(), DialogInterface.OnDismissListener
                 mediaHelper)
                 .subscribeOn(Schedulers.io())
                 .observeOn(AndroidSchedulers.mainThread())
-                .doOnSubscribe { pd.show() }
+                .doOnSubscribe {
+                    pd.show()
+                    delayedHide(100)
+                }
                 .doFinally { pd.dismiss() }
                 .subscribe({
                     pd.setMessage(it)
@@ -279,6 +282,7 @@ class MovieEditActivity : AppCompatActivity(), DialogInterface.OnDismissListener
                     ${it.message}
                 """.trimIndent()
                     AlertDialog.Builder(this).setMessage(msg).show()
+                    delayedHide(100)
                 }, {
                     AlertDialog.Builder(this)
                             .setMessage("Complete")
@@ -295,6 +299,7 @@ class MovieEditActivity : AppCompatActivity(), DialogInterface.OnDismissListener
                                     Toast.makeText(this, "No app can play video", Toast.LENGTH_SHORT).show()
                                 }
                             }.show()
+                    delayedHide(100)
                 })
     }