Skip to content

For #10: Prevent overlap of pause and resume buttons #75

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 32 additions & 23 deletions app/src/main/res/layout/fragment_record.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,41 @@
android:paddingBottom="?attr/actionBarSize"
tools:context=".fragments.RecordFragment">

<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/btnRecord"

<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|center_horizontal"
android:layout_marginBottom="16dp"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
app:backgroundTint="@color/primary"
app:elevation="6dp"
app:fabSize="normal"
app:srcCompat="@drawable/ic_mic_white_36dp" />
android:paddingBottom="16dp"
android:paddingHorizontal="5dp"
android:clipToPadding="false"
android:layout_gravity="bottom|center_horizontal"
android:orientation="horizontal">

<com.google.android.material.button.MaterialButton
android:id="@+id/btnPause"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginHorizontal="16dp"
android:fontFamily="sans-serif-condensed"
app:icon="@drawable/ic_media_pause"
android:text="@string/pause_recording_button"
android:textAllCaps="true"
app:elevation="2dp" />

<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/btnRecord"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginHorizontal="16dp"
app:backgroundTint="@color/primary"
app:elevation="6dp"
Copy link
Owner

@naXa777 naXa777 Oct 23, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for some reason, app:elevation has no effect after this change.
to simulate a small screen, I'm using a split screen in landscape mode for testing. Device: Android 12 / Google Pixel 3. please take a look at the screenshots below.

BEFORE your changes (master branch)

1
image

2
image

AFTER your changes

1
image

2
image

as you can see, there's a visual regression. RECORD/STOP and PAUSE/RESUME buttons are now overlapping with the circular progress bar. But buttons should be on top.

app:fabSize="normal"
app:srcCompat="@drawable/ic_mic_white_36dp" />
</LinearLayout>

<Chronometer
android:id="@+id/chronometer"
Expand Down Expand Up @@ -54,21 +77,7 @@
app:progressAnimationDuration="100"
app:startAngle="270" />

<com.google.android.material.button.MaterialButton
android:id="@+id/btnPause"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:layout_alignParentBottom="true"
android:layout_marginStart="16dp"
android:layout_marginLeft="16dp"
android:layout_marginBottom="16dp"
android:icon="@drawable/ic_media_pause"
android:fontFamily="sans-serif-condensed"
android:text="@string/pause_recording_button"
android:textAllCaps="true"
app:elevation="2dp" />


<TextView
android:id="@+id/recording_status_text"
Expand Down