kandi background
Explore Kits

PullRefresh | IOS-style PullRefresh | iOS library

 by   7heaven Java Version: Current License: No License

 by   7heaven Java Version: Current License: No License

Download this library from

kandi X-RAY | PullRefresh Summary

PullRefresh is a Java library typically used in Mobile, iOS applications. PullRefresh has no bugs, it has no vulnerabilities and it has low support. However PullRefresh build file is not available. You can download it from GitHub.
IOS-style PullRefresh
Support
Support
Quality
Quality
Security
Security
License
License
Reuse
Reuse

kandi-support Support

  • PullRefresh has a low active ecosystem.
  • It has 61 star(s) with 38 fork(s). There are 4 watchers for this library.
  • It had no major release in the last 12 months.
  • PullRefresh has no issues reported. There are no pull requests.
  • It has a neutral sentiment in the developer community.
  • The latest version of PullRefresh is current.
PullRefresh Support
Best in #iOS
Average in #iOS
PullRefresh Support
Best in #iOS
Average in #iOS

quality kandi Quality

  • PullRefresh has 0 bugs and 0 code smells.
PullRefresh Quality
Best in #iOS
Average in #iOS
PullRefresh Quality
Best in #iOS
Average in #iOS

securitySecurity

  • PullRefresh has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
  • PullRefresh code analysis shows 0 unresolved vulnerabilities.
  • There are 0 security hotspots that need review.
PullRefresh Security
Best in #iOS
Average in #iOS
PullRefresh Security
Best in #iOS
Average in #iOS

license License

  • PullRefresh does not have a standard license declared.
  • Check the repository for any license declaration and review the terms closely.
  • Without a license, all rights are reserved, and you cannot use the library in your applications.
PullRefresh License
Best in #iOS
Average in #iOS
PullRefresh License
Best in #iOS
Average in #iOS

buildReuse

  • PullRefresh releases are not available. You will need to build from source code and install.
  • PullRefresh has no build file. You will be need to create the build yourself to build the component from source.
  • It has 599 lines of code, 48 functions and 15 files.
  • It has medium code complexity. Code complexity directly impacts maintainability of the code.
PullRefresh Reuse
Best in #iOS
Average in #iOS
PullRefresh Reuse
Best in #iOS
Average in #iOS
Top functions reviewed by kandi - BETA

