|
@@ -224,7 +224,6 @@ abstract class ReaderActivity : AppCompatActivity() {
|
|
|
AnimationUtil.hideViewFromTopToBottom(viewGroup_readerActivity_bottomToolbar, UI_ANIMATION_DURATION)
|
|
|
AnimationUtil.hideViewFromRightToLeft(viewGroup_readerActivity_leftToolbar, UI_ANIMATION_DURATION)
|
|
|
AnimationUtil.hideViewFromLeftToRight(viewGroup_readerActivity_rightToolbar, UI_ANIMATION_DURATION)
|
|
|
- viewerEditView.visibility = View.GONE
|
|
|
hideSearchViewSoftKeyboard()
|
|
|
} else {
|
|
|
constrainLayout_readerActivity_root.applyConstraintSet(this, R.layout.activity_reader_hide_all, UI_ANIMATION_DURATION)
|
|
@@ -329,6 +328,10 @@ abstract class ReaderActivity : AppCompatActivity() {
|
|
|
alertDialogBuilder.create().show()
|
|
|
}
|
|
|
|
|
|
+ private fun showMediaBox() {
|
|
|
+ viewerEditView.show()
|
|
|
+ }
|
|
|
+
|
|
|
private fun hideSearchViewSoftKeyboard() {
|
|
|
val view = linearLayout_readerActivity_leftToolbarContainer.getChildAt(0)
|
|
|
if (view is SearchView) {
|
|
@@ -352,11 +355,13 @@ abstract class ReaderActivity : AppCompatActivity() {
|
|
|
}
|
|
|
|
|
|
private fun setupBottomToolbar() {
|
|
|
- ib_readerActivity_bottomToolbarMediaBox.setOnClickListener { viewerEditView.visibility = View.VISIBLE }
|
|
|
+ ib_readerActivity_bottomToolbarMediaBox.setOnClickListener { showMediaBox() }
|
|
|
}
|
|
|
|
|
|
private fun setupViewerEditView() {
|
|
|
viewerEditView.apply {
|
|
|
+ onShowListener = Runnable { onMediaBoxShown() }
|
|
|
+ onDismissListener = Runnable { onMediaBoxDismissed() }
|
|
|
onViewerEditTabAddButtonClickListener = object : ViewerEditView.OnViewerEditTabAddButtonClickListener {
|
|
|
override fun onTabTextBoxAddButtonClick(textBoxTabView: TextBoxTabView) {
|
|
|
hideAllToolbars()
|
|
@@ -407,6 +412,14 @@ abstract class ReaderActivity : AppCompatActivity() {
|
|
|
cloneOriginConstraintSet()
|
|
|
}
|
|
|
|
|
|
+ private fun onMediaBoxShown() {
|
|
|
+ hideAllToolbars()
|
|
|
+ }
|
|
|
+
|
|
|
+ private fun onMediaBoxDismissed() {
|
|
|
+ showAllToolbars()
|
|
|
+ }
|
|
|
+
|
|
|
private fun onThumbnailClick() {
|
|
|
val type = LeftToolbarType.THUMBNAIL
|
|
|
changeLeftToolbarType(type)
|