floating-action-button

Floating Action Button with square shape

假如想象 提交于 2019-11-30 17:18:30
问题 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

React Native, TouchableOpacity wrapping floating button get nothing

北战南征 提交于 2019-11-30 15:44:07
问题 I'm creating a simple action button (floating button) This is working : <View style={{ width: this.props.size, height: this.props.size, borderRadius: this.props.size / 2, backgroundColor: '#ee6e73', position: 'absolute', bottom: 10, right: 10, flexDirection:'row' }}> <Text> + </Text> </View> This is not : <TouchableOpacity onPress={()=>{ }} > <View style={{ width: this.props.size, height: this.props.size, borderRadius: this.props.size / 2, backgroundColor: '#ee6e73', position: 'absolute',

Using Support Design Library in Eclipse

♀尐吖头ヾ 提交于 2019-11-30 15:19:16
I'm working on a project that unfortunately hasn't been migrated to Android Studio yet. I want to utilize the floating action button in Google's new support.design library but I can't manage to get it included in my project. I updated the support libraries in the Android SDK Manager. First, I tried importing the library into Eclipse and adding it as a dependency using Project → Properties → Android on my app but the design project isn't showing up as a library project. Then I tried copying the .jar form the /libs/ directory of the design library and including that in my project. That allowed

React Native, TouchableOpacity wrapping floating button get nothing

大城市里の小女人 提交于 2019-11-30 14:48:42
I'm creating a simple action button (floating button) This is working : <View style={{ width: this.props.size, height: this.props.size, borderRadius: this.props.size / 2, backgroundColor: '#ee6e73', position: 'absolute', bottom: 10, right: 10, flexDirection:'row' }}> <Text> + </Text> </View> This is not : <TouchableOpacity onPress={()=>{ }} > <View style={{ width: this.props.size, height: this.props.size, borderRadius: this.props.size / 2, backgroundColor: '#ee6e73', position: 'absolute', bottom: 10, right: 10, flexDirection:'row' }}> <Text> + </Text> </View> </TouchableOpacity> Just wrap with

How to enable/disable FloatingActionButton Behavior

北城以北 提交于 2019-11-30 13:06:16
I am working on app in some fragment i want to hide FloatingActionButtton. When i set android:visibility="gone" . Behavior animation show me FloatingActionButtton when i swipe up and down. is there is any way i can disable/enable FloatingActionButtton behavior. Thank you advance. here is my code QuickReturnFooterBehavior.java package com.app.common; import android.animation.Animator; import android.content.Context; import android.support.design.widget.CoordinatorLayout; import android.support.v4.view.ViewCompat; import android.support.v4.view.animation.FastOutSlowInInterpolator; import android

How to rotate floating action button without rotaing shadow?

谁都会走 提交于 2019-11-30 12:45:32
I rotate the FAB in such a simple way: fab.startAnimation(AnimationUtils.loadAnimation(this, R.anim.rotate)); rotate.xml : <?xml version="1.0" encoding="utf-8"?> <set xmlns:android="http://schemas.android.com/apk/res/android"> <rotate android:fromDegrees="0" android:toDegrees="360" android:pivotX="50%" android:pivotY="50%" android:duration="1000"/> </set> This works, but together with the FAB its shadow rotates. But I need only the FAB to rotate (or even its src image, if there's any difference). srinivasan Did you try with the animate method provided by the Compat library? I too had the same

Set FAB icon color

拟墨画扇 提交于 2019-11-30 12:00:11
问题 current FAB I would like to know how to change the icon color of the FAB (Floating Action Button) widget supplied by the 'com.android.support:design:22.2.0' library from green to white. style.xml <resources> <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"> <item name="colorPrimary">@color/color_primary</item> <item name="colorPrimaryDark">@color/color_primary_dark</item> <item name="colorAccent">@color/accent</item> </style> <color name="color_primary">#00B33C</color> <color

How to remove FloatingActionButton's surrounding shadow?

荒凉一梦 提交于 2019-11-30 11:00:33
I'm trying to replace the third party FloatingActionButton with the native one which is packaged in library com.android.support:design:22.2.0 .The default look has a dark shadow around the image,How can I get rid of it? I know the former one provides with the method setShadow() ,but I just can't find similar one from the latter. This is the related XML layout: <android.support.design.widget.FloatingActionButton android:id="@+id/alarm_front" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/btn_icon_alarm_notset" /> And I have set its background

Using Google Design Library how to hide FAB button on Scroll down?

杀马特。学长 韩版系。学妹 提交于 2019-11-30 10:26:52
问题 Google have released Design library, I am using compile 'com.android.support:design:22.2.1' However I cant see any code examples of how to use this library and how to animate the FAB bar on scroll. I guess I can listen for scroll events on the ListView and then animate the button myself, but is this not baked into the API (is this not the point of this support library). Is there examples for this ? 回答1: If you're using RecyclerView and you're looking for something simple, you can try this:

FloatingActionButton does not come down when dismissing Snackbar

我的梦境 提交于 2019-11-30 08:50:12
I am trying to use a Snackbar . I have a FloatingActionButton wrapped in a CoordinatorLayout . When the Snackbar shows, the button is correctly moved up. When it dismisses automatically, the button moves down. But if I dismiss the Snackbar programmatically, the button does not go down. My code is simple: mSnackbar = Snackbar.make(mCoordinatorLayout, text, Snackbar.LENGTH_LONG) .setAction(R.string.undo, new View.OnClickListener() { @Override public void onClick(View v) { undoDeleteTasks(); } }); mSnackbar.show(); Is there a way to make the FloatingActionButton move down when the Snackbar is