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

第10篇 Matrix_Method 中的折叠布局有bug

Open
#108 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
20/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
android, java

Research direction

The issue names Android's setPolyToPoly() and a fold-layout reproduction, but no repository file or test. Start by reading the Android API documentation and reproducing the reported flip and clipping behavior; done would be a clear mathematical explanation of the transform and its boundary conditions.

Written by the indexing model from the issue text.

Description

这个issue仅用来讨论setPolytoPoly( )为什么会存在这个问题,虽然我通过发现问题出现规律把问题解决了,但是不明白其中的数学原理,还请高手指教,下面是问题:

我首先按照自己的想法实现了一下折叠布局, 发现折叠变形过大, 折叠中的某些格条会消失,我又去参考鸿洋的文章去实现,发现仍然存在这个问题:
test
(录屏中最下面的是解决问题后的, 倒数第二个是有问题的)

然后我只画出问题的格子,并把clip注掉, 我发现图片超出屏幕外一定程度图片就会翻转, 翻转后clip范围内没有图片了,所以看起来消失了.
我的解决方法是把图片根据clip大小截了, 在画图时把canvas坐标原点移动到最长的边使Y轴重合,保证图片变形时只会变小,不会变大超出屏幕.
问题就是为什么图片在使用setPolytoPoly( )时超出屏幕一定范围会翻转,它背后的原理是什么,欢迎大家讨论.

Dominant language
Java
Stars
9.3k
Forks
2.1k
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

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 GcsSloop/AndroidNote

All issues in GcsSloop/AndroidNote

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.