mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-12-22 15:50:51 +01:00
Adds NewChatBottomSheet
This commit is contained in:
parent
ce4ab78f13
commit
c0c0f90b04
@ -68,6 +68,8 @@ class HomeRoomListFragment @Inject constructor(
|
||||
|
||||
private lateinit var stateRestorer: LayoutManagerStateRestorer
|
||||
|
||||
private val newChatBottomSheet = NewChatBottomSheet()
|
||||
|
||||
override fun getBinding(inflater: LayoutInflater, container: ViewGroup?): FragmentRoomListBinding {
|
||||
return FragmentRoomListBinding.inflate(inflater, container, false)
|
||||
}
|
||||
@ -117,7 +119,7 @@ class HomeRoomListFragment @Inject constructor(
|
||||
showFABs()
|
||||
|
||||
views.newLayoutCreateChatButton.setOnClickListener {
|
||||
// Click action for create chat modal goes here (Issue #6717)
|
||||
newChatBottomSheet.show(requireActivity().supportFragmentManager, NewChatBottomSheet.TAG)
|
||||
}
|
||||
|
||||
views.newLayoutOpenSpacesButton.setOnClickListener {
|
||||
|
@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Copyright (c) 2022 New Vector Ltd
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package im.vector.app.features.home.room.list.home
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import com.google.android.material.bottomsheet.BottomSheetDialogFragment
|
||||
import im.vector.app.databinding.FragmentNewChatBottomSheetBinding
|
||||
|
||||
class NewChatBottomSheet : BottomSheetDialogFragment() {
|
||||
|
||||
private lateinit var binding: FragmentNewChatBottomSheetBinding
|
||||
|
||||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View {
|
||||
binding = FragmentNewChatBottomSheetBinding.inflate(inflater, container, false)
|
||||
return binding.root
|
||||
}
|
||||
|
||||
companion object {
|
||||
const val TAG = "NewChatBottomSheet"
|
||||
}
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="@style/TextAppearance.Vector.Subtitle"
|
||||
android:textSize="18sp"
|
||||
android:paddingVertical="8dp"
|
||||
android:paddingHorizontal="16dp"
|
||||
android:textColor="?vctr_content_primary"
|
||||
android:text="@string/start_chat" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingHorizontal="16dp"
|
||||
android:paddingVertical="8dp"
|
||||
android:textAppearance="@style/TextAppearance.Vector.Subtitle"
|
||||
android:textSize="18sp"
|
||||
android:textColor="?vctr_content_primary"
|
||||
android:text="@string/create_room" />
|
||||
|
||||
</LinearLayout>
|
@ -137,6 +137,8 @@
|
||||
|
||||
<!-- Home Screen -->
|
||||
<string name="all_chats">All Chats</string>
|
||||
<string name="start_chat">Start chat</string>
|
||||
<string name="create_room">Create room</string>
|
||||
|
||||
<!-- Last seen time -->
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user