mirror of
https://github.com/element-hq/element-android
synced 2024-11-27 03:48:12 +03:00
Collapsing header in other sessions screen
This commit is contained in:
parent
301ecdf1f7
commit
c2d25c8564
1 changed files with 110 additions and 98 deletions
|
@ -1,120 +1,132 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.coordinatorlayout.widget.CoordinatorLayout 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"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/otherSessionsNotFoundLayout"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="72dp"
|
||||||
|
android:layout_marginTop="32dp"
|
||||||
|
android:layout_marginEnd="16dp"
|
||||||
|
android:orientation="vertical"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/otherSessionsNotFoundTextView"
|
||||||
|
style="@style/TextAppearance.Vector.Body"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
tools:text="@string/device_manager_other_sessions_no_verified_sessions_found" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/otherSessionsClearFilterButton"
|
||||||
|
style="@style/Widget.Vector.Button.Text"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="20dp"
|
||||||
|
android:gravity="start"
|
||||||
|
android:padding="0dp"
|
||||||
|
android:text="@string/device_manager_other_sessions_clear_filter" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<im.vector.app.features.settings.devices.v2.list.OtherSessionsView
|
||||||
|
android:id="@+id/deviceListOtherSessions"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
<com.google.android.material.appbar.AppBarLayout
|
<com.google.android.material.appbar.AppBarLayout
|
||||||
android:id="@+id/appBarLayout"
|
android:id="@+id/appBarLayout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content">
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent">
|
|
||||||
|
|
||||||
<com.google.android.material.appbar.MaterialToolbar
|
<com.google.android.material.appbar.CollapsingToolbarLayout
|
||||||
android:id="@+id/otherSessionsToolbar"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="match_parent"
|
||||||
app:navigationIcon="@drawable/ic_back_24dp"
|
app:layout_scrollFlags="scroll|exitUntilCollapsed"
|
||||||
app:title="@string/device_manager_sessions_other_title">
|
app:titleEnabled="false"
|
||||||
|
app:toolbarId="@id/otherSessionsToolbar">
|
||||||
|
|
||||||
<FrameLayout
|
<im.vector.app.features.settings.devices.v2.list.SessionsListHeaderView
|
||||||
android:id="@+id/otherSessionsFilterFrameLayout"
|
android:id="@+id/deviceListHeaderOtherSessions"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="end"
|
android:layout_marginTop="?attr/actionBarSize"
|
||||||
android:layout_marginEnd="8dp"
|
android:layout_marginBottom="32dp"
|
||||||
android:padding="8dp">
|
app:layout_collapseMode="parallax"
|
||||||
|
app:sessionsListHeaderDescription="@string/device_manager_sessions_other_description"
|
||||||
|
app:sessionsListHeaderHasLearnMoreLink="false"
|
||||||
|
app:sessionsListHeaderTitle="" />
|
||||||
|
|
||||||
<ImageView
|
<im.vector.app.features.settings.devices.v2.othersessions.OtherSessionsSecurityRecommendationView
|
||||||
|
android:id="@+id/otherSessionsSecurityRecommendationView"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
android:layout_marginTop="?attr/actionBarSize"
|
||||||
|
android:layout_marginBottom="32dp"
|
||||||
|
android:paddingTop="20dp"
|
||||||
|
android:visibility="gone"
|
||||||
|
app:layout_collapseMode="parallax"
|
||||||
|
app:otherSessionsRecommendationDescription="@string/device_manager_other_sessions_recommendation_description_unverified"
|
||||||
|
app:otherSessionsRecommendationImageBackgroundTint="@color/shield_color_warning_background"
|
||||||
|
app:otherSessionsRecommendationImageResource="@drawable/ic_shield_warning_no_border"
|
||||||
|
app:otherSessionsRecommendationTitle="@string/device_manager_other_sessions_recommendation_title_unverified"
|
||||||
|
tools:visibility="visible" />
|
||||||
|
|
||||||
|
<com.google.android.material.appbar.MaterialToolbar
|
||||||
|
android:id="@+id/otherSessionsToolbar"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="?attr/actionBarSize"
|
||||||
|
app:layout_collapseMode="pin"
|
||||||
|
app:navigationIcon="@drawable/ic_back_24dp"
|
||||||
|
app:title="@string/device_manager_sessions_other_title">
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:id="@+id/otherSessionsFilterFrameLayout"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:contentDescription="@string/a11y_device_manager_filter"
|
android:layout_gravity="end"
|
||||||
android:src="@drawable/ic_filter" />
|
android:layout_marginEnd="8dp"
|
||||||
|
android:padding="8dp">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/otherSessionsFilterBadgeImageView"
|
android:layout_width="wrap_content"
|
||||||
android:layout_width="12dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_height="12dp"
|
android:contentDescription="@string/a11y_device_manager_filter"
|
||||||
android:layout_marginStart="12dp"
|
android:src="@drawable/ic_filter" />
|
||||||
android:importantForAccessibility="no"
|
|
||||||
android:src="@drawable/circle_with_transparent_border" />
|
|
||||||
|
|
||||||
</FrameLayout>
|
<ImageView
|
||||||
|
android:id="@+id/otherSessionsFilterBadgeImageView"
|
||||||
|
android:layout_width="12dp"
|
||||||
|
android:layout_height="12dp"
|
||||||
|
android:layout_marginStart="12dp"
|
||||||
|
android:importantForAccessibility="no"
|
||||||
|
android:src="@drawable/circle_with_transparent_border" />
|
||||||
|
|
||||||
</com.google.android.material.appbar.MaterialToolbar>
|
</FrameLayout>
|
||||||
|
|
||||||
|
</com.google.android.material.appbar.MaterialToolbar>
|
||||||
|
|
||||||
|
</com.google.android.material.appbar.CollapsingToolbarLayout>
|
||||||
|
|
||||||
</com.google.android.material.appbar.AppBarLayout>
|
</com.google.android.material.appbar.AppBarLayout>
|
||||||
|
|
||||||
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||||
<im.vector.app.features.settings.devices.v2.list.SessionsListHeaderView
|
|
||||||
android:id="@+id/deviceListHeaderOtherSessions"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/appBarLayout"
|
|
||||||
app:sessionsListHeaderDescription="@string/device_manager_sessions_other_description"
|
|
||||||
app:sessionsListHeaderHasLearnMoreLink="false"
|
|
||||||
app:sessionsListHeaderTitle="" />
|
|
||||||
|
|
||||||
<im.vector.app.features.settings.devices.v2.othersessions.OtherSessionsSecurityRecommendationView
|
|
||||||
android:id="@+id/otherSessionsSecurityRecommendationView"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="16dp"
|
|
||||||
android:layout_marginTop="20dp"
|
|
||||||
android:visibility="gone"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/deviceListHeaderOtherSessions"
|
|
||||||
app:otherSessionsRecommendationDescription="@string/device_manager_other_sessions_recommendation_description_unverified"
|
|
||||||
app:otherSessionsRecommendationImageBackgroundTint="@color/shield_color_warning_background"
|
|
||||||
app:otherSessionsRecommendationImageResource="@drawable/ic_shield_warning_no_border"
|
|
||||||
app:otherSessionsRecommendationTitle="@string/device_manager_other_sessions_recommendation_title_unverified"
|
|
||||||
tools:visibility="visible" />
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/otherSessionsNotFoundLayout"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="72dp"
|
|
||||||
android:layout_marginTop="32dp"
|
|
||||||
android:layout_marginEnd="16dp"
|
|
||||||
android:orientation="vertical"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/otherSessionsSecurityRecommendationView">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/otherSessionsNotFoundTextView"
|
|
||||||
style="@style/TextAppearance.Vector.Body"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
tools:text="@string/device_manager_other_sessions_no_verified_sessions_found" />
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/otherSessionsClearFilterButton"
|
|
||||||
style="@style/Widget.Vector.Button.Text"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="20dp"
|
|
||||||
android:gravity="start"
|
|
||||||
android:padding="0dp"
|
|
||||||
android:text="@string/device_manager_other_sessions_clear_filter" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<im.vector.app.features.settings.devices.v2.list.OtherSessionsView
|
|
||||||
android:id="@+id/deviceListOtherSessions"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="0dp"
|
|
||||||
android:layout_marginTop="32dp"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/otherSessionsSecurityRecommendationView" />
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
|
|
Loading…
Reference in a new issue