Giter Club home page Giter Club logo

Comments (5)

niloofaradibi avatar niloofaradibi commented on May 30, 2024

i have this issue too ... please help me anyone

as you see on the picture, the forth top are overlapping with before one

6b6d5eec-0ac8-49a7-8e9f-8d187330db82

from stickytimeline.

niloofaradibi avatar niloofaradibi commented on May 30, 2024

Describe the bug
New section background is overlapping the before item last item.

image

Maybe there is already solution for it but I could not figure it out.

My recycler view model -->

<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="wrap_content" app:cardBackgroundColor="@color/white" app:cardCornerRadius="@dimen/general_view_radius_margin">

did you solve it? please share your solution..

from stickytimeline.

KaanRF avatar KaanRF commented on May 30, 2024

Describe the bug
New section background is overlapping the before item last item.
image
Maybe there is already solution for it but I could not figure it out.
My recycler view model -->
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="wrap_content" app:cardBackgroundColor="@color/white" app:cardCornerRadius="@dimen/general_view_radius_margin">

did you solve it? please share your solution..

Sorry I forgot the share solution,

The issue has been fixed when I implement callback to my recyclver view adapter.

You can see below my sample implementation.

public class TransactionAdapter extends ListAdapter<EntityHelper, TransactionAdapter.TransactionHolder>
        implements VerticalSectionItemDecoration.SectionCallback, Filterable {
    @Override public boolean isSection(int position) {

        if (position == RecyclerView.NO_POSITION) {
            return false;
        }
        boolean result = position == 0 || getItem( position ).getTransaction().getMonthOfTimeStamp() !=
                getItem( position - 1 ).getTransaction().getMonthOfTimeStamp() /*&&
                        getItem( position ).getTransaction().getTimeStamp().getYear() !=
                                getItem( position - 1 ).getTransaction().getTimeStamp().getYear()*/;

        return result;
    }

    @Override public SectionInfo getSectionHeader(int position) {
        DateFormat dateFormat = new SimpleDateFormat( "MM/yyyy" );
        Drawable drawable = null;
        if (position == RecyclerView.NO_POSITION) {
            return null;
        }
        return new SectionInfo( dateFormat.format( getItem( position ).getTransaction().getTimeStamp() ), message,
                drawable );
    }

Seems like below;

image

from stickytimeline.

niloofaradibi avatar niloofaradibi commented on May 30, 2024

@KaanRF thanks for your answering ... i implement your solution but all items stickd together !

sample

from stickytimeline.

KaanRF avatar KaanRF commented on May 30, 2024

@KaanRF thanks for your answering ... i implement your solution but all items stickd together !

sample

Could you please also share your code ? if it is not problem for you ?

from stickytimeline.

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.