看SD卡分区加载过程,有com.android.internal.R.styleable.Storag,这个定义在frameworks/base/core/res/res/values/attrs.xml中。
Android 中需要自己去定义View,如果想通过xml指定一些需要的参数,就需要自己声明一个styleable,并在里面自己定义一些attr属性。
attr和styleable的关系:attr不依赖于styleable,styleable只是为了attr的使用。
通过定义一个sytleable,可以在R文件里自动生成一个定义在styleable里面的的id,在获取属性时就可以直接使用stylebale来获取一些列的属性。