user3641971
user3641971

Reputation: 137

Getting rendering problems while using view in android studio

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.

Upvotes: 1

Views: 148

Answers (1)

ρяσѕρєя K
ρяσѕρєя K

Reputation: 132992

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?

Upvotes: 1

Related Questions