• Uncategorized
  • 0

4.1: Using Keyboards, Input Controls, Alerts, and Pickers

Task 1. Experiment with text entry keyboard attributes

1.1 Create the main layout and the showText method

   

1.2 Set the keyboard to capitalize sentences

1.3 Set the keyboard to hide a password when entering it

Task 2. Change the keyboard type

2.1 Use an email keyboard

2.2 Use a phone keypad

3.1 Copy the KeyboardSamples project and modify the layout

lakukan pencopy-an file KeyboardSample dan ubah nama menjadi PhoneNumberSpiner, lalu lakukan refactor terhadap file

setelah refactor dan lain-lain berhasil maka langkah selanjutnya lihat pada gambar dibawah

3.2 Add code to activate the spinner and its listener

3.3 Add code to respond to the user’s selections

Task 4. Use a dialog for an alert requiring a decision

4.1 Create a new project with a layout to show an alert dialog

4.2 Add an alert dialog to the main activity

Task 5. Use a picker for user input

5.1 Create the main activity layout

5.2 Create a new fragment for the date picker

5.3 Create a new fragment for the time picker

5.4 Modify the main activity

5.5 Use the chosen date and time

Task 6: Use image views as buttons

6.1 Start the new project

 

6.2 Add the images

6.3 Add onClick methods for the image views

Task 7: Use radio buttons

7.1 Add another activity

7.2 Add the layout for radio buttons

7.3 Add the radio button click handler

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *