Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

setRotationBy setRotationTo does not work with ViewPager

Open
#843 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
32/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
android, kotlin
Domain
mobile

Research direction

Start by reproducing the sample with PhotoView inside the shown BannerAdapter and a ViewPager, checking both setRotationBy and setRotationTo. Trace the PhotoView rotation entry points and ViewPager interaction, then verify that the requested rotation methods work when the image is hosted in the pager.

Written by the indexing model from the issue text.

Description

sample code:

class ImageAdapter(val context: Context, dataList: List?) : BannerAdapter<String, ImageAdapter.ImageViewHolder>(dataList) {

class ImageViewHolder(val imageView: PhotoView) : RecyclerView.ViewHolder(imageView)

override fun onCreateHolder(parent: ViewGroup, viewType: Int): ImageViewHolder {
    val imageView = PhotoView(context)
    imageView.layoutParams = ViewGroup.LayoutParams(
        ViewGroup.LayoutParams.MATCH_PARENT,
        ViewGroup.LayoutParams.MATCH_PARENT
    )
    imageView.scaleType = ImageView.ScaleType.CENTER_CROP
    return ImageViewHolder(imageView)
}

override fun onBindView(
    holder: ImageViewHolder,
    data: String,
    position: Int,
    size: Int
) {
    ImageUtils.displayLocal(context, File(data), holder.imageView)
    holder.imageView.setRotationBy(20f)
}

}

Dominant language
Java
Stars
18.8k
Forks
3.9k
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Baseflow/PhotoView

All issues in Baseflow/PhotoView

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.