Previous article Android LinearLayout Example has introduced how to use LinearLayout to layout and align components in android app. This article will show you an example about how to implement on touch listener and on click listener to the LinearLayout object.
On Touch Listener
There are a lot of auto-complete scenarios in the android app. For example, when you use a search engine, you input some characters in the search box then a list of search keywords will pop up. It is not difficult to achieve. This example will show you how to do this use android.widget.AutoCompleteTextView component.