Skip to content

Added a pause button#109

Open
vishistv wants to merge 11 commits into
dkim0419:masterfrom
vishistv:master
Open

Added a pause button#109
vishistv wants to merge 11 commits into
dkim0419:masterfrom
vishistv:master

Conversation

@vishistv

Copy link
Copy Markdown

No description provided.

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

@naXa777 naXa777 left a comment

Copy link
Copy Markdown

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?

Comment thread app/src/main/java/com/danielkim/soundrecorder/fragments/RecordFragment.java Outdated
mPauseButton.setImageResource(R.drawable.ic_media_pause);
mPauseButton.setColorNormal(Color.parseColor("#F44336"));
mPauseButton.setColorRipple(Color.parseColor("#C0C0C0"));
mPauseButton.setColorPressed(Color.parseColor("#727272"));

Copy link
Copy Markdown

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
Copy Markdown

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
Copy Markdown

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
Copy Markdown

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
Copy Markdown

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
Copy Markdown

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?

@@ -167,18 +170,24 @@ public void onChronometerTick(Chronometer chronometer) {
private void onPauseRecord(boolean pause) {

Copy link
Copy Markdown

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.

@vishistv vishistv Nov 23, 2018

Copy link
Copy Markdown
Author

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