mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-26 19:36:08 +03:00
Create other session item layout.
This commit is contained in:
parent
ec5d950b7b
commit
248c05f4e2
4 changed files with 108 additions and 3 deletions
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
* 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.settings.devices.v2.list
|
||||
|
||||
import com.airbnb.epoxy.TypedEpoxyController
|
||||
import im.vector.app.features.settings.devices.DevicesViewState
|
||||
import javax.inject.Inject
|
||||
|
||||
class OtherSessionsController @Inject constructor() : TypedEpoxyController<DevicesViewState>() {
|
||||
|
||||
override fun buildModels(data: DevicesViewState?) {
|
||||
|
||||
}
|
||||
}
|
14
vector/src/main/res/drawable/circle_with_border.xml
Normal file
14
vector/src/main/res/drawable/circle_with_border.xml
Normal file
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="ring"
|
||||
android:innerRadius="0dp"
|
||||
android:thicknessRatio="2"
|
||||
android:useLevel="false">
|
||||
|
||||
<solid android:color="?android:colorBackground" />
|
||||
|
||||
<stroke
|
||||
android:width="1dp"
|
||||
android:color="?vctr_content_quinary" />
|
||||
|
||||
</shape>
|
63
vector/src/main/res/layout/item_other_session.xml
Normal file
63
vector/src/main/res/layout/item_other_session.xml
Normal file
|
@ -0,0 +1,63 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout 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:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/otherSessionDeviceTypeImageView"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:contentDescription="@string/a11y_device_manager_device_type_mobile"
|
||||
android:padding="8dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:background="@drawable/bg_device_type"
|
||||
tools:src="@drawable/ic_device_type_mobile" />
|
||||
|
||||
<im.vector.app.core.ui.views.ShieldImageView
|
||||
android:id="@+id/otherSessionVerificationStatusImageView"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginStart="24dp"
|
||||
android:layout_marginTop="24dp"
|
||||
android:background="@drawable/circle_with_border"
|
||||
android:importantForAccessibility="no"
|
||||
android:padding="6dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:src="@drawable/ic_shield_trusted" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/otherSessionName"
|
||||
style="@style/TextAppearance.Vector.Headline.Medium"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:ellipsize="end"
|
||||
android:lines="1"
|
||||
app:layout_constraintStart_toEndOf="@id/otherSessionDeviceTypeImageView"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="Element Mobile: Android" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/otherSessionDescriptionTextView"
|
||||
style="@style/TextAppearance.Vector.Subtitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dp"
|
||||
app:layout_constraintStart_toStartOf="@id/otherSessionName"
|
||||
app:layout_constraintTop_toBottomOf="@id/otherSessionName"
|
||||
tools:text="@string/device_manager_verification_status_verified" />
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:background="?vctr_content_quinary"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@id/otherSessionName"
|
||||
app:layout_constraintTop_toBottomOf="@id/otherSessionDescriptionTextView" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -21,7 +21,7 @@
|
|||
tools:src="@drawable/ic_device_type_mobile" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/currentSessionDeviceTypeTextView"
|
||||
android:id="@+id/currentSessionNameTextView"
|
||||
style="@style/TextAppearance.Vector.Headline.Medium"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
@ -29,7 +29,7 @@
|
|||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/currentSessionDeviceTypeImageView"
|
||||
tools:text="@string/device_manager_device_type_android" />
|
||||
tools:text="Element Mobile: Android" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/currentSessionVerificationStatusContainer"
|
||||
|
@ -40,7 +40,7 @@
|
|||
android:orientation="horizontal"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/currentSessionDeviceTypeTextView">
|
||||
app:layout_constraintTop_toBottomOf="@id/currentSessionNameTextView">
|
||||
|
||||
<im.vector.app.core.ui.views.ShieldImageView
|
||||
android:id="@+id/currentSessionVerificationStatusImageView"
|
||||
|
|
Loading…
Reference in a new issue