Question

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

and this not:

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

Following the documentation http://developer.android.com/guide/topics/ui/custom-components.html#modifying it should work both ways! What am I doing wrong?

edit: lowercase view seems to work! i thought i tried that already...thanks! and furthermore, it´s very important to use this constructor in the view class:

public BrushPreview(Context context, AttributeSet attrs) 

otherwise it won´t get called.

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top