Abstract public class extends
Abstract makeMeAnAdapter
Private static final
Private static final
Private static final
New
Public onCreate
Super onCreate
SetContentView
FindViewById
Try
GetResources getXml
While getEventType
If getEventType
If getName equals
Add getAttributeValue
Next
Catch
Toast
MakeText this toString show
SetDefaultKeyMode
OnNewIntent getIntent
Public onNewIntent
MakeMeAnAdapter
If null
Finish
Else
SetListAdapter
Public onListItemClick
SetText get toString
Public onCreateOptionsMenu
Add
SetIcon
Add
SetIcon setAlphabeticShortcut
Add
SetIcon setAlphabeticShortcut
Return super onCreateOptionsMenu
Public onOptionsItemSelected
Switch getItemId
Case
OnSearchRequested
Return true
Case
StartSearch null false null true
Return true
Case
Finish
Return true
Return super onOptionsItemSelected
This activity takes care of everything related to showing a list of words, even loading the words out of the XML resource. What it does not do is come up with the to put into the – that is delegated to the subclasses.
The main activity – – just uses a for the whole word list:
Package
Import
Import
Import
Public class extends
MakeMeAnAdapter
Дата добавления: 2015-05-16; просмотров: 784;