Android Open Source - NPlayer Adapter Utils






From Project

Back to project page NPlayer.

License

The source code is released under:

Apache License

If you think the Android project NPlayer listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.qinxiandiqi.utils;
//  w ww. j  a va 2 s.  c  o  m
import android.widget.ImageView;

import com.qinxiandiqi.nplayer.R;

public class AdapterUtils {

  public static ImageView setImageView(int position, int palyingCode,
      int palyingState, ImageView image, int defaultimage) {
    if (position == palyingCode) {
      switch (palyingState) {
      case CodeUtils.PLAYING:
        image.setImageResource(R.drawable.playing);
        break;
      case CodeUtils.PAUSE:
        image.setImageResource(R.drawable.start);
        break;
      case CodeUtils.STOP:
        image.setImageResource(R.drawable.stop);
        break;
      default:
        break;
      }
    } else {
      image.setImageResource(defaultimage);
    }
    return image;
  }
}




Java Source Code List

com.qinxiandiqi.adapter.MusicAdapter.java
com.qinxiandiqi.adapter.VideoAdapter.java
com.qinxiandiqi.bean.MediaFile.java
com.qinxiandiqi.bean.MusicFile.java
com.qinxiandiqi.bean.VideoFile.java
com.qinxiandiqi.nplayer.MainActivity.java
com.qinxiandiqi.nplayer.MusicActivity.java
com.qinxiandiqi.nplayer.SearchActivity.java
com.qinxiandiqi.nplayer.VideoActivity.java
com.qinxiandiqi.service.MusicService.java
com.qinxiandiqi.utils.AdapterUtils.java
com.qinxiandiqi.utils.CodeUtils.java
com.qinxiandiqi.utils.FileUtils.java
com.qinxiandiqi.utils.MediaUtils.java
com.qinxiandiqi.utils.PlayingUtils.java
com.qinxiandiqi.utils.PreferenceUtils.java
com.qinxiandiqi.utils.XMLUtils.java