android - Floating action button no longer transparent -


i trying make floating action button in android project.

so far have this , looks good.

the problem when go other part of app , go fragment floating action button of sudden looks this. transparency gone.

my layout xml looks this:

<framelayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="net.lightningworks.freek.hourkeeper.jobfragment">  <android.support.v7.widget.recyclerview     android:id="@+id/my_recycler_view"     android:scrollbars="vertical"     android:layout_width="match_parent"     android:layout_height="match_parent"/>  <imagebutton     android:layout_margin="15dp"     android:layout_width="70dp"     android:layout_height="70dp"     android:src="@mipmap/ic_new"     android:background="@drawable/circle"     android:id="@+id/jobnewbutton"     android:layout_gravity="right|bottom"/>  </framelayout> 

and circle drawable looks this:

<?xml version="1.0" encoding="utf-8"?> 

<item android:top="8px">     <layer-list>         <item>             <shape android:shape="oval">                 <solid android:color="#08000000"/>                 <padding                     android:bottom="3px"                     android:left="3px"                     android:right="3px"                     android:top="3px"                     />             </shape>         </item>         <item>             <shape android:shape="oval">                 <solid android:color="#09000000"/>                 <padding                     android:bottom="2px"                     android:left="2px"                     android:right="2px"                     android:top="2px"                     />             </shape>         </item>         <item>             <shape android:shape="oval">                 <solid android:color="#10000000"/>                 <padding                     android:bottom="2px"                     android:left="2px"                     android:right="2px"                     android:top="2px"                     />             </shape>         </item>         <item>             <shape android:shape="oval">                 <solid android:color="#11000000"/>                 <padding                     android:bottom="1px"                     android:left="1px"                     android:right="1px"                     android:top="1px"                     />             </shape>         </item>         <item>             <shape android:shape="oval">                 <solid android:color="#12000000"/>                 <padding                     android:bottom="1px"                     android:left="1px"                     android:right="1px"                     android:top="1px"                     />             </shape>         </item>         <item>             <shape android:shape="oval">                 <solid android:color="#13000000"/>                 <padding                     android:bottom="1px"                     android:left="1px"                     android:right="1px"                     android:top="1px"                     />             </shape>         </item>         <item>             <shape android:shape="oval">                 <solid android:color="#14000000"/>                 <padding                     android:bottom="1px"                     android:left="1px"                     android:right="1px"                     android:top="1px"                     />             </shape>         </item>         <item>             <shape android:shape="oval">                 <solid android:color="#15000000"/>                 <padding                     android:bottom="1px"                     android:left="1px"                     android:right="1px"                     android:top="1px"                     />             </shape>         </item>      </layer-list> </item>  <item >      <ripple xmlns:android="http://schemas.android.com/apk/res/android"         android:color="?android:colorcontrolhighlight">         <item android:id="@android:id/mask">             <shape android:shape="oval">                 <solid android:color="#ffbb00" />             </shape>         </item>         <item>             <shape android:shape="oval">                  <solid android:color="@color/colorprimary" />               </shape>         </item>     </ripple>  </item>   </layer-list> 

not sure doing wrong , why first time button transparent.

the link posted sandeep singh solved issue.

https://github.com/makovkastar/floatingactionbutton


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -