Skip to content

Commit

Permalink
Make expand and save buttons consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
emanuele-f committed Dec 25, 2023
1 parent ef09ebc commit d5661be
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;

import androidx.annotation.CheckResult;
Expand Down Expand Up @@ -201,7 +200,7 @@ protected static class PayloadViewHolder extends RecyclerView.ViewHolder {
View dumpBox;
TextView header;
TextView dump;
ImageView expandButton;
MaterialButton expandButton;
MaterialButton copybutton;

public PayloadViewHolder(View view) {
Expand Down
26 changes: 18 additions & 8 deletions app/src/main/res/layout/payload_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
android:insetRight="0dp"
android:minWidth="0dp"
android:minHeight="0dp"
android:paddingVertical="0dp"
android:paddingHorizontal="0dp"
android:paddingVertical="2dp"
android:paddingHorizontal="2dp"
android:layout_marginHorizontal="2dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
Expand Down Expand Up @@ -73,13 +73,23 @@
tools:text="GET / HTTP/1.1\nHost: example.org\nAccept: */*"/>
</RelativeLayout>

<ImageView
<com.google.android.material.button.MaterialButton
android:id="@+id/expand_button"
android:layout_width="30dp"
android:insetTop="0dp"
android:insetBottom="0dp"
android:insetLeft="0dp"
android:insetRight="0dp"
android:minWidth="0dp"
android:minHeight="0dp"
android:paddingVertical="0dp"
android:paddingHorizontal="0dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="2dp"
android:layout_gravity="end"
android:layout_marginEnd="4dp"
android:adjustViewBounds="true"
android:src="@drawable/ic_expand_more"
app:tint="@color/colorTabText" />
app:icon="@drawable/ic_expand_more"
app:iconGravity="textStart"
app:iconPadding="0dp"
app:iconTint="@color/colorTabText"
style="@style/Widget.MaterialComponents.Button.TextButton" />
</LinearLayout>

0 comments on commit d5661be

Please sign in to comment.