Skip to content

Conversation

@vishistv
Copy link

No description provided.

Included a pauses button as a fab.
Added a fab for the pause button
Copy link

@naXa777 naXa777 left a comment

Choose a reason for hiding this comment

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

Hi! I reviewed your PR.

Did you test your changes using device or emulator?

mPauseButton.setImageResource(R.drawable.ic_media_pause);
mPauseButton.setColorNormal(Color.parseColor("#F44336"));
mPauseButton.setColorRipple(Color.parseColor("#C0C0C0"));
mPauseButton.setColorPressed(Color.parseColor("#727272"));
Copy link

Choose a reason for hiding this comment

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

Why do you set app:fab_colorPressed="@color/secondary_text" in the layout and then override it here in the code? If you do it in the layout file only, the code will be cleaner.

Copy link

Choose a reason for hiding this comment

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

Indeed!

mPauseButton.setCompoundDrawablesWithIntrinsicBounds
(R.drawable.ic_media_pause ,0 ,0 ,0);
mPauseButton.setImageResource(R.drawable.ic_media_pause);
mPauseButton.setColorNormal(Color.parseColor("#F44336"));
Copy link

Choose a reason for hiding this comment

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

Why do you set fab:fab_colorNormal="@color/primary" in the layout and then override it here in the code?

android:gravity="center_horizontal"
android:orientation="horizontal">

<com.melnykov.fab.FloatingActionButton
Copy link

Choose a reason for hiding this comment

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

Do you know that com.melnykov.fab.FloatingActionButton view is DEPRECATED? This is stated in makovkastar/FloatingActionButton repository readme. The author also suggests to use the FloatingActionButton from the support library instead.

android:layout_centerHorizontal="true"
android:src="@drawable/ic_mic_white_36dp" />

<com.melnykov.fab.FloatingActionButton
Copy link

Choose a reason for hiding this comment

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

The same for pause button. com.melnykov.fab.FloatingActionButton view is DEPRECATED.

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:fab="http://schemas.android.com/apk/res-auto"
Copy link

Choose a reason for hiding this comment

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

xmlns:fab is the same as xmlns:app. Why do you need to redefine this namespace?

}

//TODO: implement pause recording
private void onPauseRecord(boolean pause) {
Copy link

Choose a reason for hiding this comment

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

Remove TODO, if you've implemented this.

Copy link
Author

@vishistv vishistv Nov 23, 2018

Choose a reason for hiding this comment

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

Thanks for reviewing my PR. I will make the changes. :). I used a device to test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants