Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

migration to androidx once more :) #36

Closed
wants to merge 10 commits into from
Closed

Conversation

kibotu
Copy link

@kibotu kibotu commented Oct 2, 2019

updated

  • androidx,
  • kotlin 1.3.50
  • gradle 5.6.1
  • added viewpager2 support

@kibotu kibotu mentioned this pull request Oct 2, 2019
Copy link
Owner

@wching wching left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey kibotu, thanks for your contribution and for creating a PR again for this update! I have a couple of questions and suggestions. Let me know what you think.

.gitignore Show resolved Hide resolved
build.gradle Show resolved Hide resolved
gradle.properties Show resolved Hide resolved
indefinitepagerindicator/build.gradle Outdated Show resolved Hide resolved
sample/build.gradle Outdated Show resolved Hide resolved
@kibotu
Copy link
Author

kibotu commented Oct 7, 2019

i've updated all the points of your feedback @wching

@wching
Copy link
Owner

wching commented Oct 14, 2019

Testing today and then if nothing is off, I'll merge it @kibotu! :)

@kibotu
Copy link
Author

kibotu commented Oct 14, 2019

yea let me know :) it's a cool project which i personally believe to be the best long lists dot indicators

Copy link
Owner

@wching wching left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey kibotu! Reviewed again and I have a couple of questions :)

implementation "androidx.appcompat:appcompat:1.1.0"
implementation "androidx.appcompat:appcompat-resources:1.1.0"
implementation 'androidx.recyclerview:recyclerview:1.1.0-beta04'
implementation 'com.google.android.material:material:1.1.0-alpha10'
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are we adding the material alpha here?
and I think we should stick to stable versions for the sake of everybody :)

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any news @kibotu?

@@ -378,7 +424,7 @@ class IndefinitePagerIndicator @JvmOverloads constructor(
private fun getMostVisibleChild(): View? {
var mostVisibleChild: View? = null
var mostVisibleChildPercent = 0f
for (i in recyclerView?.layoutManager?.childCount!! - 1 downTo 0) {
for (i in (recyclerView?.layoutManager?.childCount ?: 0 - 1).coerceAtLeast(0) downTo 0) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👌 to the coerceAtLeast

private fun setIntermediateSelectedItemPosition(mostVisibleChild: View?) {
with(recyclerView?.findContainingViewHolder(mostVisibleChild)?.adapterPosition!!) {
private fun setIntermediateSelectedItemPosition(mostVisibleChild: View) {
with(recyclerView?.findContainingViewHolder(mostVisibleChild)?.adapterPosition) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we could remove the with clause and use let instead. Because we are just using this everywhere that way we could also do nothing if not adapter position exists. What do you think?

@wching
Copy link
Owner

wching commented Nov 8, 2019

@kibotu any news?

@OscarSpruit OscarSpruit mentioned this pull request Aug 15, 2020
@wching
Copy link
Owner

wching commented Aug 18, 2020

Closing as #39 was quicker addressing concerns

@wching wching closed this Aug 18, 2020
@kibotu kibotu deleted the master branch August 8, 2022 06:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants