title: Coverflow activity does open -unforntely stopped
body: <p>first i have used <a href="https://github.com/moondroid/CoverFlow" rel="nofollow noreferrer">implementation 'com.github.moondroid.coverflow:library:1.0'</a></p>
  
  <p>my app is unfortunately stopped says it is divided by zero so what should i do</p>
  
  <p>logcat</p>
  
  <blockquote>
    <p>05-28 16:48:18.789 15741-15945/com.blipclap.creativegraphy D/FA: Logging event (FE): screen_view(_vs), Bundle[{firebase_event_origin(_o)=auto, firebase_previous_class(_pc)=HomeActivity, firebase_previous_id(_pi)=-3941845028126870572, firebase_screen_class(_sc)=ViewDownload, firebase_screen_id(_si)=-3941845028126870569}]
    05-28 16:48:18.846 15741-15945/com.blipclap.creativegraphy D/FA: Connected to remote service
    05-28 16:48:18.851 15741-15741/com.blipclap.creativegraphy D/AndroidRuntime: Shutting down VM
    05-28 16:48:18.855 15741-15741/com.blipclap.creativegraphy E/AndroidRuntime: FATAL EXCEPTION: main
        Process: com.blipclap.creativegraphy, PID: 15741
        java.lang.ArithmeticException: divide by zero
            at it.moondroid.coverflow.components.ui.containers.FeatureCoverFlow.dispatchDraw(FeatureCoverFlow.java:471)
            at android.view.View.updateDisplayListIfDirty(View.java:15263)
            at android.view.View.draw(View.java:16048)
            at android.view.ViewGroup.drawChild(ViewGroup.java:3610)
            at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3400)
            at android.view.View.updateDisplayListIfDirty(View.java:15263)
            at android.view.View.draw(View.java:16048)
            at android.view.ViewGroup.drawChild(ViewGroup.java:3610)
            at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3400)
            at android.view.View.updateDisplayListIfDirty(View.java:15263)
            at android.view.View.draw(View.java:16048)
            at android.view.ViewGroup.drawChild(ViewGroup.java:3610)
            at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3400)
            at android.view.View.updateDisplayListIfDirty(View.java:15263)
            at android.view.View.draw(View.java:16048)
            at android.view.ViewGroup.drawChild(ViewGroup.java:3610)
            at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3400)
            at android.view.View.updateDisplayListIfDirty(View.java:15263)
            at android.view.View.draw(View.java:16048)
            at android.view.ViewGroup.drawChild(ViewGroup.java:3610)
            at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3400)
            at android.view.View.updateDisplayListIfDirty(View.java:15263)
            at android.view.View.draw(View.java:16048)
            at android.view.ViewGroup.drawChild(ViewGroup.java:3610)
            at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3400)
            at android.view.View.draw(View.java:16281)
            at com.android.internal.policy.PhoneWindow$DecorView.draw(PhoneWindow.java:2695)
            at android.view.View.updateDisplayListIfDirty(View.java:15268)
            at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:281)
            at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:287)
            at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:322)
            at android.view.ViewRootImpl.draw(ViewRootImpl.java:2615)
            at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2434)
            at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2067)
            at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1107)
            at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6013)
            at android.view.Choreographer$CallbackRecord.run(Choreographer.java:858)
            at android.view.Choreographer.doCallbacks(Choreographer.java:670)
            at android.view.Choreographer.doFrame(Choreographer.java:606)
            at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:844)
            at android.os.Handler.handleCallback(Handler.java:739)
            at android.os.Handler.dispatchMessage(Handler.java:95)
            at android.os.Looper.loop(Looper.java:157)
            at android.app.ActivityThread.main(ActivityThread.java:5429)
            at java.lang.reflect.Method.invoke(Native Method)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)</p>
  </blockquote>
  
  <p>My code</p>
  
  <p>home activity</p>
  
  <pre><code> @SuppressWarnings("StatementWithEmptyBody")
  @Override
  public boolean onNavigationItemSelected(MenuItem item) {
      // Handle navigation view item clicks here.
      int id = item.getItemId();
  
      if (id == R.id.nav_view_downloads) {
          startActivity(new Intent(HomeActivity.this, ViewDownload.class));
      }
  
      DrawerLayout drawer = findViewById(R.id.drawer_layout);
      drawer.closeDrawer(GravityCompat.START);
      return true;
  }
  </code></pre>
  
  <p>viewdownload</p>
  
  <pre><code> package com.blipclap.creativegraphy;
  
  import android.net.Uri;
  import android.os.Bundle;
  import android.os.Environment;
  import android.support.v7.app.AppCompatActivity;
  import android.view.LayoutInflater;
  import android.view.View;
  import android.view.animation.Animation;
  import android.view.animation.AnimationUtils;
  import android.widget.AdapterView;
  import android.widget.TextSwitcher;
  import android.widget.TextView;
  import android.widget.ViewSwitcher;
  
  import com.blipclap.creativegraphy.Adapter.DownloadAdapter;
  import com.blipclap.creativegraphy.Model.Downloads;
  
  import java.io.File;
  import java.util.ArrayList;
  import java.util.List;
  
  import it.moondroid.coverflow.components.ui.containers.FeatureCoverFlow;
  
  public class ViewDownload extends AppCompatActivity {
  
      private FeatureCoverFlow coverFlow;
      private DownloadAdapter downloadAdapter;
      private List&lt;Downloads&gt; downloadsList = new ArrayList&lt;&gt;();
      private TextSwitcher mTitle;
      private String file_path;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_view_download);
  
          initData();
          mTitle = (TextSwitcher) findViewById(R.id.title);
          mTitle.setFactory(new ViewSwitcher.ViewFactory() {
              @Override
              public View makeView() {
                  LayoutInflater inflater = 
  LayoutInflater.from(ViewDownload.this);
                  TextView txt = (TextView) 
  inflater.inflate(R.layout.layout_download_title, null);
                  return txt;
              }
          });
          Animation in = AnimationUtils.loadAnimation(this, 
  R.anim.slide_in_top);
          Animation out = AnimationUtils.loadAnimation(this, 
  R.anim.slide_out_bottom);
          mTitle.setInAnimation(in);
          mTitle.setOutAnimation(out);
  
          downloadAdapter = new DownloadAdapter(downloadsList, this);
          coverFlow = (FeatureCoverFlow) findViewById(R.id.coverFlow);
          coverFlow.setAdapter(downloadAdapter);
  
          coverFlow.setOnItemClickListener(new 
  AdapterView.OnItemClickListener() {
              @Override
              public void onItemClick(AdapterView&lt;?&gt; parent, View view, int 
  position, long id) {
                  //TODO CoverFlow item clicked
              }
          });
  
          coverFlow.setOnScrollPositionListener(new 
  FeatureCoverFlow.OnScrollPositionListener() {
              @Override
              public void onScrolledToPosition(int position) {
                  mTitle.setText(downloadsList.get(position).getName());
              }
  
              @Override
              public void onScrolling() {
  
              }
          });
  
      }
  
      private ArrayList&lt;Downloads&gt; initData() {
          ArrayList&lt;Downloads&gt; downloads = new ArrayList&lt;&gt;();
  
          //Target Folder
          file_path = 
  Environment.getExternalStorageDirectory().getAbsolutePath() + 
  "/CreativeGraphy";
          File dir = new File(file_path);
  
          Downloads d;
  
          if (dir.exists()) {
              //Get all files From target folder
              File[] files = dir.listFiles();
  if (files.length!=0) {
      //Loop for getting name and uri
      for (int i = 0; i &lt; files.length; i++) {
          File file = files[i];
  
          d = new Downloads();
          d.setName(file.getName());
          d.setUri(Uri.fromFile(file));
  
          downloads.add(d);
      }
  }else if (files.length==0)
  {
      d = new Downloads();
      d.setName("You have not Downloaded any Wallpaper");
      d.setUri(Uri.parse("R.drawable.ic_terrain_black_24dp"));
  
      downloads.add(d);
  }
          }
          return downloads;
      }
  }
  </code></pre>
  
  <p>Model  </p>
  
  <pre><code> package com.blipclap.creativegraphy.Model;
  
  import android.net.Uri;
  
  public class Downloads {
      private String Name;
      private Uri uri;
  
  
      public String getName() {
          return Name;
      }
  
      public void setName(String name) {
          Name = name;
      }
  
      public Uri getUri() {
          return uri;
      }
  
      public void setUri(Uri uri) {
          this.uri = uri;
      }
  }
  </code></pre>
  
  <p>Adapter   </p>
  
  <pre><code> package com.blipclap.creativegraphy.Adapter;
  
  import android.content.Context;
  import android.view.LayoutInflater;
  import android.view.View;
  import android.view.ViewGroup;
  import android.widget.BaseAdapter;
  import android.widget.ImageView;
  import android.widget.TextView;
  
  import com.blipclap.creativegraphy.Model.Downloads;
  import com.blipclap.creativegraphy.R;
  import com.squareup.picasso.Picasso;
  
  import java.util.List;
  
  public class DownloadAdapter extends BaseAdapter {
  private List&lt;Downloads&gt; downloadsList;
  private Context mContext;
  
  public DownloadAdapter(List&lt;Downloads&gt; downloadsList, Context mContext) {
      this.downloadsList = downloadsList;
      this.mContext = mContext;
  }
  
  @Override
  public int getCount() {
      return downloadsList.size();
  }
  
  @Override
  public Object getItem(int i) {
      return downloadsList.get(i);
  }
  
  @Override
  public long getItemId(int i) {
      return i;
  }
  
  @Override
  public View getView(int i, View view, ViewGroup viewGroup) {
  View rowView = view;
  if (rowView==null)
  {
  rowView = 
  LayoutInflater.from(mContext).inflate(R.layout.layout_download_item,null);
  
  TextView name =(TextView)rowView.findViewById(R.id.label);
  ImageView image=(ImageView)rowView.findViewById(R.id.image);
  
  final Downloads downloads =(Downloads) this.getItem(i);
  
  //Set data
   Picasso.with(mContext).load(downloads.getUri())
   .placeholder(R.drawable.ic_terrain_black_24dp)
          .into(image);
  name.setText(downloads.getName());
  }
  return rowView;
  }
  }
  </code></pre>
  
  <p>Layout 
  main layout</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:app="http://schemas.android.com/apk/res-auto"
  xmlns:tools="http://schemas.android.com/tools"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  tools:context=".ViewDownload"&gt;
  
  &lt;it.moondroid.coverflow.components.ui.containers.FeatureCoverFlow
      android:id="@+id/coverFlow"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      app:coverHeight="200dp"
      app:coverWidth="140dp"
      app:maxScaleFactor="1.5"
      app:reflectionGap="0px"
      app:rotationThreshold="0.5"
      app:scalingThreshold="0.5"
      app:spacing="0.6" /&gt;
  
  &lt;TextSwitcher
      android:id="@+id/title"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:layout_alignParentBottom="true"
      android:layout_centerVertical="true"
      android:paddingBottom="16dp"&gt;&lt;/TextSwitcher&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>item layout</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="200dp"
  android:layout_height="160dp"
  android:background="@drawable/selector_bg"
  android:clickable="true"&gt;
  
  &lt;ImageView
      android:id="@+id/image"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:layout_centerHorizontal="true"
      android:layout_centerVertical="true"
      android:scaleType="centerCrop" /&gt;
  
  &lt;TextView
      android:id="@+id/label"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:layout_alignParentBottom="true"
      android:layout_centerHorizontal="true"
      android:background="@drawable/label_bg"
      android:gravity="center"
      android:padding="8dp"
      android:textAppearance="?android:attr/textAppearanceSmallInverse"
      android:visibility="gone" /&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>title layout</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;TextView xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="match_parent"
  android:layout_height="wrap_content"
  android:layout_alignParentBottom="true"
  android:layout_centerHorizontal="true"
  android:background="@drawable/label_bg"
  android:gravity="center"
  android:padding="8dp"
  android:textAppearance="?android:attr/textAppearanceSmallInverse"
  android:visibility="gone" /&gt;
  </code></pre>