BVB Source Codes

The Android source code for beginners music player design and source code Show MusicSpecialView.java Source code

Return Download The Android source code for beginners music player design and source code: download MusicSpecialView.java Source code - Download The Android source code for beginners music player design and source code Source code - Type:.java
  1. package com.android.cwd;
  2.  
  3. import android.content.Context;
  4. import android.net.Uri;
  5. import android.view.LayoutInflater;
  6. import android.view.View;
  7. import android.view.ViewGroup;
  8. import android.view.animation.AnimationUtils;
  9. import android.widget.BaseAdapter;
  10. import android.widget.GridView;
  11. import android.widget.ImageView;
  12. import android.widget.TextView;
  13.  
  14. public class MusicSpecialView extends BaseAdapter {
  15.  
  16.         public Context context;
  17.         GridView gv_1;
  18.         public static MusicSpecialView msv;
  19.  
  20.         public void disPlaySpecial(GridView gv, Context context) {
  21.                 this.context = context;
  22.                 msv = new MusicSpecialView();
  23.                 this.gv_1 = gv;
  24.                 this.gv_1.setAdapter(msv);
  25.  
  26.         }
  27.  
  28.         @Override
  29.         public int getCount() {
  30.                 // TODO Auto-generated method stub
  31.                 return Music_infoAdapter.musicList.size();
  32.         }
  33.  
  34.         @Override
  35.         public Object getItem(int arg0) {
  36.                 // TODO Auto-generated method stub
  37.                 return Music_infoAdapter.musicList.get(arg0);
  38.         }
  39.  
  40.         @Override
  41.         public long getItemId(int arg0) {
  42.                 // TODO Auto-generated method stub
  43.                 return 0;
  44.         }
  45.  
  46.         @Override
  47.         public View getView(int position, View convertView, ViewGroup parent) {
  48.                 // TODO Auto-generated method stub
  49.  
  50.                 LayoutInflater lif = LayoutInflater.from(C_MusicPlayerActivity.context);
  51.                 View v = lif.inflate(R.layout.gridspecial_item, null);
  52.  
  53.                 ImageView iv;
  54.                 TextView tv1;
  55.                 TextView tv2;
  56.  
  57.                 iv = (ImageView) v.findViewById(R.id.gridspecial_view1);
  58.                 tv1 = (TextView) v.findViewById(R.id.album_xxx);
  59.                 tv2 = (TextView) v.findViewById(R.id.artist_xxx);
  60.  
  61.                 // 获取专辑图片路径
  62.                 String url = C_MusicPlayerActivity.music_info
  63.                                 .getAlbumArt(Music_infoAdapter.musicList.get(position).get_id());
  64.                 if (url != null) {
  65.                         iv.setImageURI(Uri.parse(url));
  66.                 } else {
  67.                         iv.setImageResource(R.drawable.default_album);
  68.                 }
  69.                 iv.setAnimation(AnimationUtils.loadAnimation(
  70.                                 C_MusicPlayerActivity.context, R.anim.alpha_z));
  71.  
  72.                 // 带动画显示专辑名
  73.                 tv1.setText(Music_infoAdapter.musicList.get(position).getMusicAlbum());
  74.                 tv1.setAnimation(AnimationUtils.loadAnimation(
  75.                                 C_MusicPlayerActivity.context, R.anim.alpha_y));
  76.  
  77.                 // 带动画显示歌手名
  78.                 tv2.setText(Music_infoAdapter.musicList.get(position).getMusicSinger());
  79.                 tv2.setAnimation(AnimationUtils.loadAnimation(
  80.                                 C_MusicPlayerActivity.context, R.anim.alpha_y));
  81.  
  82.                 return v;
  83.         }
  84.  
  85. }
  86.  
downloadMusicSpecialView.java Source code - Download The Android source code for beginners music player design and source code Source code
Related Source Codes/Software:
The Android source code to use baidu weather love weather program source code - What's the weather like in this project is an andr... 2016-12-31
Textview perfect display HTML code - Textview perfect display HTML code, including cust... 2016-12-31
Eliminate to bring Android game source code list diamond little game - This project is a based on android AndEngine open ... 2016-12-31
Fast sliding Android example source code letters index and prompt contact list - A simple fast sliding contact list and initials pr... 2016-12-31
The Android source Jane. Beautiful music player development program source code - This project is an open source music player progra... 2016-12-31
skeuocard - Skeuocard progressively enhances credit card input... 2016-12-31
hubot-scripts - DEPRECATED, see https://github.com/github/hubot-sc... 2016-12-31
Jcrop - Jcrop (official) - Image Cropping Plugin for jQuer... 2016-12-31
volt - A Ruby web framework where your Ruby runs on both ... 2016-12-31
touchstonejs - Mobile App Framework powered by React ... 2016-12-31
CRYENGINE - CRYENGINE is a powerful real-time game development... 2017-06-11
postal - 2017-06-11
reactide - Reactide is the first dedicated IDE for React web ... 2017-06-11
rkt - rkt is a pod-native container engine for Linux. It... 2017-06-11
uWebSockets - Tiny WebSockets https://for... 2017-06-11
realworld - TodoMVC for the RealWorld - Exemplary fullstack Me... 2017-06-11
goreplay - GoReplay is an open-source tool for capturing and ... 2017-06-10
pyenv - Simple Python version management 2017-06-10
redux-saga - An alternative side effect model for Redux apps ... 2017-06-10
angular-starter - 2017-06-10

 Back to top