我无法找到一种方法来更改ViewPager中滚动页面的触摸阈值:http: //developer.android.com/reference/android/support/v4/view/ViewPager.html
查看源代码,ViewPager有一个名为determineTargetPage的方法,它检查移动触摸手势距离>阈值范围,但看起来无法修改此范围.
关于如何控制这个阈值的任何建议(如果可能的话)?
我试图让访问谷歌文档Android 4.4使用Intent.ACTION_GET_CONTENT,但在谷歌驱动器选择器的文件显示为灰色(不可选).我可以很好地访问Google云端硬盘上的doc/docx文件,但不能访问Google文档.我指定的mime类型与Google云端硬盘支持的MIME类型中列出的类型相匹配.
这是代码片段(正在运行Android 4.4):
Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
intent.addCategory(Intent.CATEGORY_OPENABLE);
intent.setType("*/*");
intent.putExtra(Intent.EXTRA_MIME_TYPES, new String[]{
"application/msword",
"application/vnd.oasis.opendocument.text",
"application/vnd.openxmlformats-officedocument.wordprocessingml.document",
"application/vnd.openxmlformats-officedocument.wordprocessingml.template",
"application/vnd.google-apps.document",
"application/vnd.google-apps.kix",
});
startActivityForResult(intent, 0);
Run Code Online (Sandbox Code Playgroud)
关于可能出错的任何想法?
android ×2