Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Add new `OffsetHint` constants for disabling animations

Đang mở
#78 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
30/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
android, java
Lĩnh vực
mobile-dev

Hướng nghiên cứu

Bắt đầu với CutoutViewIndicator::setOffsetHints(int), CutoutImageCell, OffsetHint và các phương thức hiện có ::justShowTheSelectionsWithoutAnimatingAnything() và ::pleaseGoBackToAnimatingEverything(). Xác định các hằng số được yêu cầu và làm rõ tên của các phương thức tiện ích cũng như hành vi làm tròn số dấu phẩy động trước khi coi tính năng này là hoàn tất.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bug good first issue

Credits to @agrosner for reporting this.

Currently, the value 0 (the standard 'disabled' value for an integer flag) is accepted by CutoutViewIndicator::setOffsetHints(int). Passing that to the function prevents any sort of offset in CutoutImageCell from working, which in turn prevents the indicator from...well, indicating anything.

To make this more transparent, and simpler for new users of the library, I propose two new OffsetHint constants:

  1. an explicit constant STOP_EVERYTHING with value 0
    • this'd disable offset-event visual effects
    • well, at least until a different value is set on the indicator
  2. a constant ONLY_ROUND_NUMBERS with value 1 << 4
    • that'd cause cells to only react to OffsetEvents which return an integer from ::getFraction()
    • ideally some minor rounding to handle floating-point nonsense

Also, a new convenience method or two for setting that second flag: not sure on the name(s), but the should have the same vibe as ::justShowTheSelectionsWithoutAnimatingAnything() and ::pleaseGoBackToAnimatingEverything().

Ngôn ngữ chính
Java
Star
21
Fork
3
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của ml-opensource/CutoutViewIndicator

Tất cả issue của ml-opensource/CutoutViewIndicator

Issue tương tự

Thêm issue về Java

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.