floating-action-button

Animating Fab on click (zoom in/out)

孤街醉人 提交于 2019-11-27 19:07:06
I am trying to mimic animation and the color change for the following floating action button. The way the floating action button works is white is off and blue is on. However, I have been unsuccessful with the animation and changing the color. These have been my attempts at doing this, as you can see I have commented out all the different ways I have tried to do this. This is my code: @SuppressWarnings("unused") @OnClick(R.id.fabMovieFavourite) public void addMovieFavourite(View view) { /* final Animator animator = AnimatorInflater.loadAnimator(getActivity(), R.animator.add_favourite_movie);

FloatingActionButton doesn't hide

人盡茶涼 提交于 2019-11-27 18:58:28
I am trying to hide my FloatingActionButton fabLocation programmatically with : fabLocation.setVisibility(View.GONE) but it does not work. If I add android:visibility="gone" in my XML layout, fabLocation is hidden when I run my activity but it reappears when I scroll. Here is my layout: <?xml version="1.0" encoding="utf-8"?> <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" android

Floating Action Button not showing fully inside a fragment

一笑奈何 提交于 2019-11-27 17:17:38
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 aligning properly once it is scrolled. The problem arises only if it is ideal (before scrolling done).

Floating action button and white background

岁酱吖の 提交于 2019-11-27 16:31:43
问题 In fact, I search a way to mimic the FAB's inbox. When user press the red button, an opac view and a menu should appear. Because images are more more meaningful, see the following picture I know it exists this wonderful library (https://github.com/futuresimple/android-floating-action-button) and with this library, i can display floating action menu. But my problem is displaying the white background (with opacity). I didn't find a solution to solve my problem ... Thx in advance 回答1: Place the

Floating Action Button

社会主义新天地 提交于 2019-11-27 16:22:11
I have been trying to use Floating Action Button. I tried to use some of the resources suggested on here and the links were great; however, I couldn't use alot of them because of problems with dependicies. I tried to fix it but it got more messed up. Long story short, I use the following code as a way to bypass dependicies in my bundle. I got the button to work; however, I couldn't figure out how to have options to appear when the button is clicked. I tried on clicklistener and other ways but I always got an error. public class FloatingActionButton extends View { Context context; Paint

Floating Action Button does not responds when it clicked/touched

不羁岁月 提交于 2019-11-27 15:05:28
问题 I am using a floating action button(FAB) in my application to show Dialogs, everything is worked just fine when I tested my app in Xperia Z with Lopllipop 5.1.1. However, the problem is when tested my app in ASUS Zenfone 6 with KitKat 4.4.2 and in Xperia C with Jelly Bean 4.2.2, the FAB loaded perfectly but the FAB does not show the Dialogs, seems like it does not responds when I touched it. For the record, my min sdk version is 16. What i want to ask is why this is happening? Is there

Javascript FAB framework on Node.js

≯℡__Kan透↙ 提交于 2019-11-27 14:37:17
问题 I've seen a slide that presented Fab, a node.js framework. Is this JavaScript? Could someone explain what is going on in that code? I'm all lost. 回答1: Is plain JavaScript, it is a function chaining pattern. The first line, ( fab = require("fab") ) includes the fab function and returns a reference to it. All the subsequent parentheses are function calls, each function invocation returns probably the same function again and again. The pattern probably looks like this simplified example: var foo

How to change android design support library FAB Button border color?

老子叫甜甜 提交于 2019-11-27 13:41:03
I want to change fab button border color. border color is white, inside color is black or transparent I'd like my button to look like this: fab.xml in drawable <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:innerRadius="0dp" android:shape="ring" android:thicknessRatio="2" android:useLevel="false" > <solid android:color="@android:color/transparent" /> <stroke android:width="3dp" android:color="@android:color/white" /> </shape> Floating Action Button in layout <android.support.design.widget.FloatingActionButton android:id="@+id

android: dynamically change FAB(Floating Action Button) icon from code

大城市里の小女人 提交于 2019-11-27 13:26:13
问题 How to change FAB icon in an Activity during runtime. I have this code -> FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fabMainActivity); I know this is possible using fab.setBackgroundDrawable(); but i am a newbie to android, don't understand how to do this. Any help will be highly appreciated. Thanks 回答1: Changing FloatingActionButton source: if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { floatingActionButton.setImageDrawable(getResources().getDrawable(R

FloatingActionButton with text instead of image

谁说胖子不能爱 提交于 2019-11-27 11:31:36
I'm trying to figure out how can be modified FloatingActionButton from android support library. Can it be used with the text instead of image? Something like this one: I see it extends ImageButton so I think not. Am I right? Is this correct in terms of Material Design in general? With API 28 you can simply add text to Fabs using: Visit: https://material.io/develop/android/components/extended-floating-action-button/ <com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_margin="8dp"