Lecture 6 - Input Types, Editor Action, WebView

home | previous | next

Resources

Input Types, Editor Action

EditTexts are used to get data from users in many cases. Input types should match the data types.

Reading:
Specifying the Input Method Type
android:inputType
android:imeOptions

Exercise 6.1

Examine the layout of the screen keyboard. Execute some applications to see what kind of keyboard styles are used. There are many kinds of data types, for example, numbers, web addresses, email and so on. Study how to display the appropriate keyboard style for specific data types

Exercise 6.2

Study how Android system moves input focus from one EditText view to another EditText view when you push the 'Next' button on the screen keyboard.

Exercise 6.3

Discuss what you need when the 'Done' button is clicked. What you should do to do the next action automatically?

WebView

WebView allows you to display web pages as a part of your activity layout.

Reading:
Building Web Apps in WebView

Exercise 6.4

Run the project 'ShowWeb' and see how it works. Why do we need WebView on our activities?

Exercise 6.5

Do we need a permission to access to the Internet? Why does Android system force you to set the permission?

Exercise 6.6

If you want more control over where a clicked link load, how can you handle it? What is WebViewClient?