floating-action-button

FAB - square on pre Lollipop and without shadow on Lollipop

▼魔方 西西 提交于 2019-11-26 20:25:56
问题 It looks like FloatingActionButton is not working ether on Android 4.0 and Lollipop. As you can see on image below, on Android Lollipopo shadow is missing and on Android 4.1.1 it's square :/ Anyone faced this issue? Library version: compile 'com.android.support:design:22.2.0' Code: <android.support.design.widget.FloatingActionButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/abc_ic_clear_mtrl_alpha"/> 回答1: Thanks to @harism comment, simply

Bottom Align Floating Action Button

巧了我就是萌 提交于 2019-11-26 19:48:11
问题 I want to align to bottom right my FAB. I tried with android:gravity="bottom|right" When I try android:layout_alignParentBottom="true " FAB disappears When I try android:layout_alignBottom="@id/lista_tiendas" FAB disappears It doesn't seem complicated but I just can't accomplish it Any Ideas? <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent"

Floating Action Button not showing fully inside a fragment

血红的双手。 提交于 2019-11-26 18:58:09
问题 I am using FAB button along with RecyclerView in a Fragment. This Fragment is an instance of a TabViewPager. I am having a issue with the FAB button. I have placed the RecyclerView and the fab button inside a FrameLayout, where the FAB buttton is positioned bottom right. Now the problem that I am facing is the FAB button is not fully visible. Its half of the portion is hidden as shown in the screenshot below. Can any one help me to solve this issue. Thanks in advance. Note: The FAB is

Android Design Library - Floating Action Button Padding/Margin Issues

▼魔方 西西 提交于 2019-11-26 15:07:42
问题 I'm using the new FloatingActionButton from the Google Design Library and I am getting some strange padding/margin problems. This image (with developer layout options on) is from API 22. And from API 17. This is the XML <android.support.design.widget.FloatingActionButton android:id="@+id/fab" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentEnd="true" android:layout_gravity="bottom|right" android:layout_marginLeft="16dp" android:layout

Android changing Floating Action Button color

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-26 12:37:34
Been trying for hours to change Material's Floating Action Button color, but without success. <android.support.design.widget.FloatingActionButton android:id="@+id/profile_edit_fab" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="end|bottom" android:layout_margin="16dp" android:clickable="true" android:src="@drawable/ic_mode_edit_white_24dp" /> I have tried to add android:background="@color/mycolor" or via code FloatingActionButton fab = (FloatingActionButton) rootView.findViewById(R.id.profile_edit_fab); fab.setBackgroundColor(Color.parseColor("

Adjust icon size of Floating action button (fab)

老子叫甜甜 提交于 2019-11-26 12:35:56
问题 The new floating action button should be 56dp x 56dp and the icon inside it should be 24dp x 24dp . So the space between icon and button should be 16dp . <ImageButton android:id=\"@+id/fab_add\" android:layout_width=\"56dp\" android:layout_height=\"56dp\" android:layout_gravity=\"bottom|right\" android:layout_marginBottom=\"16dp\" android:layout_marginRight=\"16dp\" android:background=\"@drawable/ripple_oval\" android:elevation=\"8dp\" android:src=\"@drawable/ic_add_black_48dp\" /> ripple

FAB animation with viewpager/tabslider

馋奶兔 提交于 2019-11-26 12:07:29
问题 I\'m trying to find way to achieve such effect https://material-design.storage.googleapis.com/publish/material_v_4/material_ext_publish/0B6Okdz75tqQsVlhxNGJCNTEzNFU/components-buttons-fab-behavior_04_xhdpi_009.webm I\'m using android.support.v4.view.ViewPager I appreciate any hints and help 回答1: First, you need to have the layout with the floating action button anchored to the ViewPager: <android.support.design.widget.CoordinatorLayout android:id="@+id/main_content" android:layout_width=

Android How to implement Bottom Sheet from Material Design docs

为君一笑 提交于 2019-11-26 09:15:13
问题 How do you implement the bottom sheet specficiation? http://www.google.com/design/spec/components/bottom-sheets.html The new update to Google Drive shows this with the Floating Action Button press -> Granted the specs never say anything about rounded corners, regardless it is possible to do, just unsure of how to go about it. Currently using the AppCompat library and target set to 21. Thanks 回答1: Edit The BottomSheet is now part of the android-support-library . See John Shelleys' answer.

Android Design Support Library expandable Floating Action Button(FAB) menu

旧巷老猫 提交于 2019-11-26 09:14:42
问题 Now that the Android Design Support Library is out, does anyone knows how to implement expanded Fab menu with it, like the fab on Inbox App? Should look like this: 回答1: Currently, there is no widget provided in the Design Library. The only way to do it quickly and easily is by using third-party libraries. You can obviously do this using the Design Library too, but it will be a huge work and require a lot of time. I have mentioned some useful libraries, that can help you achieve this. Rapid

How to add shadow to the FAB provided with the android support design library?

给你一囗甜甜゛ 提交于 2019-11-26 08:19:59
问题 The title is pretty self explaining. The following code does not render shadow below the Floating Action Button. What can be done to render shadow? Is this feature really not supported even on API 21+? <android.support.design.widget.FloatingActionButton android:layout_height=\"wrap_content\" android:layout_width=\"wrap_content\" android:src=\"@drawable/ic_add\" android:clickable=\"true\" /> Note: Adding android:elevation does not add shadow on API 21. Screenshot taken from the example by