简体   繁体   中英

How to programmatically create a level-list?

i'm getting images of a product dynamically from a server. These images are actually of different angles of the same product.I want to create a 360 degree of view from these images in android like in shopping websites. Layer-list is an option but it cannot load images dynamically is there any otherway to do this in android.

 <level-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:maxLevel="0" android:drawable="@drawable/bg_01" />
<item android:maxLevel="1" android:drawable="@drawable/bg_02" />
<item android:maxLevel="2" android:drawable="@drawable/bg_03" />
<item android:maxLevel="3" android:drawable="@drawable/bg_04" />
<item android:maxLevel="4" android:drawable="@drawable/bg_05" />
</level-list>

Use picasso.get().rotate(360).into

In case you don't know .. picasso is third party library

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM