mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-01-25 00:26:17 +01:00
New empty devices list screen
This commit is contained in:
parent
db1d0daec0
commit
1ebc2a9a8c
@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Copyright 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.settings.devices.v2
|
||||
|
||||
import android.content.Context
|
||||
import android.view.LayoutInflater
|
||||
import android.view.ViewGroup
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import dagger.hilt.android.AndroidEntryPoint
|
||||
import im.vector.app.R
|
||||
import im.vector.app.core.platform.VectorBaseFragment
|
||||
import im.vector.app.databinding.FragmentSettingsDevicesBinding
|
||||
import javax.inject.Inject
|
||||
|
||||
/**
|
||||
* Display the list of the user's devices and sessions.
|
||||
*/
|
||||
@AndroidEntryPoint
|
||||
class VectorSettingsDevicesFragment @Inject constructor() : VectorBaseFragment<FragmentSettingsDevicesBinding>() {
|
||||
|
||||
override fun getBinding(inflater: LayoutInflater, container: ViewGroup?): FragmentSettingsDevicesBinding {
|
||||
return FragmentSettingsDevicesBinding.inflate(inflater, container, false)
|
||||
}
|
||||
|
||||
override fun onAttach(context: Context) {
|
||||
super.onAttach(context)
|
||||
initToolbar()
|
||||
}
|
||||
|
||||
private fun initToolbar() {
|
||||
(activity as? AppCompatActivity)
|
||||
?.supportActionBar
|
||||
?.setTitle(R.string.settings_sessions_list)
|
||||
}
|
||||
}
|
5
vector/src/main/res/layout/fragment_settings_devices.xml
Normal file
5
vector/src/main/res/layout/fragment_settings_devices.xml
Normal file
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?android:colorBackground" />
|
@ -2336,6 +2336,7 @@
|
||||
<string name="settings_active_sessions_show_all">Show All Sessions</string>
|
||||
<string name="settings_active_sessions_manage">Manage Sessions</string>
|
||||
<string name="settings_active_sessions_signout_device">Sign out of this session</string>
|
||||
<string name="settings_sessions_list">Sessions</string>
|
||||
|
||||
<string name="settings_server_name">Server name</string>
|
||||
<string name="settings_server_version">Server version</string>
|
||||
|
@ -65,7 +65,7 @@
|
||||
<im.vector.app.core.preference.VectorPreference
|
||||
android:key="SETTINGS_SHOW_DEVICES_V2_LIST_PREFERENCE_KEY"
|
||||
android:title="@string/settings_active_sessions_show_all"
|
||||
app:fragment="im.vector.app.features.settings.devices.VectorSettingsDevicesFragment" />
|
||||
app:fragment="im.vector.app.features.settings.devices.v2.VectorSettingsDevicesFragment" />
|
||||
|
||||
</im.vector.app.core.preference.VectorPreferenceCategory>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user