FABProgressCircle icon indicating copy to clipboard operation
FABProgressCircle copied to clipboard

Final icon is not shown correctly

Open yoavst opened this issue 10 years ago • 2 comments

img On both genymotion and G4. new simple layout:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
              xmlns:app="http://schemas.android.com/apk/res-auto"
              xmlns:tools="http://schemas.android.com/tools"
              android:orientation="vertical"
              android:layout_width="match_parent"
              android:layout_height="match_parent">
    <com.github.jorgecastilloprz.FABProgressCircle
        android:id="@+id/login"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center_horizontal"
        app:finalIcon="@drawable/ic_done">

        <android.support.design.widget.FloatingActionButton
            android:id="@+id/loginFab"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"/>

    </com.github.jorgecastilloprz.FABProgressCircle>
</LinearLayout>

yoavst avatar Aug 26 '15 13:08 yoavst

It is a very strange issue, since when I create a CompleteFABView by myself it works.

Edit: If I run this code it fixes it:

(login.getChildAt(2) as ViewGroup).getChildAt(0).setPadding(0,0,0,0)
val dp = 16.toPx(getActivity())
(login.getChildAt(2) as ViewGroup).getChildAt(0).setPadding(dp,dp,dp,dp)

it seem to force the same layout params, so idk why it fixes it.

However without clean the padding it doesn't work:

val dp = 16.toPx(getActivity())
(login.getChildAt(2) as ViewGroup).getChildAt(0).setPadding(dp,dp,dp,dp)

yoavst avatar Aug 29 '15 21:08 yoavst

I had the same issue. I resolved it by wrapping FABProgressCircle with a RelativeLayout as it is in the example app.

sebastianmatysiak avatar Jan 19 '16 16:01 sebastianmatysiak