【问题标题】:Why is public static method, DragEvent.obtain() not accessible为什么公共静态方法,DragEvent.obtain() 不可访问
【发布时间】:2012-12-26 23:19:16
【问题描述】:

谁能解释为什么我无法访问 DragEvent.obtain() 方法。

根据 grepcode DragEvent 代码,方法被声明为公共静态。

http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/4.0.1_r1/android/view/DragEvent.java#DragEvent.obtain%28android.view.DragEvent%29

问候,

【问题讨论】:

    标签: android drag-and-drop static-methods


    【解决方案1】:

    首先,不是publicin the current version of the source code

    其次,我相信您在GrepCode条目中看到的“隐藏:”是指@hide注解,它是Android在从源代码创建SDK时使用的。标有@hide 的类和方法不属于公共 SDK。

    【讨论】:

    • 感谢 CommonsWare。这解释了它。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2023-03-30
    • 1970-01-01
    • 2010-09-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-09-15
    相关资源
    最近更新 更多