android - how to override getView() method in activity extend Listactivity -


There is a list view in my project and there is a menactivity list activity, so I use "Alt + Shift" to add method getView + S "But I'm not getting getView () in this list.

Please show me, I need call getView () method. Thanks!

getView () is a method of inventory adapters. You need to set a custom adapter in your activity to override it Ref:

  Public Class MySimpleArrayAdray Extends ArrayAdapter & lt; String & gt; {Public MySimpleArrayAdapter (reference references, string [] value) {} @ override public view getView (integer status, see convertview view, ViewGroup parent) {return rowView; }}   

In your activity:

  Crate on public void (bundle extractor) {super.onCreate (icicle); MySimpleArrayAdapter & LT; String & gt; Adapter = New MySimpleArrayAdapter & lt; String & gt; (This, android.R.layout.simple_list_item_1, value); SetListAdapter (adapter); }    

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -