user3254515 user3254515 - 1 month ago 11
Android Question

Views and atributtes from android layout

Hy,

When using views and atributtes like the next ones configuring an android layout:

<ImageView
android:src="@android:drawable/ic_partial_secure"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:id="@+id/imageView" />



  • The number of views and values of these atributtes depend on the api level you are working on?

  • If it does, how can I know I am not using an atributte or a view that will not be present on an Android device with an api which not contains this atributte?



Thanks

T.S T.S
Answer

Yes, there are some attributes that require a min API, take a look at this: android:actionBarStyle requires API level 11

if it does and your min API level (in your build.gradle) is too low then android will tell you.