Android Open Source - i_search Custom Array Adapter






From Project

Back to project page i_search.

License

The source code is released under:

GNU General Public License

If you think the Android project i_search 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.shapes.shapes;
//from  ww w  .j  ava 2 s.  c  o m
import android.content.Context;
import android.graphics.Color;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.TextView;

public class CustomArrayAdapter<T> extends ArrayAdapter<T>
{
    public CustomArrayAdapter(Context ctx, T [] objects)
    {
        super(ctx, android.R.layout.simple_spinner_item, objects);
    }

    //other constructors

    @Override
    public View getDropDownView(int position, View convertView, ViewGroup parent)
    {
        View view = super.getView(position, convertView, parent);

        //we know that simple_spinner_item has android.R.id.text1 TextView:         

        /* if(isDroidX) {*/
            TextView text = (TextView)view.findViewById(android.R.id.text1);
            text.setTextColor(Color.BLACK);//choose your color :)         
        /*}*/

        return view;

    }
}




Java Source Code List

com.shapes.shapes.About.java
com.shapes.shapes.AnalyzeBeam2.java
com.shapes.shapes.AnalyzeColumn.java
com.shapes.shapes.Analyze.java
com.shapes.shapes.BeamAnalysis.java
com.shapes.shapes.ColumnAnalysis.java
com.shapes.shapes.CustomArrayAdapter.java
com.shapes.shapes.FeetInchesType.java
com.shapes.shapes.MainActivity.java
com.shapes.shapes.OpenHelper.java
com.shapes.shapes.Options.java
com.shapes.shapes.ResultsList.java
com.shapes.shapes.ShapeTable.java
com.shapes.shapes.Shape.java