Android Fourth Week homework notes

Source: Internet
Author: User

The four-week operation requirements are as follows

..... After looking at the homework requirements, and then doing a few weeks later ..... Teacher.... You're playing me, aren't you? You're playing me in the cliff?!

Forget, say more useless, come to see our practice of Jiang's aunt

First, Mainactivity.java.

 Packagecn.edu.shu.cs.android.experiment04;ImportAndroid.app.ActionBar;ImportAndroid.app.ActionBar.Tab;Importandroid.app.Activity;Importandroid.app.Fragment;ImportAndroid.app.FragmentManager;Importandroid.app.FragmentTransaction;ImportAndroid.os.Bundle;Importandroid.support.v4.widget.DrawerLayout;Importandroid.support.v7.app.ActionBarActivity;ImportAndroid.util.Log;ImportAndroid.view.LayoutInflater;ImportAndroid.view.Menu;ImportAndroid.view.MenuItem;ImportAndroid.view.View;ImportAndroid.view.ViewGroup;ImportAndroid.widget.TextView; Public classMainactivityextendsActionbaractivityImplementsNavigationdrawerfragment.navigationdrawercallbacks, Actionbar.tablistener {//Debug with Tag    Private Static FinalString TAG = "11121719"; Privatenavigationdrawerfragment mnavigationdrawerfragment; Privatecharsequence Mtitle; //used to determine which large class is currently in    Private inttitle_section; //The fragment of each tab in the mass generation    PrivateFragment mfragment_1_1 =Newfragment_1_1 (); PrivateFragment mfragment_1_2 =Newfragment_1_2 (); PrivateFragment mfragment_1_3 =Newfragment_1_3 (); PrivateFragment mfragment_2_1 =Newfragment_2_1 (); PrivateFragment mfragment_2_2 =Newfragment_2_2 (); PrivateFragment Mfragment_2_3 =NewFragment_2_3 (); PrivateFragment Mfragment_3_1 =NewFragment_3_1 (); PrivateFragment Mfragment_3_2 =NewFragment_3_2 (); PrivateFragment Mfragment_3_3 =NewFragment_3_3 (); PrivateFragment Mfragment_4_1 =NewFragment_4_1 (); PrivateFragment Mfragment_4_2 =NewFragment_4_2 (); PrivateFragment Mfragment_4_3 =NewFragment_4_3 (); @Overrideprotected voidonCreate (Bundle savedinstancestate) {} @Override Public voidOnnavigationdraweritemselected (intposition) {            }     Public voidOnsectionattached (intNumber ) {            }     Public voidRestoreactionbar () {} @Override Public BooleanOncreateoptionsmenu (Menu menu) {} @Override Public Booleanonoptionsitemselected (MenuItem item) {return Super. onoptionsitemselected (item); }     Public Static classPlaceholderfragmentextendsFragment {Private Static FinalString arg_section_number = "Section_number";  Public StaticPlaceholderfragment newinstance (intSectionnumber) {        }         Publicplaceholderfragment () {} @Override PublicView Oncreateview (layoutinflater inflater, ViewGroup container, Bundle savedinstancestate) {
    } @Override Public voidOnattach (activity activity) {}} @Override Public voidontabreselected (Tab tab, fragmenttransaction ft) {}/*** Check the event listener at tab to determine which fragment to overwrite*/@Override Public voidontabselected (Tab tab, fragmenttransaction ft) {} @Override Public voidontabunselected (Tab tab, fragmenttransaction ft) {}}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.