floating-action-button

Slide in view from bottom over Google Map on Marker click

别来无恙 提交于 2019-12-06 11:30:10
I want to achieve the following: GMaps slide in mockup The Info view should slide in from the bottom when I click on a marker. The black circle is a Floating Action Button and should rise to the top with the info window and rest with its center at the upper border of the info window. When I click anywhere but on the info window, it should slide back down and disappear. Could you give me some starting points? I already read about object animators and the CoordinatorLayout, yet I don't know where to begin. You can implement it yourself by adding a bottomsheet element to the parent layout of the

Is it possible to use CardView to make shadow for Floating Action Button?

风流意气都作罢 提交于 2019-12-06 09:25:55
I know CardView is not made for this, but in theory if cardCornerRadius = view_size / 2 it should result in circle. Am I missing something? Drawing real, animated shadows is not that difficult and you can try to achieve Lollipop's effect on any Android down to Froyo. Here's how it works: Draw your view to an offscreen bitmap using LightingColorFilter(0,0) Blur that bitmap using ScriptIntrisincBlur. Set the blur radius to your elevation value. Draw that blurred bitmap beneath your floating action button. For an example implementation see: Shadow generator, blurs views: https://github.com

Notch in BottomAppBar for custom FAB

孤街醉人 提交于 2019-12-06 08:53:34
I'm using UnicornDialer from the unicorndial package to create a Material speed dial experience on the home page of my app, but if I set the shape property to define a notch, then notch is not painted correctly: I noticed on another package ( flutter_speed_dial ) that this was explicitly mentioned as not working: The SpeedDial widget is built to be placed in the floatingActionButton parameter of the Scaffold widget. It's not possible to set its position with the Scaffold.floatingActionButtonLocation parameter though. The use with the Scaffold.bottomNavigationBar is possible but the floating

How do you put a floating action button (FAB) above a ListView in a Fragment in xml?

社会主义新天地 提交于 2019-12-06 07:28:22
This is my XML but it complains that I have "two roots".. <ListView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:fab="http://schemas.android.com/apk/res-auto" android:id="@android:id/list" style="@style/ListView" android:layout_width="match_parent" android:layout_height="match_parent"/> <android.support.design.widget.FloatingActionButton android:id="@+id/fab" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/ic_add_white_48dp" android:layout_gravity="bottom|end" fab:elevation="6dp" fab:pressedTranslationZ="12dp" fab

Is it possible to increase Floating Action Button size on Android?

主宰稳场 提交于 2019-12-06 06:54:53
问题 I'm working on an application and we want to increase the size of our floating action button on larger devices. The problem is that floating action button comes only in two size ( mini and normal ). First, I tried to set a custom android:layout_height and android:layout_height to my fab but it didn't work. Well, the whole layout did actually got bigger but a border appeared around the fab and the background wasn't fully transparent. Desperate for a solution I created my own circle button view

Floating Action Button does not raise OnClick event

假如想象 提交于 2019-12-06 05:39:55
问题 I have the Following layout: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin" android:paddingTop="@dimen/activity_vertical_margin" android:paddingBottom="@dimen/activity_vertical_margin" android:id="@+id/rlMap"> <org.mapsforge.map.android.view

F.A.B Hides but Doesn't Show

本秂侑毒 提交于 2019-12-06 03:04:25
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.B not show when I scroll up, after the F.A.B has been hidden. ScrollAwareFABBehavior.java: import

Custom auto hide floatingActionButton behavior is not working

心已入冬 提交于 2019-12-06 02:44:36
问题 I'm trying to hide a FloatingActionButton when a NestedScrollView scroll down, and revealed itself when NestedScrollView scroll up. Here is my layout: <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:layout_width="match_parent" android:layout_height="match_parent" android:fitsSystemWindows="true"> <android.support.design.widget

FAB: Drawable already belongs to another owner

血红的双手。 提交于 2019-12-06 01:36:18
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/scrollView" android:layout_marginRight="30dp" android:layout_width="fill_parent" android:layout_height="wrap

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

杀马特。学长 韩版系。学妹 提交于 2019-12-05 08:55:35
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 in the last fragment on clicking floating action button.How do i overcome this so that on clicking