Coder Social home page Coder Social logo

Comments (8)

bradmartin avatar bradmartin commented on July 21, 2024

What's the full markup?

On Thu, Nov 3, 2016, 8:34 AM bm-software [email protected] wrote:

I'm testing my app, built with Typescript and Angular 2, on ios emulator
and while on Android everything works fine, on iOS the FAB dowsn't show up.
The code is the same for both platforms:

<Fab row="1" class="fab-button"
(tap)="showAddContactModal()"
icon="res://ic_add_white_48dp"
rippleColor="#f1f1f1"
verticalAlignment="bottom"
horizontalAlignment="right"
hideOnSwipeOfView="contactsList">

What is the problem?


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#37,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFulhFlXc_DvxaGY-izXrxEQOiylRlJjks5q6eL4gaJpZM4KoXFB
.

from nativescript-floatingactionbutton.

michelebombardi avatar michelebombardi commented on July 21, 2024

@bradmartin Sorry, here is the full markup:

<GridLayout rows="auto, *">
    <StackLayout row="1">
        <location></location>

        <CardView shadowColor="#949494" elevation="10" margin="10">
            <StackLayout orientation="vertical">
                <Label text="Numeri Personali" verticalAlignment="center" horizontalAlignment="left" textWrap="true" class="card-header"></Label>
                <StackLayout class="hr-light"></StackLayout>

                <GridLayout rows="*" *ngIf="contacts.length === 0">
                    <Label row="0" text="Nessun contatto inserito." verticalAlignment="center" horizontalAlignment="center" 
                        textWrap="true" class="h3 font-italic">
                    </Label>
                </GridLayout>

                <RadListView id="contactsList" [items]='contacts' selectionBehavior="None" *ngIf="contacts.length > 0"
                    (itemTap)="onItemTap($event)"
                    (itemHold)="onItemHold($event)"
                    itemSwipe="false"
                    pullToRefresh="true"
                    (pullToRefreshInitiated)="onPullToRefreshInitiated($event)">
                    <ListViewLinearLayout tkListViewLayout scrollDirection="Vertical" 
                        itemInsertAnimation="Default" itemDeleteAnimation="Default">
                    </ListViewLinearLayout>

                    <template tkListItemTemplate let-contact='item' >
                        <StackLayout>
                            <GridLayout columns="80, *">
                                <Image col="0" [src]="contact.icon" stretch="aspectFill" verticalAlignment="center" horizontalAlignment="center" class="contact-icon"></Image>
                                <StackLayout col="1" verticalAlignment="center" horizontalAlignment="left" color="black" margin="5 0">
                                    <Label [text]="contact.name" verticalAlignment="center" horizontalAlignment="left" textWrap="true" id="personalContactName" class="h2"></Label>
                                    <Label [text]="contact.phone" verticalAlignment="center" horizontalAlignment="left" class="h3"></Label> 
                                    <Label [text]="contact.notes" verticalAlignment="center" horizontalAlignment="left" textWrap="true" class="h3 font-italic"></Label>
                                </StackLayout>
                            </GridLayout>
                            <StackLayout class="hr-light"></StackLayout>
                        </StackLayout>
                    </template>

                    <GridLayout *tkListItemSwipeTemplate columns="auto, *, auto" class="listItemSwipeGridLayout">
                        <StackLayout id="mark-view" class="markViewStackLayout" col="0" (tap)="onLeftSwipeClick($event)">
                            <Label text="mark" verticalAlignment="center" horizontalAlignment="center"></Label>
                        </StackLayout>
                        <StackLayout id="delete-view" class="deleteViewStackLayout" col="2" (tap)="onRightSwipeClick($event)">
                            <Label text="delete" verticalAlignment="center" horizontalAlignment="center"></Label>
                        </StackLayout>
                    </GridLayout>
                </RadListView>
            </StackLayout>
        </CardView>
    </StackLayout>

    <Fab row="1" class="fab-button"
        (tap)="showAddContactModal()"
        icon="res://ic_add_white_48dp"
        rippleColor="#f1f1f1"
        verticalAlignment="bottom"
        horizontalAlignment="right"
        hideOnSwipeOfView="contactsList">
    </Fab>
</GridLayout>

from nativescript-floatingactionbutton.

bradmartin avatar bradmartin commented on July 21, 2024

Just dawned on me. On iOS height and width are required, try setting those
values and it should render.

