openmrs-client/src/main/java/org/openmrs/mobile/activities/patientdashboard/PatientDashboardActivity.java
/**
     * This method is called from other Fragments only when they are visible to the user.
     *
     * @param hide To hide the FAB menu depending on the Fragment visible
     */
This method is called from other Fragments only when they are visible to the user.
@param hide To hide the FAB menu depending on the Fragment visible
This method is called from other Fragments only when they are visible to the user . @param hide To hide the FAB menu depending on the Fragment visible
@SuppressLint("RestrictedApi")
    public void hideFABs(boolean hide) {
        closeFABMenu();
        if (hide) {
            additionalActionsFAB.setVisibility(View.GONE);
        } else {
            additionalActionsFAB.setVisibility(View.VISIBLE);
            ObjectAnimator.ofFloat(additionalActionsFAB, "rotation", 180f, 0f).setDuration(0).start();
            additionalActionsFAB.setImageDrawable(resources
                .getDrawable(R.drawable.ic_edit_white_24dp));
        }
    }
@ SuppressLint ( "RestrictedApi" ) public void hideFABs ( boolean hide ) { closeFABMenu ( ) ; if ( hide ) { additionalActionsFAB . setVisibility ( View . GONE ) ; } else { additionalActionsFAB . setVisibility ( View . VISIBLE ) ; ObjectAnimator . ofFloat ( additionalActionsFAB , "rotation" , 180f , 0f ) . setDuration ( 0 ) . start ( ) ; additionalActionsFAB . setImageDrawable ( resources . getDrawable ( R . drawable . ic_edit_white_24dp ) ) ; } }
This method is called from other Fragments only when they are visible to the user.
This method is called from other Fragments only when they are visible to the user .
// will animate back the icon back to its original angle instantaneously