mirror of
https://github.com/nextcloud/talk-android
synced 2025-07-15 16:55:03 +01:00
Much better
Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
parent
419830d2bd
commit
6dc20ce512
@ -100,6 +100,16 @@ class MainActivity : BaseActivity(), ActionBarProvider {
|
||||
}
|
||||
}
|
||||
|
||||
@OnClick(R.id.floatingActionButton)
|
||||
fun onFloatingActionButtonClick() {
|
||||
val bundle = Bundle()
|
||||
bundle.putBoolean(BundleKeys.KEY_NEW_CONVERSATION, true)
|
||||
router?.pushController(
|
||||
RouterTransaction.with(ContactsController(bundle))
|
||||
.pushChangeHandler(HorizontalChangeHandler())
|
||||
.popChangeHandler(HorizontalChangeHandler()))
|
||||
}
|
||||
|
||||
override fun onStart() {
|
||||
super.onStart()
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
|
@ -134,7 +134,7 @@ class ContactsController : BaseController,
|
||||
|
||||
@JvmField
|
||||
@BindView(R.id.generic_rv_layout)
|
||||
var genericRvLayout: FrameLayout? = null
|
||||
var genericRvLayout: CoordinatorLayout? = null
|
||||
|
||||
private var credentials: String? = null
|
||||
private var currentUser: UserNgEntity? = null
|
||||
|
@ -138,16 +138,6 @@ class ConversationsListView : BaseView() {
|
||||
return view
|
||||
}
|
||||
|
||||
@OnClick(R.id.floatingActionButton)
|
||||
fun onFloatingActionButtonClick() {
|
||||
val bundle = Bundle()
|
||||
bundle.putBoolean(BundleKeys.KEY_NEW_CONVERSATION, true)
|
||||
router?.pushController(
|
||||
RouterTransaction.with(ContactsController(bundle))
|
||||
.pushChangeHandler(HorizontalChangeHandler())
|
||||
.popChangeHandler(HorizontalChangeHandler()))
|
||||
}
|
||||
|
||||
override fun onChangeStarted(changeHandler: ControllerChangeHandler, changeType: ControllerChangeType) {
|
||||
actionBar?.setIcon(null)
|
||||
super.onChangeStarted(changeHandler, changeType)
|
||||
|
@ -24,23 +24,24 @@
|
||||
android:id="@+id/mainActivityCoordinatorLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".activities.MainActivity"
|
||||
android:animateLayoutChanges="true"
|
||||
android:fitsSystemWindows="true">
|
||||
tools:context=".activities.MainActivity">
|
||||
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:background="@color/transparent"
|
||||
android:elevation="0dp"
|
||||
app:elevation="0dp">
|
||||
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:theme="@style/ThemeOverlay.MaterialComponents.Dark.ActionBar"
|
||||
android:background="@color/transparent"
|
||||
android:theme="@style/ThemeOverlay.MaterialComponents.Dark.ActionBar"
|
||||
app:contentInsetStartWithNavigation="0dp"
|
||||
app:layout_scrollFlags="scroll|enterAlways|snap"
|
||||
app:popupTheme="@style/appActionBarPopupMenu">
|
||||
@ -49,9 +50,21 @@
|
||||
</com.google.android.material.appbar.MaterialToolbar>
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<com.bluelinelabs.conductor.ChangeHandlerFrameLayout
|
||||
|
||||
<com.nextcloud.talk.newarch.utils.ChangeHandlerCoordinatorLayout
|
||||
android:id="@+id/controller_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior" />
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
android:id="@+id/floatingActionButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:layout_margin="16dp"
|
||||
app:backgroundTint="@color/colorPrimary"
|
||||
app:srcCompat="@drawable/ic_add_white_24px"
|
||||
app:tint="@color/white" />
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
@ -18,30 +18,22 @@
|
||||
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/generic_rv_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:animateLayoutChanges="true">
|
||||
android:clipToPadding="false"
|
||||
android:animateLayoutChanges="true"
|
||||
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:listitem="@layout/rv_item_conversation_with_last_message" />
|
||||
tools:listitem="@layout/rv_item_conversation_with_last_message"
|
||||
android:paddingBottom="80dp"
|
||||
android:clipToPadding="false"/>
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
android:id="@+id/floatingActionButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:layout_margin="16dp"
|
||||
android:nestedScrollingEnabled="true"
|
||||
android:paddingBottom="16dp"
|
||||
app:backgroundTint="@color/colorPrimary"
|
||||
app:srcCompat="@drawable/ic_add_white_24px"
|
||||
app:tint="@color/white" />
|
||||
|
||||
</FrameLayout>
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
Loading…
Reference in New Issue
Block a user