On Thu, Nov 3, 2016, 9:50 AM bm-software [email protected] wrote:

@bradmartin https://github.com/bradmartin Sorry, here is the full
markup:

    <CardView shadowColor="#949494" elevation="10" margin="10">
        <StackLayout orientation="vertical">
            <Label text="Numeri Personali" verticalAlignment="center" horizontalAlignment="left" textWrap="true" class="card-header"></Label>
            <StackLayout class="hr-light"></StackLayout>

            <GridLayout rows="*" *ngIf="contacts.length === 0">
                <Label row="0" text="Nessun contatto inserito." verticalAlignment="center" horizontalAlignment="center"
                    textWrap="true" class="h3 font-italic">
                </Label>
            </GridLayout>

            <RadListView id="contactsList" [items]='contacts' selectionBehavior="None" *ngIf="contacts.length > 0"
                (itemTap)="onItemTap($event)"
                (itemHold)="onItemHold($event)"
                itemSwipe="false"
                pullToRefresh="true"
                (pullToRefreshInitiated)="onPullToRefreshInitiated($event)">
                <ListViewLinearLayout tkListViewLayout scrollDirection="Vertical"
                    itemInsertAnimation="Default" itemDeleteAnimation="Default">
                </ListViewLinearLayout>

                <template tkListItemTemplate let-contact='item' >
                    <StackLayout>
                        <GridLayout columns="80, *">
                            <Image col="0" [src]="contact.icon" stretch="aspectFill" verticalAlignment="center" horizontalAlignment="center" class="contact-icon"></Image>
                            <StackLayout col="1" verticalAlignment="center" horizontalAlignment="left" color="black" margin="5 0">
                                <Label [text]="contact.name" verticalAlignment="center" horizontalAlignment="left" textWrap="true" id="personalContactName" class="h2"></Label>
                                <Label [text]="contact.phone" verticalAlignment="center" horizontalAlignment="left" class="h3"></Label>
                                <Label [text]="contact.notes" verticalAlignment="center" horizontalAlignment="left" textWrap="true" class="h3 font-italic"></Label>
                            </StackLayout>
                        </GridLayout>
                        <StackLayout class="hr-light"></StackLayout>
                    </StackLayout>
                </template>

                <GridLayout *tkListItemSwipeTemplate columns="auto, *, auto" class="listItemSwipeGridLayout">
                    <StackLayout id="mark-view" class="markViewStackLayout" col="0" (tap)="onLeftSwipeClick($event)">
                        <Label text="mark" verticalAlignment="center" horizontalAlignment="center"></Label>
                    </StackLayout>
                    <StackLayout id="delete-view" class="deleteViewStackLayout" col="2" (tap)="onRightSwipeClick($event)">
                        <Label text="delete" verticalAlignment="center" horizontalAlignment="center"></Label>
                    </StackLayout>
                </GridLayout>
            </RadListView>
        </StackLayout>
    </CardView>
</StackLayout>

<Fab row="1" class="fab-button"
    (tap)="showAddContactModal()"
    icon="res://ic_add_white_48dp"
    rippleColor="#f1f1f1"
    verticalAlignment="bottom"
    horizontalAlignment="right"
    hideOnSwipeOfView="contactsList">
</Fab>


You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub
#37 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFulhNjRs50IcbrPfOl9K0LOeJjE7DQjks5q6fSSgaJpZM4KoXFB
.

from nativescript-floatingactionbutton.

michelebombardi avatar michelebombardi commented on July 21, 2024

@bradmartin Yes, now it render, but the icon is not shown. I've included it in AppResource ios folder with three dimensions;

  • ic_add_white_48dp: 16x16
  • ic_add_white_48dp@2x: 32x32
  • ic_add_white_48dp@3x: 48x48

Is that ok? Why I can't see the add icon?

from nativescript-floatingactionbutton.

sitefinitysteve avatar sitefinitysteve commented on July 21, 2024

@bm-software Can you add the icon to the actionbar or something to see if it shows up there?

from nativescript-floatingactionbutton.

michelebombardi avatar michelebombardi commented on July 21, 2024

@sitefinitysteve Found the issue, it has a different name. Sorry :)

from nativescript-floatingactionbutton.

bradmartin avatar bradmartin commented on July 21, 2024

All good @bm-software ?

from nativescript-floatingactionbutton.

michelebombardi avatar michelebombardi commented on July 21, 2024

@bradmartin Yes, now it works fine :)

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.