Android Open Source - MP3QuranForAndriod Reciter Item Adapter






From Project

Back to project page MP3QuranForAndriod.

License

The source code is released under:

You Can use all this project files for free only if you plan to create any islamic application ... This project is for any Islamic purpose....

If you think the Android project MP3QuranForAndriod 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.mos7af.mp3quran;
//from www  . ja v a2  s. co  m
import java.util.ArrayList;
import java.util.HashMap;



import android.app.Activity;
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;

public class ReciterItemAdapter extends BaseAdapter {
    
    private Activity activity;
    private ArrayList<HashMap<String, String>> data;
    private static LayoutInflater inflater=null;
    public ImageLoader imageLoader; 
    
    public ReciterItemAdapter(Activity a, ArrayList<HashMap<String, String>> _source) {
        activity = a;
        data=_source;
        inflater = (LayoutInflater)activity.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
        imageLoader=new ImageLoader(activity.getApplicationContext());
    }

    public int getCount() {
        return data.size();
    }

    public Object getItem(int position) {
        return position;
    }

    public long getItemId(int position) {
        return position;
    }
    
    public View getView(int position, View convertView, ViewGroup parent) {
        View vi=convertView;
        if(convertView==null)
            vi = inflater.inflate(R.layout.ly_reciter_item, null);

        TextView reciterNameAr = (TextView)vi.findViewById(R.id.title); 
        TextView reciterNameEn = (TextView)vi.findViewById(R.id.artist); 
        ImageView thumb_image=(ImageView)vi.findViewById(R.id.list_image);
        
        HashMap<String, String> sura = new HashMap<String, String>();
        sura = data.get(position);
        
        reciterNameAr.setText(sura.get("reciterNameAr"));
        reciterNameEn.setText(sura.get("reciterNameEn"));
        imageLoader.DisplayImage(sura.get("reciterImage"), thumb_image);
        return vi;
    }
}




Java Source Code List

com.mos7af.mp3quran.DatabaseHandler.java
com.mos7af.mp3quran.FileCache.java
com.mos7af.mp3quran.IconContextMenu.java
com.mos7af.mp3quran.ImageLoader.java
com.mos7af.mp3quran.MP3Quran.java
com.mos7af.mp3quran.MemoryCache.java
com.mos7af.mp3quran.PlayListSurasActivity.java
com.mos7af.mp3quran.PlayerActivity.java
com.mos7af.mp3quran.PlayerPlayListActivity.java
com.mos7af.mp3quran.PlayerPlaylistItemAdapter.java
com.mos7af.mp3quran.PlaylistActivity.java
com.mos7af.mp3quran.PlaylistItemAdapter.java
com.mos7af.mp3quran.ReciterItemAdapter.java
com.mos7af.mp3quran.RecitersActivity.java
com.mos7af.mp3quran.SuraItemAdapter.java
com.mos7af.mp3quran.SurasActivity.java
com.mos7af.mp3quran.SuraslistManager.java
com.mos7af.mp3quran.Utilities.java
com.mos7af.mp3quran.Utils.java
com.mos7af.mp3quran.XMLParser.java