-
-
Notifications
You must be signed in to change notification settings - Fork 365
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add UI for empty payload state * Replace emoticon icon with empty package * Add empty state for request and response * Add missing contentDescription * Apply suggestions from code review Co-Authored-By: Nicola Corti <corti.nico@gmail.com> Co-authored-by: Nicola Corti <corti.nico@gmail.com>
- Loading branch information
Showing
5 changed files
with
124 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="24dp" | ||
android:height="24dp" | ||
android:viewportWidth="24" | ||
android:viewportHeight="24"> | ||
<path | ||
android:fillColor="#fff" | ||
android:pathData="M2,10.96C1.5,10.68 1.35,10.07 1.63,9.59L3.13,7C3.24,6.8 3.41,6.66 3.6,6.58L11.43,2.18C11.59,2.06 11.79,2 12,2C12.21,2 12.41,2.06 12.57,2.18L20.47,6.62C20.66,6.72 20.82,6.88 20.91,7.08L22.36,9.6C22.64,10.08 22.47,10.69 22,10.96L21,11.54V16.5C21,16.88 20.79,17.21 20.47,17.38L12.57,21.82C12.41,21.94 12.21,22 12,22C11.79,22 11.59,21.94 11.43,21.82L3.53,17.38C3.21,17.21 3,16.88 3,16.5V10.96C2.7,11.13 2.32,11.14 2,10.96M12,4.15V4.15L12,10.85V10.85L17.96,7.5L12,4.15M5,15.91L11,19.29V12.58L5,9.21V15.91M19,15.91V12.69L14,15.59C13.67,15.77 13.3,15.76 13,15.6V19.29L19,15.91M13.85,13.36L20.13,9.73L19.55,8.72L13.27,12.35L13.85,13.36Z" /> | ||
</vector> |
67 changes: 54 additions & 13 deletions
67
library/src/main/res/layout/chucker_fragment_transaction_payload.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,72 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
<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="match_parent" | ||
android:animateLayoutChanges="true" | ||
tools:context="com.chuckerteam.chucker.internal.ui.transaction.TransactionPayloadFragment"> | ||
|
||
<ProgressBar | ||
<androidx.core.widget.ContentLoadingProgressBar | ||
android:id="@+id/loadingProgress" | ||
style="@style/Widget.AppCompat.ProgressBar" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:indeterminate="true" | ||
android:layout_gravity="center" | ||
android:layout_margin="@dimen/chucker_doub_grid" | ||
android:visibility="visible" /> | ||
android:indeterminate="true" | ||
android:visibility="visible" | ||
app:layout_constraintBottom_toBottomOf="parent" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toTopOf="parent" /> | ||
|
||
<ImageView | ||
android:id="@+id/emptyPayloadImage" | ||
android:layout_width="@dimen/chucker_octa_grid" | ||
android:layout_height="@dimen/chucker_octa_grid" | ||
android:layout_marginBottom="@dimen/chucker_quad_grid" | ||
android:contentDescription="@string/chucker_body_empty" | ||
android:src="@drawable/chucker_empty_payload" | ||
android:tint="@color/chucker_color_primary" | ||
app:layout_constraintBottom_toTopOf="@id/emptyPayloadTextView" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toTopOf="parent" | ||
app:layout_constraintVertical_bias="1" /> | ||
|
||
<TextView | ||
android:id="@+id/emptyPayloadTextView" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:textSize="18sp" | ||
app:layout_constraintBottom_toBottomOf="parent" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toTopOf="parent" | ||
android:text="@string/chucker_response_is_empty" /> | ||
|
||
<androidx.recyclerview.widget.RecyclerView | ||
android:id="@+id/responseRecyclerView" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:scrollbars="vertical" | ||
android:visibility="invisible" | ||
android:id="@+id/payloadRecyclerView" | ||
android:layout_width="0dp" | ||
android:layout_height="0dp" | ||
android:clipToPadding="false" | ||
android:paddingVertical="@dimen/chucker_doub_grid" | ||
android:scrollbars="vertical" | ||
android:visibility="invisible" | ||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" | ||
app:layout_constraintBottom_toBottomOf="parent" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toTopOf="parent" | ||
tools:listitem="@layout/chucker_transaction_item_body_line" | ||
tools:visibility="visible" | ||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" /> | ||
tools:visibility="visible" /> | ||
|
||
<androidx.constraintlayout.widget.Group | ||
android:id="@+id/emptyStateGroup" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:visibility="gone" | ||
app:constraint_referenced_ids="emptyPayloadImage,emptyPayloadTextView" | ||
tools:visibility="visible" /> | ||
|
||
</FrameLayout> | ||
</androidx.constraintlayout.widget.ConstraintLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters