Android Open Source - andrioidaudiostream Stream Station Spinner Adapter






From Project

Back to project page andrioidaudiostream.

License

The source code is released under:

GNU General Public License

If you think the Android project andrioidaudiostream 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.speakingcode.android.media.mediaplayer;
/*from  w  ww.j av a2 s .  c  o  m*/
import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.TextView;

/**
 *
 */
public class StreamStationSpinnerAdapter extends ArrayAdapter<StreamStation> {
    int mTextViewResourceId;
    Context mContext;

    /**
     * @param context
     * @param textViewResourceId
     */
    public StreamStationSpinnerAdapter(Context context, int textViewResourceId) {
        super(context, textViewResourceId);
        this.mTextViewResourceId = textViewResourceId;
        mContext = context;
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        TextView tv = (TextView)(super.getView(position, convertView, parent));
        tv.setText(getItem(position).getStationLabel());
        return tv;
    }

    @Override
    public View getDropDownView(int position, View convertView, ViewGroup parent) {
        TextView tv = (TextView)(super.getDropDownView(position, convertView, parent));
        tv.setText(getItem(position).getStationLabel());
        return tv;
    }
}




Java Source Code List

com.speakingcode.android.media.mediaplayer.IMediaPlayerServiceClient.java
com.speakingcode.android.media.mediaplayer.IMediaPlayerThreadClient.java
com.speakingcode.android.media.mediaplayer.MediaPlayerService.java
com.speakingcode.android.media.mediaplayer.MediaPlayerThread.java
com.speakingcode.android.media.mediaplayer.StatefulMediaPlayer.java
com.speakingcode.android.media.mediaplayer.StreamStationSpinnerAdapter.java
com.speakingcode.android.media.mediaplayer.StreamStation.java
com.speakingcode.audiostream.ApplicationTest.java
com.speakingcode.audiostream.CONSTANTS.java
com.speakingcode.audiostream.MainActivity.java