Created
March 5, 2014 21:17
-
-
Save csdear/0470be20cb71d89bcae3 to your computer and use it in GitHub Desktop.
Views : ListView
ListView is a view group that displays a list of scrollable items. The list items are automatically inserted to the list using an Adapter that pulls content from a source such as an array or database query and converts each item result into a view that's placed into the list.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Override | |
| public void onCreate(Bundle savedInstanceState) { | |
| super.onCreate(savedInstanceState); | |
| //Creating an adapter to populate the listview | |
| mAdapter = new ToDoListAdapter(getApplicationContext()); | |
| // Put divider between ToDoItems and FooterView | |
| getListView().setFooterDividersEnabled(true); | |
| // Inflate footerView for footer_view.xml file | |
| TextView <<tvInstanceName>> = (TextView) getLayoutInflater().inflate(R.layout.<<XMLlayoutTextView, null); | |
| //Calling ListView.java methods. | |
| getListView().addFooterView(tvInstanceName); | |
| //TODO - Add view instance to ListView | |
| ListView lv = getListView(); | |
| lv.addFooterView(<<tvInstanceName); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment