Security News
The Unpaid Backbone of Open Source: Solo Maintainers Face Increasing Security Demands
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
nativescript-floatingactionbutton-enduco
Advanced tools
A NativeScript plugin for Material Design Floating Action Button.
ns plugin add @nstudio/nativescript-floatingactionbutton
tns plugin add @nstudio/nativescript-floatingactionbutton@2.1.0
<Page xmlns="http://schemas.nativescript.org/tns.xsd" loaded="pageLoaded"
xmlns:FAB="@nstudio/nativescript-floatingactionbutton">
<ActionBar title="Native FAB" />
<grid-layout rows="auto, *">
<list-view row="1" items="{{ users }}">
<list-view.itemTemplate>
<label text="{{ name }}" />
</list-view.itemTemplate>
</list-view>
<FAB:fab tap="fabTap"
row="1"
icon="'~/assets/ic_add_white.png'"
rippleColor="#f1f1f1"
class="fab-button" />
</grid-layout>
</Page>
import { registerElement } from 'nativescript-angular/element-registry';
registerElement(
'Fab',
() => require('@nstudio/nativescript-floatingactionbutton').Fab
);
<StackLayout>
<FAB (tap)="fabTap()" icon="'~/assets/ic_add_white.png'" rippleColor="#f1f1f1" class="fab-button"></FAB>
</StackLayout>
import Vue from 'nativescript-vue';
Vue.registerElement(
'Fab',
() => require('@nstudio/nativescript-floatingactionbutton').Fab
);
<template>
<page>
<grid-layout rows="auto, *">
<list-view row="1" items="{{ users }}">
<list-view.itemTemplate>
<label text="{{ name }}" textWrap="true" />
</list-view.itemTemplate>
</list-view>
<fab
@tap="fabTap"
row="1"
icon="res://ic_add_white"
rippleColor="#f1f1f1"
class="fab-button"
></fab>
</grid-layout>
</page>
</template>
Recommended CSS styles.
.fab-button {
height: 70;
width: 70; /// this is required on iOS - Android does not require width so you might need to adjust styles
margin: 15;
background-color: #ff4081;
horizontal-align: right;
vertical-align: bottom;
}
First you need to setup icon fonts as described in NativeScript documentation.
After this, you can use icon fonts on FAB by specifiying the unicode as text and add the fas
/far
class:
<FAB:fab text="" class="fab-button fas" />
Property | Android | iOS | Description | Note |
---|---|---|---|---|
backgroundColor | X | X | Sets the background color of the button | |
icon | X | X | Supports the same image source options that NativeScript images support | Required on android |
text | X | X | Allows to use text instead of image | Can be styled with font-* and color CSS properties |
rippleColor | X | Ripple color on lollipop devices, it will fill the FAB on pre-lollipop devices | None | |
hideOnSwipeOfView | X | X | Directs the fab to animate itself in and out on scroll | Pass it the name of the view to monitor for a scroll event example: hideOnSwipeOfView="userListView" |
hideAnimationDuration | X | X | How many milliseconds it takes for the button to hide. | Default if not set: 300ms |
swipeAnimation | X | X | slideDown, slideUp, slideLeft, slideRight, scale | Default is slideDown |
androidScaleType | X | center, centerCrop, centerInside, fitCenter, fitEnd, fitStart, fitXY, matrix for more details see Android-Docs | Default is center |
Brad Martin | Steve McNiven-Scott | Nathanael Anderson | Gabriel Marinho |
---|
Alexander Vakrilov | Lázaro Danillo Menezes | Jofferson Ramirez Tiquez | Ravi |
---|
Samuel Ikechukwu | Stanimira Vlaeva |
---|
FAQs
A NativeScript plugin for Material Design Floating Action Button.
The npm package nativescript-floatingactionbutton-enduco receives a total of 0 weekly downloads. As such, nativescript-floatingactionbutton-enduco popularity was classified as not popular.
We found that nativescript-floatingactionbutton-enduco demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
Security News
License exceptions modify the terms of open source licenses, impacting how software can be used, modified, and distributed. Developers should be aware of the legal implications of these exceptions.
Security News
A developer is accusing Tencent of violating the GPL by modifying a Python utility and changing its license to BSD, highlighting the importance of copyleft compliance.