mirror of
https://github.com/nextcloud/talk-android
synced 2025-03-06 14:27:24 +00:00
Merge pull request #3512 from nextcloud/chore/noid/dragHandle
Material3: Add drag handle
This commit is contained in:
commit
e7f5bf7ecb
@ -948,7 +948,7 @@ class ChatActivity :
|
|||||||
|
|
||||||
private fun initMessageHolders(): MessageHolders {
|
private fun initMessageHolders(): MessageHolders {
|
||||||
val messageHolders = MessageHolders()
|
val messageHolders = MessageHolders()
|
||||||
val profileBottomSheet = ProfileBottomSheet(ncApi, conversationUser!!)
|
val profileBottomSheet = ProfileBottomSheet(ncApi, conversationUser!!, viewThemeUtils)
|
||||||
|
|
||||||
val payload = MessagePayload(
|
val payload = MessagePayload(
|
||||||
roomToken,
|
roomToken,
|
||||||
|
@ -40,6 +40,7 @@ import com.nextcloud.talk.models.json.hovercard.HoverCardOverall
|
|||||||
import com.nextcloud.talk.ui.bottom.sheet.ProfileBottomSheet.AllowedAppIds.EMAIL
|
import com.nextcloud.talk.ui.bottom.sheet.ProfileBottomSheet.AllowedAppIds.EMAIL
|
||||||
import com.nextcloud.talk.ui.bottom.sheet.ProfileBottomSheet.AllowedAppIds.PROFILE
|
import com.nextcloud.talk.ui.bottom.sheet.ProfileBottomSheet.AllowedAppIds.PROFILE
|
||||||
import com.nextcloud.talk.ui.bottom.sheet.ProfileBottomSheet.AllowedAppIds.SPREED
|
import com.nextcloud.talk.ui.bottom.sheet.ProfileBottomSheet.AllowedAppIds.SPREED
|
||||||
|
import com.nextcloud.talk.ui.theme.ViewThemeUtils
|
||||||
import com.nextcloud.talk.utils.ApiUtils
|
import com.nextcloud.talk.utils.ApiUtils
|
||||||
import com.nextcloud.talk.utils.bundle.BundleKeys
|
import com.nextcloud.talk.utils.bundle.BundleKeys
|
||||||
import io.reactivex.Observer
|
import io.reactivex.Observer
|
||||||
@ -49,7 +50,7 @@ import io.reactivex.schedulers.Schedulers
|
|||||||
|
|
||||||
private const val TAG = "ProfileBottomSheet"
|
private const val TAG = "ProfileBottomSheet"
|
||||||
|
|
||||||
class ProfileBottomSheet(val ncApi: NcApi, val userModel: User) {
|
class ProfileBottomSheet(val ncApi: NcApi, val userModel: User, val viewThemeUtils: ViewThemeUtils) {
|
||||||
|
|
||||||
private val allowedAppIds = listOf(SPREED.stringValue, PROFILE.stringValue, EMAIL.stringValue)
|
private val allowedAppIds = listOf(SPREED.stringValue, PROFILE.stringValue, EMAIL.stringValue)
|
||||||
|
|
||||||
@ -89,6 +90,7 @@ class ProfileBottomSheet(val ncApi: NcApi, val userModel: User) {
|
|||||||
|
|
||||||
MaterialDialog(context, BottomSheet(LayoutMode.WRAP_CONTENT)).show {
|
MaterialDialog(context, BottomSheet(LayoutMode.WRAP_CONTENT)).show {
|
||||||
cornerRadius(res = R.dimen.corner_radius)
|
cornerRadius(res = R.dimen.corner_radius)
|
||||||
|
viewThemeUtils.platform.themeDialog(this.view)
|
||||||
|
|
||||||
title(text = displayName)
|
title(text = displayName)
|
||||||
listItemsWithImage(items = items) { _, index, _ ->
|
listItemsWithImage(items = items) { _, index, _ ->
|
||||||
|
@ -20,14 +20,26 @@
|
|||||||
~ You should have received a copy of the GNU General Public License
|
~ You should have received a copy of the GNU General Public License
|
||||||
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
-->
|
-->
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
style="@style/Widget.Material3.BottomSheet"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="bottom"
|
||||||
|
app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/bottom_sheet"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:paddingBottom="@dimen/standard_half_padding">
|
android:paddingBottom="@dimen/standard_half_padding">
|
||||||
|
|
||||||
|
<com.google.android.material.bottomsheet.BottomSheetDragHandleView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/operation_items_layout"
|
android:id="@+id/operation_items_layout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -259,3 +271,5 @@
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
</FrameLayout>
|
||||||
|
@ -26,6 +26,10 @@
|
|||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:paddingBottom="@dimen/standard_half_padding">
|
android:paddingBottom="@dimen/standard_half_padding">
|
||||||
|
|
||||||
|
<com.google.android.material.bottomsheet.BottomSheetDragHandleView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/emojiBar"
|
android:id="@+id/emojiBar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -27,6 +27,10 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<com.google.android.material.bottomsheet.BottomSheetDragHandleView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="288dp">
|
android:layout_height="288dp">
|
||||||
|
@ -27,6 +27,10 @@
|
|||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:paddingBottom="@dimen/standard_half_padding">
|
android:paddingBottom="@dimen/standard_half_padding">
|
||||||
|
|
||||||
|
<com.google.android.material.bottomsheet.BottomSheetDragHandleView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/call_emoji_bar"
|
android:id="@+id/call_emoji_bar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?><!--
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
~ Nextcloud Talk application
|
~ Nextcloud Talk application
|
||||||
~
|
~
|
||||||
~ @author Tobias Kaminsky
|
~ @author Tobias Kaminsky
|
||||||
~ @author Andy Scherzinger
|
~ @author Andy Scherzinger
|
||||||
~ Copyright (C) 2021 Tobias Kaminsky <tobias.kaminsky@nextcloud.com>
|
~ Copyright (C) 2021 Tobias Kaminsky <tobias.kaminsky@nextcloud.com>
|
||||||
~ Copyright (C) 2021-2022 Andy Scherzinger <info@andy-scherzinger.de>
|
~ Copyright (C) 2021-2023 Andy Scherzinger <info@andy-scherzinger.de>
|
||||||
~
|
~
|
||||||
~ This program is free software: you can redistribute it and/or modify
|
~ This program is free software: you can redistribute it and/or modify
|
||||||
~ it under the terms of the GNU General Public License as published by
|
~ it under the terms of the GNU General Public License as published by
|
||||||
@ -21,12 +22,16 @@
|
|||||||
-->
|
-->
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
style="@style/Widget.Material3.BottomSheet"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:paddingTop="@dimen/standard_half_padding"
|
|
||||||
android:paddingBottom="@dimen/standard_half_padding">
|
android:paddingBottom="@dimen/standard_half_padding">
|
||||||
|
|
||||||
|
<com.google.android.material.bottomsheet.BottomSheetDragHandleView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/scope_private"
|
android:id="@+id/scope_private"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
DO NOT TOUCH; GENERATED BY DRONE
|
DO NOT TOUCH; GENERATED BY DRONE
|
||||||
<span class="mdl-layout-title">Lint Report: 8 errors and 84 warnings</span>
|
<span class="mdl-layout-title">Lint Report: 8 errors and 83 warnings</span>
|
||||||
|
Loading…
Reference in New Issue
Block a user