kandi has reviewed PullRefresh and discovered the below as its top functions. This is intended to give you an instant insight into PullRefresh implemented functionality, and help decide if they suit your requirements.

  • Handle a touch event .
    • Draws the icon .
      • Override to handle touch events .
        • Initializes the list view .
          • Ensures the width and height of the view
            • Checks if the start button should be refreshed .
              • Measure the child view .
                • Calculate the draw shape .
                  • Sets the height of the view .

                    Get all kandi verified functions for this library.

                    Get all kandi verified functions for this library.

                    PullRefresh Key Features

                    IOS-style PullRefresh

                    Community Discussions

                    Trending Discussions on PullRefresh
                    • PullRefresh plugin of a List doesn't handle ChainedStore possibility
                    Trending Discussions on PullRefresh

                    QUESTION

                    PullRefresh plugin of a List doesn't handle ChainedStore possibility

                    Asked 2020-Jan-27 at 14:58

                    Using Ext JS 7.1 Modern, I have prepared an example to show the problem.

                    When I have remote filters on my main store, binding the dataview.List to a ChainedStore correctly handles my local filtering. However, when I also add a PullRefresh plugin to the list, I get an error during pull refresh. I see from the source code that the plugin doesn't consider the possibility that a list's store can be a ChainedStore.

                    I have tried to explain the problem with a Sencha Fiddle and also attached the code below.

                    I have temporarily solved the problem by overriding the fetchLatest and onLatestFetched methods of Ext.dataview.pullrefresh.PullRefresh plugin, to use the source store if the list's store is a ChainedStore. But I believe the source code must be updated to handle this case.

                    app.js

                    Ext.define('App.model.Test', {
                        extend: 'Ext.data.Model',
                    
                        fields: ['id', 'firstName', 'lastName']
                    });
                    
                    Ext.define('App.store.Test', {
                        extend: 'Ext.data.Store',
                        alias: 'store.teststore',
                    
                        model: 'App.model.Test'
                    });
                    
                    Ext.define('App.viewmodel.Test', {
                        extend: 'Ext.app.ViewModel',
                        alias: 'viewmodel.test',
                        data: {
                            query: ''
                        },
                        stores: {
                            test: {
                                type: 'teststore',
                                autoLoad: true,
                                proxy: {
                                    type: 'ajax',
                                    url: 'names.json',
                                    reader: {
                                        type: 'json',
                                        rootProperty: 'data'
                                    }
                                },
                    
                                remoteFilter: true,
                                filters: {
                                    property: 'id',
                                    value: 1
                                }
                            },
                            chained: {
                                type: 'chained',
                    
                                autoLoad: true,
                                source: '{test}'
                            }
                        }
                    });
                    
                    Ext.define('App.controller.TestController', {
                        extend: 'Ext.app.ViewController',
                        alias: 'controller.testcontroller',
                    
                        doSearch: function (field) {
                            var list = this.lookup('list'),
                                store = list.getStore(),
                                value = field.getValue();
                    
                            if (Ext.isEmpty(value)) {
                                store.removeFilter('firstName')
                            } else {
                                store.filter([{
                                    property: 'firstName',
                                    value: value,
                                    operator: 'like'
                                }])
                            }
                        }
                    });
                    
                    Ext.define('App.dataview.TestList', {
                        extend: 'Ext.dataview.List',
                        xtype: 'testlist',
                    
                        viewModel: {
                            type: 'test'
                        },
                    
                        plugins: [{
                            type: 'pullrefresh',
                            mergeData: false
                        }],
                    
                        emptyText: 'Name not found',
                        bind: {
                            store: '{chained}'
                        },
                        itemTpl: '<div class="contact">{id} <b>{firstName} {lastName}</b></div>'
                    });
                    
                    Ext.define('App.MainView', {
                        extend: 'Ext.Panel',
                        controller: 'testcontroller',
                        fullscreen: true,
                    
                        viewModel: {
                            type: 'test'
                        },
                    
                        items: [{
                            xtype: 'searchfield',
                            ui: 'solo',
                            placeholder: 'Search names',
                            listeners: {
                                buffer: 500,
                                change: 'doSearch'
                            },
                            bind: {
                                value: '{query}'
                            }
                        }, {
                            reference: 'list',
                            xtype: 'testlist'
                        }]
                    
                    })
                    
                    Ext.application({
                        name: 'App',
                    
                        mainView: 'App.MainView'
                    });
                    

                    names.json

                    var data = [{
                        id: 1,
                        firstName: 'Peter',
                        lastName: 'Venkman'
                    }, {
                        id: 2,
                        firstName: 'Raymond',
                        lastName: 'Stantz'
                    }, {
                        id: 3,
                        firstName: 'Egon',
                        lastName: 'Spengler'
                    }, {
                        id: 4,
                        firstName: 'Winston',
                        lastName: 'Zeddemore'
                    }]
                    
                    var results = data.filter(function(record) {
                        if (params.filter) {
                            return record.id > params.filter[0].value
                        }
                    })
                    
                    return {
                        "success": true,
                        "data": results
                    }
                    

                    App.override.dataview.pullrefresh.PullRefresh:

                    Ext.define('App.override.dataview.pullrefresh.PullRefresh', {
                      override: 'Ext.dataview.pullrefresh.PullRefresh',
                    
                      privates: {
                        fetchLatest: function() {
                          const store = this.getStore().isChainedStore ? this.getStore().getSource() : this.getStore()
                          store.fetch({
                              page: 1,
                              start: 0,
                              callback: this.onLatestFetched,
                              scope: this
                          });
                        },
                    
                        onLatestFetched: function(newRecords, operation, success) {
                          var me = this,
                              list = me.getList(),
                              store = list.getStore().isChainedStore ? list.getStore().getSource() : list.getStore(),
                              length, toInsert,
                              oldRecords, newRecord, oldRecord, i;
                    
                          if (success) {
                              if (me.getMergeData()) {
                                  oldRecords = store.getData();
                                  toInsert = [];
                                  length = newRecords.length;
                    
                                  for (i = 0; i < length; i++) {
                                      newRecord = newRecords[i];
                                      oldRecord = oldRecords.getByKey(newRecord.getId());
                    
                                      if (oldRecord) {
                                          oldRecord.set(newRecord.getData());
                                      }
                                      else {
                                          toInsert.push(newRecord);
                                      }
                                  }
                    
                                  store.insert(0, toInsert);
                              }
                              else {
                                  store.loadRecords(newRecords);
                              }
                    
                              me.setLastUpdated(new Date());
                          }
                    
                          me.setState('loaded');
                          list.fireEvent('latestfetched', me, toInsert || newRecords);
                    
                          if (me.getAutoSnapBack()) {
                              me.snapBack(true);
                          }
                        }
                      }
                    })
                    

                    Thanks in advance

                    ANSWER

                    Answered 2020-Jan-27 at 14:58

                    Since this post, instead of being a question, was a bug report with a possible solution, it has been posted to Ext JS 7.x Community Forums\Ext JS 7.x Bugs.

                    The above solution, that overwrites the plugin where source store is needed, works if anyone comes across the same issue.

                    Source https://stackoverflow.com/questions/59909787

                    Community Discussions, Code Snippets contain sources that include Stack Exchange Network

                    Vulnerabilities

                    No vulnerabilities reported

                    Install PullRefresh

                    You can download it from GitHub.
                    You can use PullRefresh like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the PullRefresh component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .

                    Support

                    For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .

                    DOWNLOAD this Library from

                    Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
                    over 430 million Knowledge Items
                    Find more libraries
                    Reuse Solution Kits and Libraries Curated by Popular Use Cases
                    Explore Kits

                    Save this library and start creating your kit

                    Explore Related Topics

                    Share this Page

                    share link
                    Consider Popular iOS Libraries
                    Try Top Libraries by 7heaven
                    Compare iOS Libraries with Highest Support
                    Compare iOS Libraries with Highest Quality
                    Compare iOS Libraries with Highest Security
                    Compare iOS Libraries with Permissive License
                    Compare iOS Libraries with Highest Reuse
                    Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
                    over 430 million Knowledge Items
                    Find more libraries
                    Reuse Solution Kits and Libraries Curated by Popular Use Cases
                    Explore Kits

                    Save this library and start creating your kit

                    • © 2022 Open Weaver Inc.