In the getView code, when I returned the super call, it was blank
text.  When I returned a row as you did in your example, it would show
the text in gray/white.  Trying everything to change the color results
in no change.  If I want to change the text color should I uses
SetBackgroundColor or SetTextColor? Also, do I need to dork with the
adapter in the main class to invoke getView?  It looks from your
example I don't need to do that.  Lastly, this approach seems to get
all the text to be the same color once I get it working.  Any idea if
I can set individual line item colors?

On Thu, Jan 5, 2012 at 11:01 AM, Mark Murphy <[email protected]> wrote:
> If the TextView is truly invisible, you need to make it visible, using
> setVisibility().
>
> Otherwise, use Hierarchy View to examine your UI and see what is going on:
>
> http://developer.android.com/guide/developing/debugging/debugging-ui.html
>
> On Thu, Jan 5, 2012 at 10:57 AM, John Davis <[email protected]> wrote:
>> I changed the getview code so it only calls the super code once and
>> returns the rowView as you did.
>>
>>>
>>> public class MyAdapter<T> extends ArrayAdapter<T> {
>>>
>>>        public MyAdapter(Context context, int textViewResourceId, T[] 
>>> objects) {
>>>                super(context, textViewResourceId, objects);
>>>        }
>>>        // context, int, <T>[]
>>>
>>>        @Override
>>>        public View getView(int position, View convertView, ViewGroup 
>>> parent) {
>>>                // TODO Auto-generated method stub
>>>                View rowView;
>>>            rowView = super.getView(position, convertView, parent);
>>>            ((TextView)rowView).setTextColor(0x64788e);
>>>                return rowView;
>>>        }
>>>
>>>
>>
>> And removed the code in the main class to dork with the view.  It is
>> still invisible text.  I was assuming this code would make all the
>> text items be red in color.  I really want to be able to set certain
>> lines to red and others to blue.
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to [email protected]
>> To unsubscribe from this group, send email to
>> [email protected]
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>
>
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://github.com/commonsguy
> http://commonsware.com/blog | http://twitter.com/commonsguy
>
> Warescription: Three Android Books, Plus Updates, One Low Price!
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en



-- 
John F. Davis

独树一帜

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to