What to learn: Viewpager and Dialogs components
====viewpager components = = = =
Its role is mainly to support the screen left and right sliding switch list elements, using the following:
1. First define the ID number information, create the Res/values/ids.xml, add the following content:
<?xml version= "1.0" encoding= "Utf-8"?>
<resources xmlns:android= "Http://schemas.android.com/apk/res/android" >
<item type= "id" name= "viewpager"/>
</resources>
This ID number is used for the SetId method of the Viewpager class, such as Mviewpager.setid (R.id.viewpager)
2.ViewPager class, you also need to use the Pageradapter class to get the data of the model layer, usually using the
Framentstatepageradaper class, the default needs to implement two methods GetCount, GetItem, it should be noted that Viewpager is always displayed after the default open
Get the first element from the Pageradapter Class!
3. Another Pageradapter class is Fragmentpageradapter, which differs from framentstatepageradaper in that
Framentstatepageradaper will destroy the list element objects that are not needed, save memory!
====dialogs components = = = =
Its role is to get input, or prompt the user some information, generally inherit the Dialogfragment class, will use the fragment class, it is not unfamiliar!
Need to understand the interaction between the fragment components again, I have two mobile phones and tablets, and later to fill up!
Android Learning-Seventh Day