floating-action-button

error: failed linking references. -> QueuedJob

岁酱吖の 提交于 2019-12-01 16:16:16
I was studying the Android Material Design using Kotlin and everything was going fine until I tried to use the android.support.design.widget.FloatingActionButton. When I rebuild the project I got the error message below: Information:Gradle tasks [clean, :app:assembleDebug] C:\Users\qin\.gradle\caches\transforms-1\files-1.1\appcompat-v7-26.1.0.aar\3d5ddc383685b19d22429a29e09f2aeb\res\values\values.xml Error:(1419, 5) error: style attribute 'attr/textColor (aka br.com.conseng.themedesign:attr/textColor)' not found. Error:(1525, 5) error: style attribute 'attr/textColor (aka br.com.conseng

error: failed linking references. -> QueuedJob

夙愿已清 提交于 2019-12-01 14:07:31
问题 I was studying the Android Material Design using Kotlin and everything was going fine until I tried to use the android.support.design.widget.FloatingActionButton. When I rebuild the project I got the error message below: Information:Gradle tasks [clean, :app:assembleDebug] C:\Users\qin\.gradle\caches\transforms-1\files-1.1\appcompat-v7-26.1.0.aar\3d5ddc383685b19d22429a29e09f2aeb\res\values\values.xml Error:(1419, 5) error: style attribute 'attr/textColor (aka br.com.conseng.themedesign:attr

Rendering Problems using FloatingActionButton between two layouts stop working after updating to dependencies 24.2.0

北战南征 提交于 2019-12-01 10:13:15
问题 As I mentioned in the question, my FloatingActionButton between two layouts, check classic example here, stopped working after updating gradle dependencies to 24.2.0. I have checked similar questions and answers. After digging, I found an answer explaining the reason, see here. The solutions is extremely useful for cases where you want to place the FAB at the bottom of the layout. However, this is not working between two layouts. Sorry for creating another question/issue, and not continuing

Android floating action button not returning to initial position

放肆的年华 提交于 2019-12-01 08:52:28
If the FAB (Floating Action Button) hides before a snackbar appears (in CoordinatorLayout) then the next time I show the FAB it is drawn in the old position (not moved down to the original position). If the FAB is visible when the snackbar dissapears, then everything is working as expected. Did I miss something or is it a bug? UPD: As requested, here is a minimal example. I will put most important bits here, and a fully working example can be found on my github This is just a very slightly modified example from Android template Activity project. activity_main.xml : <?xml version="1.0" encoding

Android floating action button not returning to initial position

狂风中的少年 提交于 2019-12-01 07:39:36
问题 If the FAB (Floating Action Button) hides before a snackbar appears (in CoordinatorLayout) then the next time I show the FAB it is drawn in the old position (not moved down to the original position). If the FAB is visible when the snackbar dissapears, then everything is working as expected. Did I miss something or is it a bug? UPD: As requested, here is a minimal example. I will put most important bits here, and a fully working example can be found on my github This is just a very slightly

Android - How to create FAB programmatically?

自作多情 提交于 2019-12-01 01:37:24
I have an app with full of custom views. When I try to create a FAB programmatically, it throws an error Caused by: java.lang.IllegalArgumentException: You need to use a Theme.AppCompat theme (or descendant) with the design library. Here is my code. private FloatingActionButton getFAB() { FloatingActionButton fab = new FloatingActionButton(getContext()); fab.setBackgroundDrawable(ContextCompat.getDrawable(getContext(), R.drawable.ic_add_white_24dp)); return fab; } This is my app theme. <!-- Base application theme. --> <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> <!--

Floating Action Button with square shape

丶灬走出姿态 提交于 2019-11-30 21:44:59
When I set a color to my fab, it looks like so: My layout xml: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" xmlns:app="http://schemas.android.com/apk/res-auto" 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" tools:context=".MainActivity$PlaceholderFragment"> <android.support

Flutter - FloatingActionButton in the center

扶醉桌前 提交于 2019-11-30 20:16:26
Is it possible to make the FloatingActionButton in the centre instead of the right side? import 'package:flutter/material.dart'; import 'number.dart'; import 'keyboard.dart'; class ContaPage extends StatelessWidget { @override Widget build(BuildContext context) => new Scaffold( body: new Column( children: <Widget>[ new Number(), new Keyboard(), ], ), floatingActionButton: new FloatingActionButton( elevation: 0.0, child: new Icon(Icons.check), backgroundColor: new Color(0xFFE57373), onPressed: (){} ) ); } Try wrapping it in a Center widget or use a crossAxisAlignment of CrossAxisAlignment

How to add floating action button on top of scrollview

江枫思渺然 提交于 2019-11-30 18:35:24
I have a floating action button that I would like to add on top of a scrollview so that the button stays, even if you scroll. I want it on the top of the scrollview and in the bottom right corner of the screen. What combination of views do I need to use to accomplish this? Here is the xml file: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" xmlns:fab="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="com.nhscoding.safe2tell.STORIES" android

Android: Floating Button Icon is not centred

半城伤御伤魂 提交于 2019-11-30 17:19:16
I'm trying to create a floating button in my app. The button is there, but the image in the button is a bit upwards (see image). I can't figure out what's wrong with it. Below is part of the XML for floating button. <android.support.design.widget.FloatingActionButton android:id="@+id/buttonUp" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginRight="16dp" android:layout_marginTop="480dp" android:clickable="true" android:scaleType="center" android:src="@drawable/btn_back_to_top_3x" app:layout_anchor="@id/layout" app:layout_anchorGravity="bottom|right