Coder Social home page Coder Social logo

Comments (12)

bradmartin avatar bradmartin commented on July 21, 2024

from nativescript-floatingactionbutton.

dlucidone avatar dlucidone commented on July 21, 2024

Is this has something to do with webpack -
http://docs.nativescript.org/angular/tooling/bundling-with-webpack#dynamic-imports
I've not done this sorta import for FAB. but yeah I've installed my apk on devices list below -

Motorola MotoX - 4.2.2 API 17
Motorola MotoX - 4.3 API 18
Samsung Galaxy Note 2 - 4.2.2 API 17
Google Nexus 4 - 4.4.4 API 19

from nativescript-floatingactionbutton.

dlucidone avatar dlucidone commented on July 21, 2024

Any Solution to this!

from nativescript-floatingactionbutton.

bradmartin avatar bradmartin commented on July 21, 2024

@triniwiz don't you use the FAB and webpack your apps?

from nativescript-floatingactionbutton.

dlucidone avatar dlucidone commented on July 21, 2024

Lib is working completely fine and i also use webpack to bundle my app. but the fab is juss missing from devices with API< 21

from nativescript-floatingactionbutton.

triniwiz avatar triniwiz commented on July 21, 2024

Never used FAB

from nativescript-floatingactionbutton.

dlucidone avatar dlucidone commented on July 21, 2024

@bradmartin Any Updates on this?

from nativescript-floatingactionbutton.

bradmartin avatar bradmartin commented on July 21, 2024

from nativescript-floatingactionbutton.

dlucidone avatar dlucidone commented on July 21, 2024

Here is the code i'm using

    <ActionBar title="Packages" style="background-color:#ED2831; color:white">
     <ActionItem (tap)="fabTap()">

    <Label class="actionItemLabel" text="Add" color="white" ></Label>
    </ActionItem>
     </ActionBar>
      <StackLayout>
      <SearchBar class="searchBar" textFieldHintColor="#DEDEDE"  (clear)="onClear()" (loaded)="sBLoaded($event)"  id="searchP" #sb hint="Search by  Name" [(ngModel)]="searchPhrase"(ngModelChange)="onChangeP($event)"></SearchBar>
<Label [text]='total' textWrap="true" class="m-l-10"style="margin-top:5px"></Label>
<GridLayout style="margin-top:5px">
    <FAB (tap)="fabTap()" row="0" icon="res://itisfab" rippleColor="#f1f1f1" class="fab-button" hideOnSwipeOfView="list-style" swipeAnimation="slideDown"></FAB>
     <PullToRefresh (refresh)="refreshList($event)">
    <ListView [items]="pList" class="small-spacing" (loadMoreItems)="listViewLoadMoreItems()">
        <template let-item="item">
            <GridLayout columns=" *,*,*,*" rows="*, *" (tap)="viewP(item.id)" style="padding: 10;">            
                </GridLayout>
        </template>
    </ListView>
     </PullToRefresh>
</GridLayout>

from nativescript-floatingactionbutton.

bradmartin avatar bradmartin commented on July 21, 2024

I think your issue is a layout issue - the best approach to using a FAB and simplifying its position to be overlayed on a listview (or any other view) is to use a GridLayout as the parent of your layout. Then set the ListView and Fab on the same row. Then you need to style the FAB with alignment styles. The README and demo have good sample code for this :)

from nativescript-floatingactionbutton.

davorpeic avatar davorpeic commented on July 21, 2024

Hey @dlucidone
did you solved webpack issue? I'm expeciecing similar issue only when try to build with webpack. My template is complex, so I simplified it as much as I can and normal build shows it, but build with webpack it doesn't (android 6). Here is my simplified template. Using latest Angular 4 {NS}

<ActionBar [title]="detail.parcela" class="action-bar">
    <NavigationButton icon="res://ic_arrow_back_white_24dp" (tap)="goBack()" *ngIf="showDetail"></NavigationButton>
    <ActionItem (tap)="showInfo()" android.position="actionBar" *ngIf="!showDetail" class="detail-bar-icons" verticalAlignment="center">
        <Label [text]="'mdi-face' | fonticon" class="mdi btn-close" [class.infoOpen]="info == true" verticalAlignment="center"></Label>
    </ActionItem>
    <ActionItem (tap)="onTap($event)" android.position="actionBar" *ngIf="!showDetail" class="detail-bar-icons">
        <Label [text]="'mdi-clear' | fonticon" class="mdi btn-close"></Label>
    </ActionItem>
</ActionBar>

<GridLayout rows="*" columns="*">

   

    <StackLayout row="0" verticalAlignment="bottom" col="0" >
        <FAB icon="res://ic_keyboard_arrow_right_white_24dp" rippleColor="#f1f1f1" (tap)="onTap($event)" class="fab-button">
        </FAB>
    </StackLayout>

</GridLayout>

not sure what could be the issue, can't see any errors.

ps. I tried running demo but it gives render error so couldn't test it

from nativescript-floatingactionbutton.

davorpeic avatar davorpeic commented on July 21, 2024

Ok, solved my issue by adding
registerElement('Fab', () => require('nativescript-floatingactionbutton').Fab);
to main.aot.ts :)

from nativescript-floatingactionbutton.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.