Vignesh
Vignesh

Reputation: 2325

How to set multiple values in Android XML file

In Imageview i need to use two values for same property(scaleType).

<ImageView 
    android:id="@+id/imageView1"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:layout_weight="0.70"
    android:background="#000000"
    android:scaleType="fitXY" />

In the above image view for scaleType I need to use both the property fitXY and Matrix.

Is it possible to use so or is there a better approach?

Upvotes: 0

Views: 1170

Answers (2)

Shaiful
Shaiful

Reputation: 5673

For some property you can use multiple values in xml using

' | ' . example- android:gravity="right|center_verticle"

This can be used if supported. Not sure if it's supported with this property.

Upvotes: 1

k_shil
k_shil

Reputation: 2148

Try using this PhotoView library.

According to spec scaleType should containt only one value.

Upvotes: 2

Related Questions