floating-action-button

floating action button on react native

╄→尐↘猪︶ㄣ 提交于 2019-12-03 11:01:21
I want to use a floating action button in react native android in bottom right corner of the screen. But I am not able to do so. The CreateButton component contains floating button code. I called the CreateButton component after the list View and I want to show this button on the ListView android component with transparent overlay and fixed position in bottom right. <DrawerLayoutAndroid drawerWidth={300} drawerPosition={DrawerLayoutAndroid.positions.Left} renderNavigationView={() => navigationView}> <View style={styles.navBar}> <TouchableOpacity style={styles.menuIconButton}> <Image style=

Android: Create bigger Floating Action Button with bigger icon

≡放荡痞女 提交于 2019-12-03 08:45:51
问题 I want to create a bigger Floating Action Button (FAB), more than the usual 56 dp, with a bigger icon inside. (For my purpose an icon will never be self-explanatory so I will create a png-file containing a short text and use this png as icon.) Increasing the size of the FAB works fine: as i don't use the mini-FloatingActionButton, i redefined the mini-button-size. in my layout-xml i specify: <android.support.design.widget.FloatingActionButton ... app:fabSize="mini" .... and in the dimensions

How to add a TextView above a FloatingActionButton in Android

和自甴很熟 提交于 2019-12-03 07:30:25
问题 I want to add a TextView above a FloatingActionButton, I use the FrameLayout as the parent layout of the TextView and FloatingActionButton, here is my sample code: <FrameLayout android:layout_width="wrap_content" android:layout_height="wrap_content"> <android.support.design.widget.FloatingActionButton xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/fab" android:layout_width="wrap_content" android:layout_height="wrap_content" app:backgroundTint="#00fff0" app:borderWidth=

Android - FAB to hide when navigating between different fragments in a viewpager

十年热恋 提交于 2019-12-03 06:58:47
I'm trying to do something really simple. I would like the FAB to only appear on one tab in my TabLayout and be hidden when navigating to another tab. So for example, one tab would let you add new items in the FAB, but the next tab would not let you add items. I have followed the 'typical' XML design layout: <?xml version="1.0" encoding="utf-8"?> <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" xmlns:app="http://schemas.android.com

Show/Hide FloatingActionButton on ViewPager swipe

一曲冷凌霜 提交于 2019-12-03 06:24:43
I have an activity that has 3 tabs. Each tabs page is a fragment which displays a RecyclerView. One of the fragment has FloatingActionButton in it. I'm implementing this Button in the Fragment's layout. I'm also making it static at the bottom right of the Fragment. Fragment layout: - CoordinatorLayout - RecyclerView - FAB (without any behavior) In Activity layout, I have: - CoordinatorLayout - AppBarLayout - Toolbar - TabLayout (SmartTabLayout) - ViewPager The problem now is the FAB is half-hidden from the view when Toolbar is expanded, but fully shown when Toolbar is collapsed. Though this

How to integrate a floating action button into linear layout with toolbar

蓝咒 提交于 2019-12-03 05:58:11
I have the following list view to which I want to add a floating action button. <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" android:background="@drawable/background_serious" > <include layout="@layout/toolbar"/> <ListView android:id="@id/android:list" android:layout_width="fill_parent" android:layout_height="wrap_content" android:cacheColorHint="#00000000"> </ListView> <android.support.design.widget.FloatingActionButton

AdView and FloatingActionButton overlap while using CoordinatorLayout

拈花ヽ惹草 提交于 2019-12-03 02:57:17
After incorporating the new CoordinatorLayout in one of my layouts, I have an issue with Adview s overlapping with FloatingActionButton . <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.support.design.widget.AppBarLayout android:id="@+id/appbar" android:layout_width="match_parent" android:layout_height="wrap_content" android:theme="@style/ThemeOverlay.AppCompat.Dark

How to change the shape of Floating Action Button (FAB) on android?

て烟熏妆下的殇ゞ 提交于 2019-12-03 01:36:05
In our android app we need to create a floating action button which isn't the default circle but a square with with three rounded corners. The fab looks like in the image below: I managed to create such a form but don't know how to apply it to my fab, or if it's even possible. The xml file for the shape looks like this: <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <solid android:color="@color/red" /> <corners android:topLeftRadius="90dp" android:topRightRadius="90dp" android:bottomRightRadius="90dp"/> </shape> I tried to change the form with

hide/show fab with scale animation

做~自己de王妃 提交于 2019-12-02 23:03:34
I'm using custom floatingactionmenu. I need to implement scale animation on show/hide menu button like here floating action button behaviour Is there any way to do this ? You can use these scale animations for fab button, it gives same effect like design lib fab button. scale_up.xml <?xml version="1.0" encoding="utf-8"?> <set xmlns:android="http://schemas.android.com/apk/res/android" > <scale android:duration="100" android:fromXScale="0" android:fromYScale="0" android:pivotX="85%" android:pivotY="85%" android:toXScale="1.0" android:toYScale="1.0" /> </set> scale_down.xml <?xml version="1.0"

How to add a TextView above a FloatingActionButton in Android

放肆的年华 提交于 2019-12-02 22:22:46
I want to add a TextView above a FloatingActionButton, I use the FrameLayout as the parent layout of the TextView and FloatingActionButton, here is my sample code: <FrameLayout android:layout_width="wrap_content" android:layout_height="wrap_content"> <android.support.design.widget.FloatingActionButton xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/fab" android:layout_width="wrap_content" android:layout_height="wrap_content" app:backgroundTint="#00fff0" app:borderWidth="0dp" android:elevation="0dp" app:fabSize="normal" /> <TextView android:layout_width="wrap_content"