I am trying to make a profile page in Android. I am using a floating action Button to display user picture.
Initially i want to display a default picture.
My xml code goes like this:
<android.support.design.widget.FloatingActionButton
android:layout_height="100dp"
android:layout_width="100dp"
android:id="@+id/userIcon"
app:fabSize="normal"
android:src="@drawable/male_icon"
app:pressedTranslationZ="12dp"
app:layout_anchor="@id/app_bar"
app:layout_anchorGravity="bottom|center" />
My question is why there is some extra space around the FAB. Cant i remove that space/padding?
EDITED:
here is my full xml code::
<android.support.design.widget.AppBarLayout
android:id="@+id/app_bar"
android:layout_width="match_parent"
android:layout_height="@dimen/app_bar_height"
android:fitsSystemWindows="true"
android:theme="@style/AppTheme.AppBarOverlay">
<android.support.design.widget.CollapsingToolbarLayout
android:id="@+id/toolbar_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fitsSystemWindows="true"
android:background="@drawable/background"
app:contentScrim="#2678AD"
app:layout_scrollFlags="scroll|exitUntilCollapsed">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
app:layout_collapseMode="pin"
app:popupTheme="@style/AppTheme.PopupOverlay" />
</android.support.design.widget.CollapsingToolbarLayout>
</android.support.design.widget.AppBarLayout>
<include layout="@layout/content_scrolling" />
<android.support.design.widget.FloatingActionButton
android:layout_height="100dp"
android:layout_width="100dp"
android:id="@+id/userIcon"
app:fabSize="normal"
android:src="@drawable/male_icon"
app:pressedTranslationZ="12dp"
app:layout_anchor="@id/app_bar"
app:layout_anchorGravity="bottom|center" />