Giter Club home page Giter Club logo

singlerowcalendar's People

Contributors

misosvec avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

singlerowcalendar's Issues

Remove previous day from view

It seems that previous day stays in the list unless the user restarts the app. In my use case I don't care about days before the current day. Is there a way for me to discard the previous day?

java.lang.ClassNotFoundException: android.view.shape

android.view.InflateException: Binary XML file line #2 in com.example.horizontalcalendar:drawable/round_rectangle_shape: Binary XML file line #2 in com.example.horizontalcalendar:drawable/round_rectangle_shape: Error inflating class shape
Caused by: android.view.InflateException: Binary XML file line #2 in com.example.horizontalcalendar:drawable/round_rectangle_shape: Error inflating class shape
Caused by: java.lang.ClassNotFoundException: android.view.shape
    at java.lang.Class.classForName(Native Method)
    at java.lang.Class.forName(Class.java:454)
    at android.view.LayoutInflater.createView(LayoutInflater.java:830)
    at android.view.LayoutInflater.createView(LayoutInflater.java:791)
    at android.view.LayoutInflater.onCreateView(LayoutInflater.java:969)
    at com.android.internal.policy.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:68)
    at android.view.LayoutInflater.onCreateView(LayoutInflater.java:986)
    at android.view.LayoutInflater.onCreateView(LayoutInflater.java:1006)
    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:1062)
    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:1017)
    at android.view.LayoutInflater.inflate(LayoutInflater.java:674)
    at android.view.LayoutInflater.inflate(LayoutInflater.java:549)
    at com.michalsvec.singlerowcalendar.calendar.SingleRowCalendarAdapter.onCreateViewHolder(SingleRowCalendarAdapter.kt:67)
    at com.michalsvec.singlerowcalendar.calendar.SingleRowCalendarAdapter.onCreateViewHolder(SingleRowCalendarAdapter.kt:16)
    at androidx.recyclerview.widget.RecyclerView$Adapter.createViewHolder(RecyclerView.java:7078)
    at androidx.recyclerview.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:6235)
    at androidx.recyclerview.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:6118)
    at androidx.recyclerview.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:6114)
    at androidx.recyclerview.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:2303)
    at androidx.recyclerview.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1627)
    at androidx.recyclerview.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1587)
    at androidx.recyclerview.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:665)
    at androidx.recyclerview.widget.RecyclerView.dispatchLayoutStep2(RecyclerView.java:4134)
    at androidx.recyclerview.widget.RecyclerView.onMeasure(RecyclerView.java:3540)
    at android.view.View.measure(View.java:24851)
    at androidx.constraintlayout.widget.ConstraintLayout.internalMeasureChildren(ConstraintLayout.java:1227)
    at androidx.constraintlayout.widget.ConstraintLayout.onMeasure(ConstraintLayout.java:1572)
    at android.view.View.measure(View.java:24851)
    at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6908)
    at android.widget.FrameLayout.onMeasure(FrameLayout.java:221)
    at androidx.appcompat.widget.ContentFrameLayout.onMeasure(ContentFrameLayout.java:146)
    at android.view.View.measure(View.java:24851)
    at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6908)
    at androidx.appcompat.widget.ActionBarOverlayLayout.onMeasure(ActionBarOverlayLayout.java:490)
    at android.view.View.measure(View.java:24851)
    at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6908)
    at android.widget.FrameLayout.onMeasure(FrameLayout.java:221)
    at android.view.View.measure(View.java:24851)
    at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6908)
    at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1552)
    at android.widget.LinearLayout.measureVertical(LinearLayout.java:842)
    at android.widget.LinearLayout.onMeasure(LinearLayout.java:721)
    at android.view.View.measure(View.java:24851)
    at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6908)
    at com.android.internal.policy.DecorView.measureChildWithMargins(DecorView.java:3029)

2020-08-17 15:38:27.480 13881-13881/com.example.horizontalcalendar E/AndroidRuntime: at android.widget.FrameLayout.onMeasure(FrameLayout.java:221)
at com.android.internal.policy.DecorView.onMeasure(DecorView.java:863)
at android.view.View.measure(View.java:24851)
at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:3231)
at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:2004)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2296)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1888)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7939)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1105)
at android.view.Choreographer.doCallbacks(Choreographer.java:921)
at android.view.Choreographer.doFrame(Choreographer.java:851)
at android.view.Choreographer$FrameHandler.handleMessage(Choreographer.java:1028)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:230)
at android.app.ActivityThread.main(ActivityThread.java:7806)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:508)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1034)
Caused by: java.lang.ClassNotFoundException: Didn't find class "android.view.shape" on path: DexPathList[[zip file "/data/app/com.example.horizontalcalendar-T7kuAygDUvOz3oOTmo3Flw==/base.apk"],nativeLibraryDirectories=[/data/app/com.example.horizontalcalendar-T7kuAygDUvOz3oOTmo3Flw==/lib/arm64, /system/lib64, /system/product/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:196)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
... 63 more
2020-08-17 15:38:27.538 13881-13881/com.example.horizontalcalendar I/Process: Sending signal. PID: 13881 SIG: 9

