floating-action-button

How to add an overlapping button in android

蓝咒 提交于 2019-12-11 04:32:15
问题 I am currently building a custom button navigation bar for an android app. It contains several clickable section inside (see cod below) and one fab button in the center that should overlap the top side of the navigation bar by half. I managed to do this by using a negative margin and setting clipChildren to false on every parent element. Visually it looks just like I want it to but the part of the fab button outside of the navigation bar can't be clicked. How can I achieve that overhanging

Floating action button doesn't appear in kitkat

醉酒当歌 提交于 2019-12-11 01:05:04
问题 I have created a single page app where the floating action button is used to share content from the page. It works flawlessly in android lollipop but when i ran the app on kitkat, it doesn't show. Since the only interactive component is the FAB, the user is left with nothing to do but stare. I ran some search and found that the FAB should work perfectly on kitkat and that there are some issues only when it comes to lollipop(like padding). But, it works just fine in lollipop. Do I have to

Why does FAB appear different on different Android devices/OS versions?

依然范特西╮ 提交于 2019-12-10 23:31:50
问题 Can anyone tell me why exactly the same image (same image resource file as PNG, and same XML definition below) looks perfect on Android 5.1 and 7.1.1 (the image above) but bad on Android 4.1 (the image below). The above image appears perfect on: Samsung real device 5.1 Pixel API 25 (7.1.1) emulator The below image looks bad on: Samsung real device 4.3 Nexus One API 18 4.2 emulator The XML code: <android.support.design.widget.FloatingActionButton android:id="@+id/myFAB" android:layout_width=

What is wrong with my layer-list drawable?

女生的网名这么多〃 提交于 2019-12-10 22:16:25
问题 I wanted to set a custom drawable to be the android:src of FloatingActionButton in this layout: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:sscce="http://schemas.android.com/apk/res-auto" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" > <android.support.design.widget.FloatingActionButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" sscce

FloatingActionButton OnClickListener not working on API 17

南楼画角 提交于 2019-12-10 21:17:23
问题 my FAB onClick is not working on API 17, but on API 21 it's working fine. I'm using: compile 'com.android.support:design:23.+' FAB layout: <android.support.design.widget.FloatingActionButton android:id="@+id/myFAB" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:layout_alignParentEnd="true" android:layout_gravity="bottom" android:layout_marginBottom="26dp" android:layout_marginLeft="16dp" android:layout_marginRight="16dp

Collapsing toolbar with floating action Menu

帅比萌擦擦* 提交于 2019-12-10 15:21:35
问题 I followed this link to create floating toolbar with fab .. Collapsing toolbar with floating action Menu I tried to change the fab to a floating menu with few options when i click on the flab but when i attached the fab along with the toolbar,I couldn't collapse the toolbar along with the fab and hide the floating menu. This is the link which i followed to create floating menu Sub menu items in fab Can any one help me please.... My layout <?xml version="1.0" encoding="utf-8"?> <android

Elevation not working on android.support.design.widget.FloatingActionButton

三世轮回 提交于 2019-12-10 14:31:47
问题 I've just started android development and trying the new material design. is a screenshot of my mainactivity which has a FloatingActionButton but it doesnt applying any elevation (no shadows). How can I enable shadow on this new widget (android.support.widget.FloatingActionButton). This is code from layout xml <android.support.design.widget.FloatingActionButton android:id="@+id/add_button" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout

How do you hide floating action buttons from the keyboard?

若如初见. 提交于 2019-12-10 11:14:00
问题 I have FloatingActionButtons and FloatingActionMenus in CoordinatorLayouts, but I also have some EditTexts in there too, with the adjustPan window mode. But when I go to click the EditTexts, the floating buttons/menus come up along with the keyboard and somewhat block the visible area (such as the row containing the EditText). Can I somehow prevent the floating items from coming up with the keyboard? 回答1: There is a library which can listen to keyboard visibility, if the keyboard is visbile

Notch in BottomAppBar for custom FAB

老子叫甜甜 提交于 2019-12-10 11:05:37
问题 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

How to drag a floating action button over a view pager

血红的双手。 提交于 2019-12-10 10:18:29
问题 Here, I have a view pager that is shared by multiple Fragments which all are contained in a TABLayout as shown below <RelativeLayout android:layout_width="match_parent" android:layout_height="match_parent" xmlns:app="http://schemas.android.com/apk/res-auto" android:orientation="vertical" xmlns:android="http://schemas.android.com/apk/res/android"> <android.support.v7.widget.Toolbar android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="?attr/actionBarSize" android