哪里可以获得 Android 1.5 源码?
我的目标是 Android 1.5 - 我想使用 ScrollView 小部件,但是类中有一个硬编码值,这使得它无法用于我的目的(它是“touch slop”值 - 设置为 16 -在考虑手势滚动之前,用户必须用手指进行的移动量 - 我认为理想情况下应该将其减半!)。
无论如何,我可以获取 ScrollView 的源代码,将其粘贴到我的项目中,然后调整该静态字段,然后将类重命名为 MyScrollView。但是 Android Living 的“官方”源代码(特别是 1.5 版本)在哪里?我从这里获取了 ScrollView 代码作为测试:
https://android.googlesource.com/platform/frameworks/base/+/android-1.6_r1/core/java/android/widget
但不确定这是否是获取它的正确位置。
I'm targeting Android 1.5 - I'd like to use the ScrollView widget, but there's a hard-coded value within the class which makes it kind of unusable for my purposes (it's the "touch slop" value - set to 16 - the amount of movement the user has to make with their finger before considering the gesture a scroll - I think this should ideally be cut in half!).
Anyway, I could grab the source of ScrollView, paste it into my project, and then tweak that one static field, then rename the class MyScrollView. But where is the 'official' source code for Android living, specifically for 1.5? I grabbed the ScrollView code from here as a test:
https://android.googlesource.com/platform/frameworks/base/+/android-1.6_r1/core/java/android/widget
but not sure if this is the right place to get it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这里同样需要。您可以浏览类历史。适应类似乎很危险,但我没有找到另一个解决方案,我需要更改滚动灵敏度,这是一个私有字段(mTouchSlop)
Same needed here. You can browse the class history. Seems dangerous adapt the class but I didn't found another solution, I need to change the scroll sensibility and that's a private field (mTouchSlop)