ユーザインターフェイス



[参考URL]

・User Interface

http://developer.android.com/guide/topics/ui/index.html

・Notifying the User

http://developer.android.com/guide/topics/ui/notifiers/index.html

Several types of situations may arise that require you to notify the user about an event that occurs in your application. Some events require the user to respond and others do not.

* A Toast Notification, for brief messages that come from the background.
* A Status Bar Notification, for persistent reminders that come from the background and request the user's response.
* A Dialog Notification, for Activity-related notifications.

・Applying Styles and Themes

http://developer.android.com/guide/topics/ui/themes.html

・ListView

http://developer.android.com/guide/tutorials/views/hello-listview.html
http://developer.android.com/resources/tutorials/views/hello-listview.ht...

・Input Events

http://developer.android.com/guide/topics/ui/index.html#Events

Once you've added some Views/widgets to the UI, you probably want to know about the user's interaction with them, so you can perform actions. To be informed of user input events, you need to do one of two things:

* Define an event listener and register it with the View. More often than not, this is how you'll listen for events. The View class contains a collection of nested interfaces named OnListener, each with a callback method called On(). For example, View.OnClickListener (for handling "clicks" on a View), View.OnTouchListener (for handling touch screen events in a View), and View.OnKeyListener (for handling device key presses within a View). So if you want your View to be notified when it is "clicked" (such as when a button is selected), implement OnClickListener and define its onClick() callback method (where you perform the action upon click), and register it to the View with setOnClickListener().

* Override an existing callback method for the View. This is what you should do when you've implemented your own View class and want to listen for specific events that occur within it.

・Event Listeners

http://developer.android.com/guide/topics/ui/ui-events.html#EventListene...

・Event Handlers

http://developer.android.com/guide/topics/ui/ui-events.html#EventHandler...