floating-action-button

How to hide and show FAB on scroll of webview without using nestedScrollView

北慕城南 提交于 2019-12-08 07:12:49
问题 This is a floating action button in my XML layout. My Webview inside NestedScrollView causes a crash of pinch zoom support. <android.support.design.widget.FloatingActionButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="bottom|end" android:src="@drawable/filter_icon" android:tint="#FFFFFF" app:backgroundTint="@color/colorPrimary" app:elevation="4dp" app:fabSize="normal" app:useCompatPadding="true" app:layout_anchorGravity="bottom|end|right"

FAB between layouts

蓝咒 提交于 2019-12-07 19:09:49
问题 Here is my xml: <?xml version="1.0" encoding="utf-8"?> <android.support.design.widget.CoordinatorLayout 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:id="@+id/coordinatorLayout" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".MainActivity"> <include android:id="@+id/toolbar" layout="@layout/toolbar" /> <LinearLayout android:layout

FAB: Drawable already belongs to another owner

点点圈 提交于 2019-12-07 16:16:39
问题 I added two floating action buttons on a fragment but I always get following error: Invalid drawable added to LayerDrawable! Drawable already belongs to another owner but does not expose a constant state <RelativeLayout xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:android="http://schemas.android.com/apk/res/android" android:layout_margin="30dp" android:layout_width="match_parent" android:layout_height="match_parent"> <ScrollView android:layout_weight="1" android:id="@+id

F.A.B Hides but Doesn't Show

依然范特西╮ 提交于 2019-12-07 12:48:05
问题 Trying to implement a Floating Action Button (F.A.B) that hides on scroll down, and shows on scroll up. I have ScrollAwareFABBehavior.java to manage this, and it's connected to the F.A.B in in the XML activity_main . Problem: The F.A.B hides on scroll down, but doesn't show again when I scroll up. I logged the onNestedScroll method and it calls "calling scroll" and "calling to hide" while scrolling down; but after the F.A.B is hidden there are none of the 3x Log 's Question: Why does the F.A

Why is my floating action button not displaying its image properly?

▼魔方 西西 提交于 2019-12-07 11:13:03
问题 This is what my floating action button is showing rather that just showing the actual circle part of the image, it tries to fit the background of my .png file into the floating action button. here is my xml code: <android.support.design.widget.FloatingActionButton android:id="@+id/addToKitchenButton" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_margin="16dp" android:layout_gravity="bottom|end" android:layout_alignParentBottom="true" android:layout

Different implementation for a floating action button in each fragment of an activity

痴心易碎 提交于 2019-12-07 04:39:45
问题 This is regarding the issue of coordinating the behaviour of a Floating Action Button in an Activity which has 5 fragments in it. In my app, I have an Activity which houses a ViewPager and an xml defined with FloatingActionButton. The ViewPager contains Fragments, and inside each Fragment there is a RecyclerView.On clicking floating action button i have implemented scrollToPosition(0). As i have implemented Floating ActionButton in the xml file of main activity ,scrollToPosition() works only

FloatingActionButton shadow on pre-lollipop

前提是你 提交于 2019-12-07 04:05:25
问题 I want to make my FloatingActionButton much bigger with custom width and height. I find out that this is possible only if I add this as a child in FrameLayout or in CoordinatorLayout . On Lollipop and Marshmallow it looks good. But on pre-Lollipop the shadow from FloatingActionButton is very strange. Is it a bug from Android or I did something wrong? <android.support.design.widget.CoordinatorLayout android:id="@+id/help_layout" android:layout_width="wrap_content" android:layout_height="wrap

Android Cannot anchor FAB button to BottomSheet

倾然丶 夕夏残阳落幕 提交于 2019-12-07 00:15:05
问题 I'm trying to attach a FAB button to the BottomSheet view like Google Maps does. However I cannot make it work, this is the code of the FAB button: <android.support.design.widget.FloatingActionButton android:id="@+id/fab" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_margin="@dimen/fab_margin" android:src="@android:drawable/ic_dialog_email" app:layout_anchor="@+id/nestedscrollview" --> BottomSheet view ID app:layout_anchorGravity="bottom|end" app

How to set Floating Action Button image to fill the button?

孤街浪徒 提交于 2019-12-06 21:59:38
问题 Usually icons are set for floating action buttons, but I need to set an image, so I can make a circular image. I added it to the project (using Android Studio-> New -> Image Asset), but the image didn't fill the entire button: My xml: <com.github.clans.fab.FloatingActionMenu android:id="@+id/run_menu" android:layout_alignParentBottom="true" android:layout_alignParentRight="true" android:paddingBottom="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin"

Floating action button not displaying over recyclerview(which is inside a DrawerLayout)

南楼画角 提交于 2019-12-06 17:25:36
问题 I am trying to get FAB over recyclerview which in my case will cover the whole screen. The FAB wont display even recyclerview is empty. Following is my xml code. <android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/drawer_layout" xmlns:tools="http://schemas.android.com/tools" xmlns:app="http://schemas.android.com/apk/res-auto" tools:context="com.technistan.ledger.CreateLedger" android:layout_width="match_parent" android:layout