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