Create generic security recommendations view.
This commit is contained in:
parent
7e8bbda856
commit
e6c9409156
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<declare-styleable name="SecurityRecommendationView">
|
||||
<attr name="recommendationTitle" format="string" />
|
||||
<attr name="recommendationDescription" format="string" />
|
||||
<attr name="recommendationImageResource" format="reference" />
|
||||
<attr name="recommendationImageBackgroundTint" format="color" />
|
||||
</declare-styleable>
|
||||
|
||||
</resources>
|
|
@ -0,0 +1,9 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="8dp"
|
||||
android:height="14dp"
|
||||
android:viewportWidth="8"
|
||||
android:viewportHeight="14">
|
||||
<path
|
||||
android:pathData="M1.333,0.333C0.6,0.333 0,0.933 0,1.666L0.007,3.786C0.007,4.14 0.147,4.473 0.393,4.726L2.667,7L0.393,9.286C0.147,9.533 0.007,9.873 0.007,10.226L0,12.333C0,13.066 0.6,13.666 1.333,13.666H6.667C7.4,13.666 8,13.066 8,12.333V10.226C8,9.873 7.86,9.533 7.613,9.286L5.333,7L7.607,4.733C7.86,4.48 8,4.14 8,3.786V1.666C8,0.933 7.4,0.333 6.667,0.333H1.333ZM6.667,10.273V11.666C6.667,12.033 6.367,12.333 6,12.333H2C1.633,12.333 1.333,12.033 1.333,11.666V10.273C1.333,10.093 1.407,9.926 1.527,9.8L4,7.333L6.473,9.806C6.593,9.926 6.667,10.1 6.667,10.273Z"
|
||||
android:fillColor="#737D8C"/>
|
||||
</vector>
|
|
@ -18,6 +18,34 @@
|
|||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<im.vector.app.features.settings.devices.v2.list.SecurityRecommendationView
|
||||
android:id="@+id/deviceListUnverifiedSessionsRecommendation"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="16dp"
|
||||
android:layout_marginVertical="16dp"
|
||||
app:recommendationTitle="@string/device_manager_unverified_sessions_title"
|
||||
app:recommendationDescription="@string/device_manager_unverified_sessions_description"
|
||||
app:recommendationImageResource="@drawable/ic_shield_warning_no_border"
|
||||
app:recommendationImageBackgroundTint="@color/shield_color_warning_background"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/deviceListHeaderSectionSecurityRecommendations"/>
|
||||
|
||||
<im.vector.app.features.settings.devices.v2.list.SecurityRecommendationView
|
||||
android:id="@+id/deviceListInactiveSessionsRecommendation"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="16dp"
|
||||
android:layout_marginVertical="16dp"
|
||||
app:recommendationTitle="@string/device_manager_inactive_sessions_title"
|
||||
app:recommendationDescription="@string/device_manager_inactive_sessions_description"
|
||||
app:recommendationImageResource="@drawable/ic_inactive_sessions"
|
||||
app:recommendationImageBackgroundTint="?vctr_system"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/deviceListUnverifiedSessionsRecommendation"/>
|
||||
|
||||
<View
|
||||
android:id="@+id/deviceListSecurityRecommendationsDivider"
|
||||
android:layout_width="0dp"
|
||||
|
@ -26,7 +54,7 @@
|
|||
android:background="@drawable/divider_horizontal"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/deviceListHeaderSectionSecurityRecommendations" />
|
||||
app:layout_constraintTop_toBottomOf="@id/deviceListInactiveSessionsRecommendation" />
|
||||
|
||||
<im.vector.app.features.settings.devices.v2.list.DevicesListHeaderView
|
||||
android:id="@+id/deviceListHeaderCurrentSession"
|
||||
|
|
|
@ -48,6 +48,6 @@
|
|||
android:padding="0dp"
|
||||
app:layout_constraintStart_toStartOf="@id/recommendationTitleTextView"
|
||||
app:layout_constraintTop_toBottomOf="@id/recommendationDescriptionTextView"
|
||||
tools:text="@string/device_manager_other_sessions_view_all" />
|
||||
android:text="@string/device_manager_other_sessions_view_all" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
Loading…
Reference in New Issue