Skip to content

Commit

Permalink
fix(platform): Fix edge to edge glitch in ExceptionActivity
Browse files Browse the repository at this point in the history
Refs: #1713

Signed-off-by: Stefan Niedermann <[email protected]>
  • Loading branch information
stefan-niedermann committed Jan 3, 2025
1 parent 9b68593 commit 4a0f5b3
Showing 1 changed file with 82 additions and 72 deletions.
154 changes: 82 additions & 72 deletions app/src/main/res/layout/activity_exception.xml
Original file line number Diff line number Diff line change
@@ -1,103 +1,113 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
android:layout_height="match_parent">

<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/toolbar"
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/appBarLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:title="@string/simple_exception" />
android:fitsSystemWindows="true">

<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:title="@string/simple_exception" />
</com.google.android.material.appbar.AppBarLayout>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="@dimen/spacer_2x">
android:layout_height="match_parent"
android:fillViewport="true"
android:orientation="vertical"
app:layout_behavior="@string/appbar_scrolling_view_behavior">

<com.google.android.material.textview.MaterialTextView
android:id="@+id/message"
android:layout_width="0dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:hint="@string/hint_error_appeared"
android:paddingHorizontal="@dimen/spacer_2x"
android:paddingVertical="@dimen/spacer_1x"
app:drawableEndCompat="@drawable/ic_bug_report_24dp" />

</LinearLayout>

<ScrollView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1">

<LinearLayout
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">

<androidx.recyclerview.widget.RecyclerView
android:id="@+id/tips"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingHorizontal="@dimen/spacer_2x"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:itemCount="2"
tools:listitem="@layout/item_tip" />
android:layout_height="0dp"
android:layout_weight="1">

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="@dimen/spacer_2x"
android:text="@string/error_dialog_we_need_info"
android:textAppearance="?attr/textAppearanceBody2" />

<HorizontalScrollView
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginHorizontal="@dimen/spacer_2x"
android:layout_weight="1"
android:background="?attr/colorSurfaceVariant">
android:orientation="vertical">

<androidx.recyclerview.widget.RecyclerView
android:id="@+id/tips"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingHorizontal="@dimen/spacer_2x"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:itemCount="2"
tools:listitem="@layout/item_tip" />

<TextView
android:id="@+id/stacktrace"
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="@dimen/spacer_1x"
android:textIsSelectable="true"
android:typeface="monospace"
tools:text="@string/android_get_accounts_permission_not_granted_exception_message" />
</HorizontalScrollView>
</LinearLayout>
</ScrollView>
android:padding="@dimen/spacer_2x"
android:text="@string/error_dialog_we_need_info"
android:textAppearance="?attr/textAppearanceBody2" />

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="end"
android:orientation="horizontal"
android:padding="@dimen/spacer_2x"
android:weightSum="1.0">
<HorizontalScrollView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginHorizontal="@dimen/spacer_2x"
android:layout_weight="1"
android:background="?attr/colorSurfaceVariant">

<com.google.android.material.button.MaterialButton
android:id="@+id/close"
style="@style/Widget.Material3.Button.TextButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/spacer_1x"
android:layout_weight=".5"
android:text="@string/simple_close" />
<TextView
android:id="@+id/stacktrace"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="@dimen/spacer_1x"
android:textIsSelectable="true"
android:typeface="monospace"
tools:text="@string/android_get_accounts_permission_not_granted_exception_message" />
</HorizontalScrollView>
</LinearLayout>
</androidx.core.widget.NestedScrollView>

<com.google.android.material.button.MaterialButton
android:id="@+id/copy"
style="@style/Widget.Material3.Button"
android:layout_width="wrap_content"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/spacer_1x"
android:layout_weight=".5"
android:text="@string/simple_copy" />
android:fitsSystemWindows="true"
android:gravity="end"
android:orientation="horizontal"
android:padding="@dimen/spacer_2x"
android:weightSum="1.0">

<com.google.android.material.button.MaterialButton
android:id="@+id/close"
style="@style/Widget.Material3.Button.TextButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/spacer_1x"
android:layout_weight=".5"
android:text="@string/simple_close" />

<com.google.android.material.button.MaterialButton
android:id="@+id/copy"
style="@style/Widget.Material3.Button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/spacer_1x"
android:layout_weight=".5"
android:text="@string/simple_copy" />

</LinearLayout>
</LinearLayout>
</LinearLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>

0 comments on commit 4a0f5b3

Please sign in to comment.