vivek716 / My_First_App

Android Test Application
0 stars 0 forks source link

The Playground. #1

Open vivek716 opened 9 years ago

vivek716 commented 9 years ago

public class MyActivity extends ActionBarActivity {

private ListView searchResultView;
private ArrayAdapter<String> listAdapter ;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_my);

    searchResultView = (ListView) findViewById(R.id.search_list_view);
    ArrayList<String> players = new ArrayList<String>(Arrays.asList("Keith", "Abhishek", "Vivek"));
    listAdapter = new ArrayAdapter<String>(this, R.layout.simplerow, players);
    searchResultView.setAdapter(listAdapter);

I only remember the adapter as the main guy doing all the stuff, the list view being that players list, OnCreate() being the first thing that comes up on screen when an app is opened and that it can take instances, simplerow is that other file that was created to list the results.

keith-pinto commented 9 years ago

Check my comments, https://github.com/keith-pinto/My_First_App/commit/d7619cc835a3f32a587f682c403b6f955c0ddaf6

vivek716 commented 9 years ago

Got it! That team problem we can discuss in person. Mano-e-mano. :P