FloatingActionButton icon indicating copy to clipboard operation
FloatingActionButton copied to clipboard

FAB cut

Open candeiasdan opened this issue 8 years ago • 5 comments

<com.github.clans.fab.FloatingActionMenu
            android:id="@+id/fabMenu"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentBottom="true"
            fab:menu_colorNormal="@color/green_dark"
            fab:menu_colorPressed="@color/green_dark_selected"
            fab:menu_colorRipple="@color/green_dark"
            fab:menu_icon="@android:drawable/ic_menu_sort_by_size">

            <com.github.clans.fab.FloatingActionButton
                android:id="@+id/fabOne"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                fab:fab_colorNormal="@color/green_dark_selected"
                fab:fab_colorPressed="@color/green_dark"
                fab:fab_colorRipple="@color/green_selection"
                fab:fab_progress_indeterminate="false"
                fab:fab_progress_max="100"
                fab:fab_progress="100"
                fab:fab_size="normal"/>

            <com.github.clans.fab.FloatingActionButton
                android:id="@+id/fabTwo"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                fab:fab_progress_color="#FF009688"
                fab:fab_progress_backgroundColor="#4D000000"
                fab:fab_progress_indeterminate="false"
                fab:fab_progress_max="100"
                fab:fab_progress="100"
                fab:fab_colorNormal="@color/green_dark_selected"
                fab:fab_colorPressed="@color/green_dark"
                fab:fab_colorRipple="@color/green_selection"
                fab:fab_size="normal"/>


        </com.github.clans.fab.FloatingActionMenu>

As result i get this: screen shot 2017-06-02 at 10 23 49

Whats wrong here the cornes to be cut? I also tried to add an icon to center of those buttons and they don't get center.

Am i missing something or is it a bug?

candeiasdan avatar Jun 02 '17 09:06 candeiasdan

@candeiasdan you can add "android:paddingBottom" and "android:paddingEnd" into your FloatingActionMenu

dainq57 avatar Jun 20 '17 04:06 dainq57

@dainq57 your solution is not working

Avjeet avatar Jul 19 '17 11:07 Avjeet

Had the same problem. It shows up when you're playing with progress in xml. If you declare fab in layout as usual, but inside java you write the progress options, it will be displayed correctly. Consult ProgressFragment in the sample provided for more info

Gyoko avatar Dec 02 '18 14:12 Gyoko

I am experiencing same issue. anyone with solution yet. your assistance would be appreciated.

jilenloa avatar Aug 24 '20 22:08 jilenloa

This is what I eventually did that worked for me.

 floatingActionButton.post(new Runnable() {

        @Override
        public void run() {
            submitAttendance.setShowProgressBackground(true);
            submitAttendance.setProgress(90, false);
        }
    });

jilenloa avatar Aug 24 '20 22:08 jilenloa