Referencing custom view in XML doesn´t work both documented ways?

前端 未结 1 389
别那么骄傲
别那么骄傲 2021-01-15 14:42


        
相关标签:
1条回答
  • 2021-01-15 15:11

    You should use lowercase view in the xml for your custom layout:

    <view class="com.test.www.BrushPreview" android:id="@+id/brushview"
        android:layout_width="100dip" android:layout_height="100dip"
        android:layout_gravity="center" />
    

    (according to your link too), and it should work.

    Otherwise it tries to create a android.view.View instance.

    0 讨论(0)
提交回复
热议问题