Comments (5)
i have this issue too ... please help me anyone
as you see on the picture, the forth top are overlapping with before one
from stickytimeline.
Describe the bug
New section background is overlapping the before item last item.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.
Describe the bug
New section background is overlapping the before item last item.
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;
from stickytimeline.
@KaanRF thanks for your answering ... i implement your solution but all items stickd together !
from stickytimeline.
@KaanRF thanks for your answering ... i implement your solution but all items stickd together !
Could you please also share your code ? if it is not problem for you ?
from stickytimeline.
Related Issues (20)
- FEATURE REQUEST: Customize drawable for dots in timeline view HOT 3
- Failed linking file resources. HOT 6
- WHEN I INTEGRATE IN FRAGMENT HOT 3
- Suggestion HOT 2
- FEATURE CHECK - Pagination / Infinite Scroll HOT 2
- change DotDrawable for each row of items HOT 2
- flicker header view HOT 4
- Section Background Bug HOT 2
- when the horizontal rotation is not full HOT 2
- how to change sectionTitleTextColor HOT 3
- i cant use this library for java project without migrate to androidx HOT 2
- some cards are shown not complete HOT 12
- RTL Support HOT 1
- The dots are missing in horizontal timeline . HOT 1
- Item positions are shifted with each update HOT 1
- Padding between section title and and subtitle and text styling options for section title and subtitle
- Section的高度不能修改吗?现在的有点高
- Last item of any section is behind of section header
- duplication in recycler view HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stickytimeline.