mirror of
https://github.com/nextcloud/talk-android
synced 2025-07-15 16:55:03 +01:00
Fixes layout issues
Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
parent
733653cbef
commit
9f1e4bbc34
@ -712,11 +712,6 @@ class ChatController(args: Bundle) : BaseController(), MessagesListAdapter
|
||||
}
|
||||
}
|
||||
|
||||
override fun onChangeStarted(changeHandler: ControllerChangeHandler, changeType: ControllerChangeType) {
|
||||
actionBar?.setIcon(null)
|
||||
super.onChangeStarted(changeHandler, changeType)
|
||||
}
|
||||
|
||||
override fun onDetach(view: View) {
|
||||
eventBus.unregister(this)
|
||||
|
||||
|
@ -64,8 +64,6 @@ abstract class BaseController : ButterKnifeController(), ComponentCallbacks {
|
||||
val context: Context by inject()
|
||||
val eventBus: EventBus by inject()
|
||||
|
||||
// Note: This is just a quick demo of how an ActionBar *can* be accessed, not necessarily how it *should*
|
||||
// be accessed. In a production app, this would use Dagger instead.
|
||||
protected val actionBar: ActionBar?
|
||||
get() {
|
||||
var actionBarProvider: ActionBarProvider? = null
|
||||
@ -100,6 +98,16 @@ abstract class BaseController : ButterKnifeController(), ComponentCallbacks {
|
||||
}
|
||||
}
|
||||
|
||||
override fun onChangeStarted(changeHandler: ControllerChangeHandler, changeType: ControllerChangeType) {
|
||||
setOptionsMenuHidden(true)
|
||||
super.onChangeStarted(changeHandler, changeType)
|
||||
}
|
||||
|
||||
override fun onChangeEnded(changeHandler: ControllerChangeHandler, changeType: ControllerChangeType) {
|
||||
setOptionsMenuHidden(false)
|
||||
super.onChangeEnded(changeHandler, changeType)
|
||||
}
|
||||
|
||||
private fun showSearchOrToolbar() {
|
||||
val value = getIsUsingSearchLayout()
|
||||
activity?.let {
|
||||
|
@ -29,6 +29,8 @@ import butterknife.OnClick
|
||||
import com.afollestad.materialdialogs.LayoutMode
|
||||
import com.afollestad.materialdialogs.MaterialDialog
|
||||
import com.afollestad.materialdialogs.bottomsheets.BottomSheet
|
||||
import com.bluelinelabs.conductor.ControllerChangeHandler
|
||||
import com.bluelinelabs.conductor.ControllerChangeType
|
||||
import com.bluelinelabs.conductor.RouterTransaction
|
||||
import com.bluelinelabs.conductor.autodispose.ControllerScopeProvider
|
||||
import com.bluelinelabs.conductor.changehandler.HorizontalChangeHandler
|
||||
@ -125,19 +127,15 @@ class ConversationsListView : BaseView() {
|
||||
viewModel.filterLiveData.observe(this@ConversationsListView) {query ->
|
||||
activity?.settingsButton?.isVisible = query.isNullOrEmpty()
|
||||
activity?.clearButton?.isVisible = !query.isNullOrEmpty()
|
||||
if (query.isNullOrEmpty()) {
|
||||
if (floatingActionButton?.isOrWillBeShown == false) {
|
||||
floatingActionButton?.show()
|
||||
}
|
||||
} else {
|
||||
if (floatingActionButton?.isOrWillBeHidden == false) {
|
||||
floatingActionButton?.hide()
|
||||
}
|
||||
}
|
||||
}
|
||||
return view
|
||||
}
|
||||
|
||||
override fun onChangeStarted(changeHandler: ControllerChangeHandler, changeType: ControllerChangeType) {
|
||||
actionBar?.setIcon(null)
|
||||
super.onChangeStarted(changeHandler, changeType)
|
||||
}
|
||||
|
||||
private fun setSearchQuery(query: CharSequence?) {
|
||||
viewModel.filterLiveData.value = query
|
||||
}
|
||||
|
@ -24,7 +24,8 @@
|
||||
android:id="@+id/mainActivityCoordinatorLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".activities.MainActivity">
|
||||
tools:context=".activities.MainActivity"
|
||||
android:animateLayoutChanges="true">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appBar"
|
||||
|
Loading…
Reference in New Issue
Block a user