zhouchao0118 发表于 2024-9-9 14:18:11

安卓怎么封装default String getAttributeNamespace (int index){

本帖最后由 zhouchao0118 于 2024-9-9 14:33 编辑

default是方法还是什么?
    default String getAttributeNamespace (int index) {
      // This is a new method since the first interface definition, so add stub impl.
      return null;
    }

android.util.AttributeSet
https://developer.android.google ... tAttributeNamespace(int)===
再追加一个问题
没有语句的方法,又该怎么封装?
    public String getAttributeName(int index);

可以看到,里面一个语句也没有。
只能@begin@end吗?
android.util.AttributeSet
https://developer.android.google.cn/reference/android/util/AttributeSet#getAttributeName(int)

创世魂 发表于 2024-9-9 15:15:55

正常封就行了。
页: [1]
查看完整版本: 安卓怎么封装default String getAttributeNamespace (int index){