sangcomz / stickytimeline Goto Github PK
View Code? Open in Web Editor NEW:book:StickyTimeLine is timeline view for android.
License: Apache License 2.0
:book:StickyTimeLine is timeline view for android.
License: Apache License 2.0
when I use glide in adapter to set the images for each item , my items in recycler will be duplicated.
I have no idea , when I remove Glide or Picasso it is ok.
this is my code
public class NotifyAdapter extends RecyclerView.Adapter<NotifyAdapter.ViewHolder> {
private LayoutInflater layoutInflater;
private List<NotifyModel> notifyList;
private Context context;
@LayoutRes
private int rowLayout;
public NotifyAdapter(LayoutInflater layoutInflater, List<NotifyModel> notifyList, int rowLayout , Context context) {
this.layoutInflater = layoutInflater;
this.notifyList = notifyList;
this.rowLayout = rowLayout;
this.context = context;
}
@Override
public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View v = layoutInflater.inflate(rowLayout, parent, false);
return new ViewHolder(v);
}
@Override
public void onBindViewHolder(ViewHolder holder, int position) {
NotifyModel notifyModel = notifyList.get(position);
holder.fullName.setText(notifyModel.getMessage());
Picasso.get().load(notifyModel.getImgurl()).into(holder.imageView);
Log.d("Running", "onBindViewHolder: " + position);
}
@Override
public int getItemCount() {
return notifyList.size();
}
public static class ViewHolder extends RecyclerView.ViewHolder {
public TextView fullName;
public ImageView imageView;
public ViewHolder(View view) {
super(view);
fullName = view.findViewById(R.id.name_textView);
imageView = view.findViewById(R.id.image_view);
}
}
}
Thanks!
Items width match content and side by side, continuing in next row....
I have implemented your library in my project which is written in java language. In my project there is need to call data from web service so 1st time when I call web service at that time data properly shown but when I call web service 2nd time for more data at that time data is displayed in the list with extra space in between the items, extra space in between items and headers as well as width of the item is also changed which is shown in below picture.
Can you help me to solve this problem
Thanking you in advance
Properly shows data when 1st time I call data from web service
Extra spaces is added in list when 2nd time I call data from web service
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">
for how to fix it when rotating it is full horizontal.
can you tell me how to change sectionTitleTextColor?
I am implementing this library in my app, the only problem come when i try to change the color in the xml.
I get the error " failed linking file resources. "
<xyz.sangcomz.stickytimelineview.TimeLineRecyclerView
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:sectionCircleColor="#565656"
/>
Thera any way to change the color programatically? or some import ?
Thanks
Anyone tried this with Pagination List / Infinite Scroll? If not, what would be the best approach to implement the same?
Error:error: attribute 'com.bla.bla:sectionCircleColor' not found.
Error:error: attribute 'com.bla.bla:sectionLineColor' not found.
Error:attribute 'com.bla.bla:sectionCircleColor' not found.
Error:attribute 'com.bla.bla:sectionLineColor' not found.
Error:failed linking file resources.
Error:java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:Execution failed for task ':app:processDebugResources'.
Failed to execute aapt
If both horizontal timeline and vertical timeline are used, they works fine.
But the dots on the line will disappear if only the horizontal timeline used.
2018-10-12 00:34:33.259 16375-16375/com.kickz.jeasteelpayroll E/AndroidRuntime: at com.kickz.jeasteelpayroll.TimeAttendanceRepo.getTimeattendanceList(TimeAttendanceRepo.kt:13)
at com.kickz.jeasteelpayroll.TimeAttendanceRepo.getTimeattendanceList(TimeAttendanceRepo.kt:13)
at com.kickz.jeasteelpayroll.TimeAttendanceRepo.getTimeattendanceList(TimeAttendanceRepo.kt:13)
at com.kickz.jeasteelpayroll.TimeAttendanceRepo.getTimeattendanceList(TimeAttendanceRepo.kt:13)
at com.kickz.jeasteelpayroll.TimeAttendanceRepo.getTimeattendanceList(TimeAttendanceRepo.kt:13)
at com.kickz.jeasteelpayroll.TimeAttendanceRepo.getTimeattendanceList(TimeAttendanceRepo.kt:13)
at com.kickz.jeasteelpayroll.TimeAttendanceRepo.getTimeattendanceList(TimeAttendanceRepo.kt:13)
at com.kickz.jeasteelpayroll.TimeAttendanceRepo.getTimeattendanceList(TimeAttendanceRepo.kt:13)
at com.kickz.jeasteelpayroll.TimeAttendanceRepo.getTimeattendanceList(TimeAttendanceRepo.kt:13)
at com.kickz.jeasteelpayroll.TimeAttendanceRepo.getTimeattendanceList(TimeAttendanceRepo.kt:13)
at com.kickz.jeasteelpayroll.TimeAttendanceRepo.getTimeattendanceList(TimeAttendanceRepo.kt:13)
at com.kickz.jeasteelpayroll.TimeAttendanceRepo.getTimeattendanceList(TimeAttendanceRepo.kt:13)
at com.kickz.jeasteelpayroll.TimeAttendanceRepo.getTimeattendanceList(TimeAttendanceRepo.kt:13)
at com.kickz.jeasteelpayroll.TimeAttendanceRepo.getTimeattendanceList(TimeAttendanceRepo.kt:13)
at com.kickz.jeasteelpayroll.TimeAttendanceRepo.getTimeattendanceList(TimeAttendanceRepo.kt:13)
at com.kickz.jeasteelpayroll.TimeAttendanceRepo.getTimeattendanceList(TimeAttendanceRepo.kt:13)
at com.kickz.jeasteelpayroll.TimeAttendanceRepo.getTimeattendanceList(TimeAttendanceRepo.kt:13)
at com.kickz.jeasteelpayroll.TimeAttendanceRepo.getTimeattendanceList(TimeAttendanceRepo.kt:13)
at com.kickz.jeasteelpayroll.TimeAttendanceRepo.getTimeattendanceList(TimeAttendanceRepo.kt:13)
at com.kickz.jeasteelpayroll.TimeAttendanceRepo.getTimeattendanceList(TimeAttendanceRepo.kt:13)
at com.kickz.jeasteelpayroll.TimeAttendanceRepo.getTimeattendanceList(TimeAttendanceRepo.kt:13)
at com.kickz.jeasteelpayroll.TimeAttendanceRepo.getTimeattendanceList(TimeAttendanceRepo.kt:13)
at com.kickz.jeasteelpayroll.TimeAttendanceRepo.getTimeattendanceList(TimeAttendanceRepo.kt:13)
at com.kickz.jeasteelpayroll.TimeAttendanceRepo.getTimeattendanceList(TimeAttendanceRepo.kt:13)
at com.kickz.jeasteelpayroll.TimeAttendanceRepo.getTimeattendanceList(TimeAttendanceRepo.kt:13)
at com.kickz.jeasteelpayroll.TimeAttendanceRepo.getTimeattendanceList(TimeAttendanceRepo.kt:13)
at com.kickz.jeasteelpayroll.TimeAttendanceRepo.getTimeattendanceList(TimeAttendanceRepo.kt:13)
at com.kickz.jeasteelpayroll.TimeAttendanceRepo.getTimeattendanceList(TimeAttendanceRepo.kt:13)
at com.kickz.jeasteelpayroll.TimeAttendanceRepo.getTimeattendanceList(TimeAttendanceRepo.kt:13)
at com.kickz.jeasteelpayroll.TimeAttendanceRepo.getTimeattendanceList(TimeAttendanceRepo.kt:13)
at com.kickz.jeasteelpayroll.TimeAttendanceRepo.getTimeattendanceList(TimeAttendanceRepo.kt:13)
at com.kickz.jeasteelpayroll.TimeAttendanceRepo.getTimeattendanceList(TimeAttendanceRepo.kt:13)
at com.kickz.jeasteelpayroll.TimeAttendanceRepo.getTimeattendanceList(TimeAttendanceRepo.kt:13)
at com.kickz.jeasteelpayroll.TimeAttendanceRepo.getTimeattendanceList(TimeAttendanceRepo.kt:13)
at com.kickz.jeasteelpayroll.TimeAttendanceRepo.getTimeattendanceList(TimeAttendanceRepo.kt:13)
at com.kickz.jeasteelpayroll.TimeAttendanceRepo.getTimeattendanceList(TimeAttendanceRepo.kt:13)
at com.kickz.jeasteelpayroll.TimeAttendanceRepo.getTimeattendanceList(TimeAttendanceRepo.kt:13)
at com.kickz.jeasteelpayroll.TimeAttendanceRepo.getTimeattendanceList(TimeAttendanceRepo.kt:13)
at com.kickz.jeasteelpayroll.TimeAttendanceRepo.getTimeattendanceList(TimeAttendanceRepo.kt:13)
at com.kickz.jeasteelpayroll.TimeAttendanceRepo.getTimeattendanceList(TimeAttendanceRepo.kt:13)
at com.kickz.jeasteelpayroll.TimeAttendanceRepo.getTimeattendanceList(TimeAttendanceRepo.kt:13)
The width of the line can be adjusted.
Hi there, displayed items are shifted to the right bottom side each time the view is updated.
When data is updated in a loop using
recyclerView.addItemDecoration(getSectionCallback(dataList))
the display items have the correct position during the first iteration, but start to shift to the right/bottom with each iteration.
As a test, setting the defaultOffset to 0 stops the shifting, so it seems an offset accumulates each time.
private var defaultOffset: Int = 0.DP(context).toInt()
The isSection function behaves strangely when the return value is both true or false.
i wanna use this good library for my android-java project without migrating to androidx.. how i can??
seems version 0.0.19 isn't for java project and version 0.0.20 is for androidx project
please guide me
@sangcomz you see on the picture, the forth top are overlapping with before one
please help me...
@sangcomz Hi.
this is my item.xml code:
<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">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/mainlayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
<...
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView>
and other part of code is exactly your example code.
but here is the result:
EDIT:
The result has captured from android emulator with API 29.
on the real devices and other emulators like NOX player and etc. it's OK!
Hello,
there is any why to use this time line in RTL apps?
i'm trying to change the line to be at right of the items.
Hi,
Is there a way to customize / replace the drawable for dots in timelive view.
I can see in the "getHeaderView" method it currently uses a static image for each indicator in timeline.
If there is no such function available to change / customize the icons in the timeline at this time,
can you please update the project or help me submit a PR for this feature.
TIA
Best,
Harshit
You suppose i have some images in each recyclerview rows, and i would like to have different image on each row on dot
, by customDotDrawable
we can change all of row in same time, and now how can i set different image for each row of time line?
Thanks for this awesome project. Would be good to have Java code sample on the home page and/or a sample app in Java. :)
如题.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.