Skip to content
This repository has been archived by the owner on Jun 24, 2021. It is now read-only.

Not working on Android #28

Closed
d3mac123 opened this issue Jun 26, 2017 · 3 comments
Closed

Not working on Android #28

d3mac123 opened this issue Jun 26, 2017 · 3 comments

Comments

@d3mac123
Copy link

I am running the plugin fine on iOS, but on Android I just get this while trying to pull down:
screenshot_20170626-113528

This is my XML code:

<Page xmlns="http://schemas.nativescript.org/tns.xsd"  xmlns:sd="nativescript-telerik-ui/sidedrawer" xmlns:PullRefresh="nativescript-pulltorefresh" class="page" actionBarHidden="true" xmlns:map="nativescript-mapbox" loaded="pageLoaded" xmlns:x="nativescript-statusbar" backgroundSpanUnderStatusBar="true" backgroundColor="#182126">
    <sd:RadSideDrawer id="sideDrawer" drawerLocation="left">
        <!-- side drawer content -->
        <sd:RadSideDrawer.drawerContent>
            <GridLayout rows="*" class="sidedrawer-left">

                <GridLayout rows="*" class="sidedrawer-content">
                    <PullRefresh:PullToRefresh refresh="refreshList">
                        <list-view id="pilotList" items="{{ activeList }}" class="list-pilots" itemTap="listViewItemTap">
                            <list-view.itemTemplate  class="list-pilots">
                                <GridLayout columns="*,*2,auto"  class="list-pilots">
                                    <Image src="{{ listPhoto }}" col="0" class="listPhoto" />
                                    <Image src="{{ listIcon }}" col="0" class="listIcon" />
                                    <Label text="{{ listNick }}" col="1"  class="listNick" />
                                    <Label text="{{ listDistance + listMiles + distHeading}}" col="2" class="listDistance" />
                                    <Label text="{{ listAltitude }}" col="1"  class="listAltitude" />
                                    <Label text="{{ listHeading }}" col="1"  class="listHeading" />
                                    <Label text="{{ listSpeed }}" col="2"  class="listSpeed" />                              
                                </GridLayout>
                            </list-view.itemTemplate>
                        </list-view>
                    </PullRefresh:PullToRefresh>
                </GridLayout>
            </GridLayout>
        </sd:RadSideDrawer.drawerContent>

and the JS code for the pulling control:

function refreshList(args) {
    console.log("Pulling to refresh...")
    var pullRefresh = args.object;
    cleanView()
        // ONLY USING A TIMEOUT TO SIMULATE/SHOW OFF THE REFRESHING
        setTimeout(function () {
            pullRefresh.refreshing = false;
        }, 1000);
}
exports.refreshList = refreshList;

The CleanView function only sorts the table for the list view.

Any ideas?

@bradmartin
Copy link
Collaborator

Does the pull-to-refresh never stop? Is that the issue you see?

@d3mac123
Copy link
Author

Besides showing up the icon (as you can see in the picture), nothing else happens. Not sure if it's not refreshing at all or never stopping (the function I'm calling just order the list)

@bradmartin
Copy link
Collaborator

Just ran the demo and confirmed it works 👍 - might want to start by comparing the demo sample with yours and see what's different. If all looks good then I'd guess it's the NS UI stuff causing something to go wrong.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants