Accessing Widget        By       Durai. Sduraisy2k@gmail.com
XML File
Generated File
JAVA File●   Map a Widget in Java:      Class ob=(Class)findViewById(id name in xml);     ex: Button btn=(Button)findViewB...
JAVA File
Output
Create a EditText
Set data in EditText
Output
Upcoming SlideShare
Loading in...5
×

Accessing widget

110

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
110
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
2
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Accessing widget

  1. 1. Accessing Widget By Durai. Sduraisy2k@gmail.com
  2. 2. XML File
  3. 3. Generated File
  4. 4. JAVA File● Map a Widget in Java: Class ob=(Class)findViewById(id name in xml); ex: Button btn=(Button)findViewById(R.id.btn);● Toast: Notify some information to User Syntax: Toast.makeText(Context(), Text, duration).show(); Context() --> current class Text --> Message to display Duration --> duration to display LENGTH_LONG,LENGTH_SHORT
  5. 5. JAVA File
  6. 6. Output
  7. 7. Create a EditText
  8. 8. Set data in EditText
  9. 9. Output
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×