floating-action-button

Floating Action Button does not raise OnClick event

风流意气都作罢 提交于 2019-12-04 11:35:32
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.MapView android:id="@+id/mapView" android:layout_width="fill_parent" android:layout_height="fill_parent"

Android - FAB to hide when navigating between different fragments in a viewpager

倖福魔咒の 提交于 2019-12-04 10:42:07
问题 I'm trying to do something really simple. I would like the FAB to only appear on one tab in my TabLayout and be hidden when navigating to another tab. So for example, one tab would let you add new items in the FAB, but the next tab would not let you add items. I have followed the 'typical' XML design layout: <?xml version="1.0" encoding="utf-8"?> <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android

How to integrate a floating action button into linear layout with toolbar

给你一囗甜甜゛ 提交于 2019-12-04 10:08:53
问题 I have the following list view to which I want to add a floating action button. <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" android:background="@drawable/background_serious" > <include layout="@layout/toolbar"/> <ListView android:id="@id/android:list" android:layout_width="fill_parent" android:layout_height="wrap_content"

Custom auto hide floatingActionButton behavior is not working

丶灬走出姿态 提交于 2019-12-04 10:08:47
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.AppBarLayout android:layout_width="match_parent" android:layout_height="wrap_content" android

How to change the shape of Floating Action Button (FAB) on android?

百般思念 提交于 2019-12-04 09:15:42
问题 In our android app we need to create a floating action button which isn't the default circle but a square with with three rounded corners. The fab looks like in the image below: I managed to create such a form but don't know how to apply it to my fab, or if it's even possible. The xml file for the shape looks like this: <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <solid android:color="@color/red" /> <corners android:topLeftRadius="90dp" android

How to achieve Floating Action Button in Codenameone?

假装没事ソ 提交于 2019-12-04 07:31:37
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 = new SpanLabel("some long text"); Container conBottom = new Container(); conBottom.setLayout(new

Floating Action Menu implementation using Float action button from Android Design Support library [closed]

牧云@^-^@ 提交于 2019-12-04 05:02:08
Closed. This question is off-topic. It is not currently accepting answers. Learn more . Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . Is there any simple implementation of Floating Action Menu using Floating Action Button from Android Design Support Library ? I Found one here: https://github.com/chrisbanes/cheesesquare Hope it helps :) 来源: https://stackoverflow.com/questions/30523144/floating-action-menu-implementation-using-float-action-button-from-android-desig

Floating Action Button appears over Navigation Drawer

人盡茶涼 提交于 2019-12-04 04:21:05
So I am using https://github.com/neokree/MaterialNavigationDrawer for my navigation drawer and https://gist.github.com/Jogan/9def6110edf3247825c9 as my FAB implementation. When I open the navigation drawer, it does not cover the FAB, and the button appears on top of it. I would like to avoid hiding the button and showing it on drawer open/close as that is rather distracting. Any ideas on how to fix this? Edit: I am adding the FAB programmatically doing the following: fabButton = new FloatingActionButton.Builder(this) .withDrawable(getResources().getDrawable(R.drawable.ic_action_edit))

Hide a Floating Action Button of another Layout

…衆ロ難τιáo~ 提交于 2019-12-04 04:02:29
I have a FloatingActionButton inside of may activity_main.xml layout which is named fabBtn . My application is built with a ViewPager and three Fragment s.I want to hide the FloatingActionButton when my first Fragment detects a scroll, but I keep getting a NullPointerException if the user starts scrolling. I believe it could be that my fragment can't get the FloatingActionButton from the activity_main.xml layout? Here is my activity_main.xml <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools"

Bug with anchored FloatingActionButton in support library 24.2.1

吃可爱长大的小学妹 提交于 2019-12-04 00:56:09
I have been having this issue since 24.2.0, but now I'm using 24.2.1 and the bug is still here, it only works well <= 24.1.1. I have an anchored FloatingActionButton done like this: <ScrollView 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.support.design.widget.CoordinatorLayout android:id="@+id/contact_coordinator_layout" android:layout_width="match_parent" android:layout_height="wrap_content" tools