Issue
I overrided RelativeLayout class by a new one:
public class myRelative extends RelativeLayout{
//...
//this function is called but layout is not filled
@Override
protected void onDraw(Canvas canvas) {
// TODO Auto-generated method stub
super.onDraw(canvas);
canvas.drawColor(Color.WHITE);
}
//...
}
the XML file looks like this:
<myRelative
android:id="@+id/someid"
android:clipChildren="false"
android:clipToPadding="false"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
....
</....>
The behaviour of this Layout is the same as usual RelativeLayout
? Why nothing changed? Any ideas?
Solution
Try to set setWillNotDraw(false);
in all constructors of your custom view. Or maybe your custom view placed in xml where parent view have also WHITE
background.
Answered By - GIGAMOLE
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.