ViewBinding

Since the kotlinx.android.synthetic is deprecated, is it possible to use ViewBinding with this library? And more specifically how to set the item views in the calendar? In my case I have inside the CalendarViewManager initialization:

holder.itemView.tv_date_calendar_item.text = DateUtils.getDayNumber(date)
holder.itemView.tv_day_calendar_item.text = DateUtils.getDay3LettersName(date)

Is it possible to be done with ViewBinding?

Usage in Java android Project

This library seems very helpful. Someone could you help me to get equivalent Java code snippets for implementation in a Java android project. Especially for below sections

  1. setup CalendarViewManager
  2. setup CalendarSelectionManager
  3. setup CalendarChangesObserver
  4. Provide dates and init SingleRowCalendar

Thanks in advance.

show dates weekly

How can i show dates on weekly basis and initially with current week and current date selected ?

CoordinatorLayout does not handle setCalendarViewResourceId correctly.

I started with the sample provided and have since changed my layout from ConstraintLayout to CoordinatorLayout.

The result of this is that it would work fine until I press either "btnRight" or "btnLeft" then the SingleRowCalendar items would stop updating their appearance to "R.layout.selected_calendar_item" on selection; the TextViews "tvDate" and "tvDay" are still updated correctly.

I found that adding singleRowCalendar.init() to the setOnClickListeners for the buttons fixed this issue but there is now a 1-second delay between selection and appearance change.

I believe I have narrowed the issue down to my change of layout type.

Load dates dynamically

Hello, does anybody have an idea how to load dates dynamically when nearing the end of current set of dates?
Thank you in advance!

Use in JAVA

Is there any way to use this library in the JAVA project or I need to use strictly Koitlin for this?

Put selected item in center

When by default some date is selected, or when we select certain date, is it possible to put that item in center of row?

calling init() several times

it seems that the init() function must be called after setting the data for the selection tracker to work properly.
the problem is that doing so makes the whenSelectionChanged() function to fire several time.
is there a solution for this issue?

thanks

JCenter is dead

Request to replace JCenter repository and move it onto a new one because I can't seem to import it
image

The selected date wont change color after click button next/previous month

I have an UI Issue here which I don't know how to solve it.

The Calendar will display current selected date correct, the selected date will change it background. But when click the next/previous month and go back to the current month of year and try to select a date, the background wont change it color anymore.

I tested to debug & compare with the sample code from repo and I figured out object CalendarViewManager in my project does not triggered during the date selection after month has been changed. But when I tried the sample code from repo, the CalendarViewManager actually triggered and worked fine.

Does anyone had the same issue just like me?

How to choose the style of the calendar ?

Hi,

I see on the presentation page of this lib that there are several styles of calendar. When I run the app, I get the first style ; how to try another style ?

Thanks.

Could not find com.michalsvec:single-row-calednar:1.0.0.

I'm using Android Studio Giraffe | 2022.3.1 Patch 3 with

    compileSdk = 34
    minSdk = 30
    targetSdk = 34

wrote this ino build.gradle/kts

dependencies {
...
implementation ("com.michalsvec:single-row-calednar:1.0.0")
...
}

And this error

Execution failed for task ':app:checkDebugAarMetadata'.

Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
Could not find com.michalsvec:single-row-calednar:1.0.0.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/michalsvec/single-row-calednar/1.0.0/single-row-calednar-1.0.0.pom
- https://repo.maven.apache.org/maven2/com/michalsvec/single-row-calednar/1.0.0/single-row-calednar-1.0.0.pom
Required by:
project :app

Look around and couldn't find a solution.

How can I resolve this issue?

note that I've tested with https://github.com/hdodenhof/CircleImageView library and it installed fine.

Migrating from jcenter()

Hi! when the lib will be migrated from jcenter()?
Thank you very much for respond beforehand!

Crash with recyclerview-selection:1.1.0-rc01

with 'androidx.recyclerview:recyclerview-selection:1.1.0-alpha06' buton next month and prev month work fine.
But with 'androidx.recyclerview:recyclerview-selection:1.1.0-rc01' it crash.

How to disable previous date and current date is selected by default

Hello sir,

I have to implement your library but I can't find how to disable the previous date and how to by default selected the current date.
And the second thing when we scroll to last then month is not changed automatically how to change the month automatically when scrolling to the last position?

Thank you

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.