How Libraries can silently add permissions to your Android App

final Manifest file :

app/build/intermediates/manifests/full/debug/AndroidManifest.xml

where did it exactly these permissions came from?

app/build/outputs/logs/manifest-merger-debug-report.txt

So the solution is :

<uses-permission android:name=”android.permission.RECORD_AUDIO” tools:node=”remove” />

Even if another library is asking for this specific permission, the build will be forced to not merge it in your final Manifest file

References
https://medium.com/glucosio-project/how-libraries-can-silently-add-permissions-to-your-android-app-620911d7de6c

Hide FloatingActionButton on Scroll of RecyclerView

recyclerView.addOnScrollListener(new RecyclerView.OnScrollListener()
{
    @Override
    public void onScrolled(RecyclerView recyclerView, int dx, int dy)
    {
        if (dy > 0 ||dy<0 && fab.isShown())
        {
            fab.hide();
        }
    }

    @Override
    public void onScrollStateChanged(RecyclerView recyclerView, int newState)
    {
        if (newState == RecyclerView.SCROLL_STATE_IDLE)
        {
            fab.show();
        }

        super.onScrollStateChanged(recyclerView, newState);
    }
});

References
https://github.com/mhdr/AndroidSamples/tree/master/095
https://stackoverflow.com/questions/33208613/hide-floatingactionbutton-on-scroll-of-recyclerview