floating-action-button

How to align Floating Action Button to center

心不动则不痛 提交于 2019-12-23 07:29:43
问题 I have one FloatingActionButton. I want it to be middle of 2 LinearLayouts and center of screen like this. Currently My design is like this I want it to be at the exact center of the screen. How to do that? This is my whole xml code <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent"> <LinearLayout android:layout

Slide in view from bottom over Google Map on Marker click

不打扰是莪最后的温柔 提交于 2019-12-22 13:58:06
问题 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

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

大兔子大兔子 提交于 2019-12-22 12:23:05
问题 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 Design Support Library FAB in a ViewPager Fragment with Coordinator Layout

旧时模样 提交于 2019-12-22 07:05:18
问题 I'm trying to get a Floating Action Button from the Android Design Support Library inside a Fragment which is inside a ViewPager. I've 4 tabs and I want the FAB in only one of the Tabs. My layout are as follows: main_layout.xml <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/main_content" android:layout_width="match_parent" android:layout_height="match_parent">

How to achieve Floating Action Button in Codenameone?

余生颓废 提交于 2019-12-21 17:22:10
问题 Floating Action button in android is good option. I want this in my codenameone application. I have tried it by using LayeredLayout, by having two layouts. I'm unable to achieve it perfectly. The button is keep moving along with the scroll. how to fix the button to the right bottom of the screen without affecting when the background layer is scrolling. Here is how i tried. Form myForm = new Form(); myForm.setLayout(new LayeredLayout()); myForm.setTitle("Floating Action Button"); SpanLabel lbl

onNestedScroll called only once

纵饮孤独 提交于 2019-12-21 04:33:24
问题 I have a class public class ScrollAwareFABBehavior extends FloatingActionButton.Behavior { public ScrollAwareFABBehavior(Context context, AttributeSet attrs) { super(); } public ScrollAwareFABBehavior() { super(); } @Override public boolean onStartNestedScroll(final CoordinatorLayout coordinatorLayout, final FloatingActionButton child,final View directTargetChild, final View target, final int nestedScrollAxes) { return nestedScrollAxes == ViewCompat.SCROLL_AXIS_VERTICAL; } @Override public

How to make Floating Action Button background Gradient?

给你一囗甜甜゛ 提交于 2019-12-21 02:36:17
问题 The code for FAB: <android.support.design.widget.FloatingActionButton android:id="@+id/fab" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="bottom|right|end" android:layout_margin="16dp" android:src="@drawable/add_chat" android:tint="@android:color/white" /> </android.support.design.widget.CoordinatorLayout> The code for gradient background: <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval"> <gradient

hide/show fab with scale animation

被刻印的时光 ゝ 提交于 2019-12-20 10:46:20
问题 I'm using custom floatingactionmenu. I need to implement scale animation on show/hide menu button like here floating action button behaviour Is there any way to do this ? 回答1: You can use these scale animations for fab button, it gives same effect like design lib fab button. scale_up.xml <?xml version="1.0" encoding="utf-8"?> <set xmlns:android="http://schemas.android.com/apk/res/android" > <scale android:duration="100" android:fromXScale="0" android:fromYScale="0" android:pivotX="85%"

Floating Action Button expansion [closed]

久未见 提交于 2019-12-20 08:23:04
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 4 years ago . According to the new Android Design Guidelines for the Floating Action Button, it should be reasonable to transform the Floating Action Button into a Toolbar. Are there any samples / examples to perform such a transformation? 回答1: To use reveal animation you need add a

Floating Action Button expansion [closed]

自古美人都是妖i 提交于 2019-12-20 08:22:06
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 4 years ago . According to the new Android Design Guidelines for the Floating Action Button, it should be reasonable to transform the Floating Action Button into a Toolbar. Are there any samples / examples to perform such a transformation? 回答1: To use reveal animation you need add a