Getting to Know the Android User Interface Understanding The Components Of A Screen ? An activity displays the user interface of your application, which may contain widgets such as buttons, labels, textboxes, and so on. ? Typically, you define your UI using an XML fi le (e.g., the main.xml file located in the res/layout folder of your project) During runtime, you load the XML UI in the onCreate() method handler in your Activity class, ? using the setContentView() method of the Activity class: @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); } During compilation, each element in the XML file is compiled into its equivalent Android GUI class, with attributes represented by methods. ? The Android system then creates the UI of the activity when it is loaded
Views and ViewGroups ? An activity contains views and ViewGroups . ? One or more views can be grouped together into a ViewGroup. ? A ViewGroup (which is itself a special type of view) provides the layout in which you can order the appearance and sequence of views.
المادة المعروضة اعلاه هي مدخل الى المحاضرة المرفوعة بواسطة استاذ(ة) المادة . وقد تبدو لك غير متكاملة . حيث يضع استاذ المادة في بعض الاحيان فقط الجزء الاول من المحاضرة من اجل الاطلاع على ما ستقوم بتحميله لاحقا . في نظام التعليم الالكتروني نوفر هذه الخدمة لكي نبقيك على اطلاع حول محتوى الملف الذي ستقوم بتحميله .
|