The R class just contains values. You always need to inflate to get the actual view. However, sometimes this is done automatically, for instance when you call setContentView(R.layout.main). After that you can access inflated views using findViewById() etc.
On 24 mar, 09:09, asdf <[email protected]> wrote: > for example,i want to get a view object in java file.there are two > ways:inflate view and R.id.view.what`t the difference between them.and > when to use them. > thanks -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

