1

I am novice in android studio. When I am using new in android studio, I am getting rendering problems in preview.

Without view:

enter image description here

But when I use view I am getting rendering problem:

enter image description here

I am confused why is it happening. Please help me.

user3641971
  • 137
  • 1
  • 7

1 Answers1

1

Use View instead of view in xml :

<View 
 android:layout_width="fill_parent"
 android:layout_height="fill_parent" />

Also use match_parent instead of fill_parent for height and width of views because fill_parent constant is deprecated starting from API Level 8 and is replaced by match_parent.

For more information see this post:

What is the difference between match_parent and fill_parent?

Community
  • 1
  • 1
ρяσѕρєя K
  • 132,198
  • 53
  • 198
  • 213