简体   繁体   English

我怎样才能实现CoverFlow视图

[英]How can i achieve CoverFlow view

I want to achieve overflow view with dotted layout. 我想用虚线布局实现溢出视图。 Currently i am using polidea cover flow library URL [gitHub] . 目前我正在使用polidea封面流程库URL [gitHub] Using this library images are drawn at center. 使用此库可以在中心绘制图像。

I want to achieve exact UI like this. 我希望像这样实现精确的UI。

an excellent approach is given at https://github.com/davidschreiber/FancyCoverFlow where https://github.com/davidschreiber/FancyCoverFlow中给出了一个很好的方法

FancyCoverFlow in Android app can be used as Android应用中的FancyCoverFlow可以用作

fancyCoverFlow = new FancyCoverFlow(context);
fancyCoverFlow.setMaxRotation(45);
fancyCoverFlow.setUnselectedAlpha(0.3f);
fancyCoverFlow.setUnselectedSaturation(0.0f);
fancyCoverFlow.setUnselectedScale(0.4f);

You can also inflate FancyCoverFlow from XML: 您还可以从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" />

please visit also 请访问

1) https://github.com/deepwinter/android-coverflow 1) https://github.com/deepwinter/android-coverflow

2) https://github.com/i7an/cover-flow-android 2) https://github.com/i7an/cover-flow-android

3) https://github.com/driventokill/android-coverflow 3) https://github.com/driventokill/android-coverflow

4) https://github.com/HelgePlaschke/Android-Cover-Flow-Widget 4) https://github.com/HelgePlaschke/Android-Cover-Flow-Widget

5) https://github.com/missingfeature/android-coverflow 5) https://github.com/missingfeature/android-coverflow

In Android You can chieve Cover flow Using ViewPager and Below code for 在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>

For more Detail You can visit to https://teachmeandroidhub.blogspot.com/2018/10/android-tutorial-how-to-create-view.html 有关详细信息,请访问https://teachmeandroidhub.blogspot.com/2018/10/android-tutorial-how-to-create-view.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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