Damian Kozlak
Damian Kozlak

Reputation: 7083

Same style on all API using AppCompat

I'm using com.android.support:appcompat-v7:22.2.0 to make Lolipop material design on pre-Lolipop devices. The problem is that widgets (example EditText) are displaying different views with different parameters on different API.

Question is how to make it all looks the same on all API 15 and above?

Example here (different bottom line, margin between text and line etc.): enter image description here

Upvotes: 0

Views: 65

Answers (1)

Damian Kozlak
Damian Kozlak

Reputation: 7083

I think that I found solution.

AppCompat generates proper look during inflating layout. If API < 20 it generates look like newest API (ex. 22). If API >= 21 it generates look depending on API.

Don't look at preview in XML (my image is from previews). Open emulator and check by yourself how it will looks on device.

Hope it helps someone in future.

Upvotes: 1

Related Questions