kandi background
Explore Kits

TwinklingRefreshLayout | RefreshLayout that support for OverScroll and better than iOS | iOS library

 by   lcodecorex Java Version: Current License: Apache-2.0

 by   lcodecorex Java Version: Current License: Apache-2.0

Download this library from

kandi X-RAY | TwinklingRefreshLayout Summary

TwinklingRefreshLayout is a Java library typically used in Mobile, iOS applications. TwinklingRefreshLayout has no vulnerabilities, it has build file available, it has a Permissive License and it has medium support. However TwinklingRefreshLayout has 5 bugs. You can download it from GitHub.
TwinklingRefreshLayout extended the thoughts of SwipeRefreshLayout,using a ViewGroup to include a list of Views, to maintain its low coupling and high versatility. Follows are its main features.
Support
Support
Quality
Quality
Security
Security
License
License
Reuse
Reuse

kandi-support Support

  • TwinklingRefreshLayout has a medium active ecosystem.
  • It has 3874 star(s) with 671 fork(s). There are 96 watchers for this library.
  • It had no major release in the last 12 months.
  • There are 104 open issues and 85 have been closed. On average issues are closed in 38 days. There are 4 open pull requests and 0 closed requests.
  • It has a neutral sentiment in the developer community.
  • The latest version of TwinklingRefreshLayout is current.
This Library - Support
Best in #iOS
Average in #iOS
This Library - Support
Best in #iOS
Average in #iOS

quality kandi Quality

  • TwinklingRefreshLayout has 5 bugs (0 blocker, 0 critical, 1 major, 4 minor) and 231 code smells.
This Library - Quality
Best in #iOS
Average in #iOS
This Library - Quality
Best in #iOS
Average in #iOS

securitySecurity

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

license License

  • TwinklingRefreshLayout is licensed under the Apache-2.0 License. This license is Permissive.
  • Permissive licenses have the least restrictions, and you can use them in most projects.
This Library - License
Best in #iOS
Average in #iOS
This Library - License
Best in #iOS
Average in #iOS

buildReuse

  • TwinklingRefreshLayout releases are not available. You will need to build from source code and install.
  • Build file is available. You can build the component from source.
  • Installation instructions are not available. Examples and code snippets are available.
  • TwinklingRefreshLayout saves you 3230 person hours of effort in developing the same functionality from scratch.
  • It has 6941 lines of code, 617 functions and 96 files.
  • It has medium code complexity. Code complexity directly impacts maintainability of the code.
This Library - Reuse
Best in #iOS
Average in #iOS
This Library - Reuse
Best in #iOS
Average in #iOS
Top functions reviewed by kandi - BETA

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

  • Detects the velocity of a motion event .
  • Setup the animations for a single ring .
  • Sets up the list view .
  • Setup the RecyclerView .
  • Setup the grid view .
  • check if a RecyclerView is scrollable
  • Animate bottom view
  • Initializes the dialog .
  • Setup bitmap .
  • On click event .

TwinklingRefreshLayout Key Features

New overscroll animations, running smoothly, much better than iOS.

Support RecyclerView, ScrollView, AbsListView, WebView and so on.

Support to load more.

Default support cross-border rebound.

You can open a pure bounds rebound mode.

Lots of methods in the class OnRefreshListener.

It provides an interface to the callback during the sliding coefficient. Personalized offer good support.

NestedScroll,CoordinatorLayout

Usage

copy iconCopydownload iconDownload
compile 'com.lcodecorex:tkrefreshlayout:1.0.7'

3.Personalize the Header and Footer.

copy iconCopydownload iconDownload
public interface IHeaderView {
    View getView();

    void onPullingDown(float fraction,float maxHeadHeight,float headHeight);

    void onPullReleasing(float fraction,float maxHeadHeight,float headHeight);

    void startAnim(float maxHeadHeight,float headHeight);

    void reset();
}

NestedScroll

copy iconCopydownload iconDownload
<?xml version="1.0" encoding="utf-8"?>
<com.lcodecore.tkrefreshlayout.TwinklingRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/refresh"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <android.support.design.widget.CoordinatorLayout
        android:id="@+id/coord_container"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:addStatesFromChildren="true"
        android:fitsSystemWindows="true">

        <android.support.design.widget.AppBarLayout
            android:id="@+id/appbar_layout"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:clipChildren="false">

            <!--...-->

        </android.support.design.widget.AppBarLayout>

        <android.support.v7.widget.RecyclerView
            android:id="@+id/recyclerview"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            app:layout_behavior="@string/appbar_scrolling_view_behavior" />

    </android.support.design.widget.CoordinatorLayout>
