我创建了一个带有属性的自定义视图。有没有办法在 Android Studio 中将这些属性与 android 工具一起使用?
例如 :
<MyOwnCoolView
android:layout_width="96dp"
android:layout_height="96dp"
android:padding="3dp"
tools:dividerAngle="2"/>
attr 文件在哪里:
<resources>
<declare-styleable name="MyOwnCoolView">
<attr name="dividerAngle" format="float"/>
</declare-styleable>