[英]How can i achieve CoverFlow view
在https://github.com/davidschreiber/FancyCoverFlow中給出了一個很好的方法
Android應用中的FancyCoverFlow可以用作
fancyCoverFlow = new FancyCoverFlow(context);
fancyCoverFlow.setMaxRotation(45);
fancyCoverFlow.setUnselectedAlpha(0.3f);
fancyCoverFlow.setUnselectedSaturation(0.0f);
fancyCoverFlow.setUnselectedScale(0.4f);
您還可以從XML中擴展FancyCoverFlow:
<at.technikum.mti.fancycoverflow.FancyCoverFlow
android:layout_width="match_parent"
android:layout_height="match_parent"
fcf:maxRotation="45"
fcf:unselectedAlpha="0.3"
fcf:unselectedSaturation="0.0"
fcf:unselectedScale="0.4" />
請訪問
1) https://github.com/deepwinter/android-coverflow
2) https://github.com/i7an/cover-flow-android
3) https://github.com/driventokill/android-coverflow
4) https://github.com/HelgePlaschke/Android-Cover-Flow-Widget
在Android中您可以使用ViewPager和Below代碼來覆蓋封面流
fragmentimage.xml
<?xml version="1.0" encoding="utf-8"?>
<com.example.rajeev.viewpagercoverflow.CarouselLinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/root_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/transparent"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:id="@+id/pagerImg"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="fitXY"
android:contentDescription="@string/app_name"
android:src="@drawable/back" />
<TextView
android:id="@+id/text"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</com.example.rajeev.viewpagercoverflow.CarouselLinearLayout>
有關詳細信息,請訪問https://teachmeandroidhub.blogspot.com/2018/10/android-tutorial-how-to-create-view.html
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.