</com.lcodecore.tkrefreshlayout.TwinklingRefreshLayout>

License

copy iconCopydownload iconDownload
Copyright 2016 lcodecorex

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

android ViewPager height changed after RecyclerView data increased in Fragment in it

copy iconCopydownload iconDownload
yourViewPager.getAdapter().notifyDataSetChanged();
    private void setTabLayoutAndViewPager() {
        mTabPagerAdapter = new GroupPurchaseHomeTabPagerAdapter(getSupportFragmentManager(), mFragments, mTabs);
        mTabPagerAdapter.notifyDataSetChanged();
        vpHomeGroupPurchase.setAdapter(mTabPagerAdapter);
        mCurrentItem = vpHomeGroupPurchase.getCurrentItem();
        tabLayout.setupWithViewPager(vpHomeGroupPurchase);
    }
     private void setTabLayoutAndViewPager() {
                    mTabPagerAdapter = new GroupPurchaseHomeTabPagerAdapter(getSupportFragmentManager(), mFragments, mTabs);
                    if (vpHomeGroupPurchase.getAdapter() != null) {
                        vpHomeGroupPurchase.getAdapter().notifyDataSetChanged();
                    }
                    vpHomeGroupPurchase.setAdapter(mTabPagerAdapter);
                    mCurrentItem = vpHomeGroupPurchase.getCurrentItem();
                    tabLayout.setupWithViewPager(vpHomeGroupPurchase);
                }
-----------------------
yourViewPager.getAdapter().notifyDataSetChanged();
    private void setTabLayoutAndViewPager() {
        mTabPagerAdapter = new GroupPurchaseHomeTabPagerAdapter(getSupportFragmentManager(), mFragments, mTabs);
        mTabPagerAdapter.notifyDataSetChanged();
        vpHomeGroupPurchase.setAdapter(mTabPagerAdapter);
        mCurrentItem = vpHomeGroupPurchase.getCurrentItem();
        tabLayout.setupWithViewPager(vpHomeGroupPurchase);
    }
     private void setTabLayoutAndViewPager() {
                    mTabPagerAdapter = new GroupPurchaseHomeTabPagerAdapter(getSupportFragmentManager(), mFragments, mTabs);
                    if (vpHomeGroupPurchase.getAdapter() != null) {
                        vpHomeGroupPurchase.getAdapter().notifyDataSetChanged();
                    }
                    vpHomeGroupPurchase.setAdapter(mTabPagerAdapter);
                    mCurrentItem = vpHomeGroupPurchase.getCurrentItem();
                    tabLayout.setupWithViewPager(vpHomeGroupPurchase);
                }
-----------------------
yourViewPager.getAdapter().notifyDataSetChanged();
    private void setTabLayoutAndViewPager() {
        mTabPagerAdapter = new GroupPurchaseHomeTabPagerAdapter(getSupportFragmentManager(), mFragments, mTabs);
        mTabPagerAdapter.notifyDataSetChanged();
        vpHomeGroupPurchase.setAdapter(mTabPagerAdapter);
        mCurrentItem = vpHomeGroupPurchase.getCurrentItem();
        tabLayout.setupWithViewPager(vpHomeGroupPurchase);
    }
     private void setTabLayoutAndViewPager() {
                    mTabPagerAdapter = new GroupPurchaseHomeTabPagerAdapter(getSupportFragmentManager(), mFragments, mTabs);
                    if (vpHomeGroupPurchase.getAdapter() != null) {
                        vpHomeGroupPurchase.getAdapter().notifyDataSetChanged();
                    }
                    vpHomeGroupPurchase.setAdapter(mTabPagerAdapter);
                    mCurrentItem = vpHomeGroupPurchase.getCurrentItem();
                    tabLayout.setupWithViewPager(vpHomeGroupPurchase);
                }

Community Discussions

Trending Discussions on TwinklingRefreshLayout
  • android ViewPager height changed after RecyclerView data increased in Fragment in it
Trending Discussions on TwinklingRefreshLayout

QUESTION

android ViewPager height changed after RecyclerView data increased in Fragment in it

Asked 2017-Feb-26 at 09:48

I use a RecyclerView within fragment in a ViewPager, but something wrong after data of RecyclerView increased, the ViewPager moved up.
Finally,I solved it by using a ScrollView outside, and set set android:fillViewport="true" at ScrollView.

enter image description here

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/activity_group_purchase"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    tools:context="sizu.mingteng.com.yimeixuan.main.home.others.grouppurchase.activity.GroupPurchaseActivity">
    <!--工具栏-->
    <include layout="@layout/toolbar_group_purchase" />

    <com.lcodecore.tkrefreshlayout.TwinklingRefreshLayout
        android:id="@+id/refresh_layout_home_group_purchase"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:tr_enable_loadmore="false"
        app:tr_head_height="120dp"
        app:tr_overscroll_bottom_show="false"
        app:tr_overscroll_top_show="false"
        app:tr_wave_height="120dp">


        <android.support.design.widget.CoordinatorLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent">

            <android.support.design.widget.AppBarLayout
                android:id="@+id/appbar_group_purchase"
                android:layout_width="match_parent"
                android:layout_height="wrap_content">
                <!--广告栏-->
                <android.support.design.widget.CollapsingToolbarLayout
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    app:layout_scrollFlags="scroll">

                    <com.youth.banner.Banner
                        android:id="@+id/banner_home_group_purchase"
                        android:layout_width="match_parent"
                        android:layout_height="@dimen/banner_height" />
                </android.support.design.widget.CollapsingToolbarLayout>
                <!--类别Tab-->
                <include layout="@layout/layout_tab_more" />
            </android.support.design.widget.AppBarLayout>

            <!--分类视图-->
            <android.support.v4.view.ViewPager
                android:id="@+id/vp_home_group_purchase"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:background="@color/white"
                app:layout_behavior="@string/appbar_scrolling_view_behavior" />

        </android.support.design.widget.CoordinatorLayout>


    </com.lcodecore.tkrefreshlayout.TwinklingRefreshLayout>

</LinearLayout>

and here I initialize my ViewPager

private void setTabLayoutAndViewPager() {
    mTabPagerAdapter = new GroupPurchaseHomeTabPagerAdapter(getSupportFragmentManager(), mFragments, mTabs);
    vpHomeGroupPurchase.setAdapter(mTabPagerAdapter);
    mCurrentItem = vpHomeGroupPurchase.getCurrentItem();
    tabLayout.setupWithViewPager(vpHomeGroupPurchase);
}

ANSWER

Answered 2017-Feb-23 at 15:34

Try call this method:

yourViewPager.getAdapter().notifyDataSetChanged();
    private void setTabLayoutAndViewPager() {
        mTabPagerAdapter = new GroupPurchaseHomeTabPagerAdapter(getSupportFragmentManager(), mFragments, mTabs);
        mTabPagerAdapter.notifyDataSetChanged();
        vpHomeGroupPurchase.setAdapter(mTabPagerAdapter);
        mCurrentItem = vpHomeGroupPurchase.getCurrentItem();
        tabLayout.setupWithViewPager(vpHomeGroupPurchase);
    }

Try this. If it will now solve issue, show how you add data to your adapter.

Ooops. Apply this.

     private void setTabLayoutAndViewPager() {
                    mTabPagerAdapter = new GroupPurchaseHomeTabPagerAdapter(getSupportFragmentManager(), mFragments, mTabs);
                    if (vpHomeGroupPurchase.getAdapter() != null) {
                        vpHomeGroupPurchase.getAdapter().notifyDataSetChanged();
                    }
                    vpHomeGroupPurchase.setAdapter(mTabPagerAdapter);
                    mCurrentItem = vpHomeGroupPurchase.getCurrentItem();
                    tabLayout.setupWithViewPager(vpHomeGroupPurchase);
                }

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

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

Vulnerabilities

No vulnerabilities reported

Install TwinklingRefreshLayout

You can download it from GitHub.
You can use TwinklingRefreshLayout 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 TwinklingRefreshLayout 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

Save this library and start creating your kit

Explore Related Topics

Share this Page

share link
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

Save this library and start creating your kit

  • © 2022 Open Weaver Inc.