Info

tummimmmftw-, tfisifcw^as i>»JJ£ " a2t#ff«r, ft* onCreate I» £3», «WiPTWSs

^Override public void onCreate{Bundle savedlnstanceState) ( super.onCreate(savedlnstanceState); setContent.View {R. layout .main) ;

setTitle(R.string.app title); }

h&fWiHfgS'Y1-, W\l setContcntVicw W'sii main (|«J layout, pittffl setTitle &&

Fti'18. ftifJfTK main.xml IftfW.

<?xml version="l.0" encoding="utf-8w?>

<LinearLayout xmlns:android="h11p://schemas.android.com/a p k/res/andro id" aridrbid: orientation "vertical " android : layout _width="f ill__parent" android:layout height="fill_parent">

<TextView android: layout wid'_h="wrap_ content:" android:layout height="wrap_content" andrpid:gravity="center vertica1" android:background-"(?drawable/iogo" />

<TextView android:layout width="fill parent" android:paddingTop "14dip"

android:layout_height="wrap_content" android:text="@string/app desc" android:textSize="16sp" />

l-ifi^Pi^/tlLinearLayout^,

& onCreateOptionsMenu, '&0M Willi F0M<:

// ffltett** @Override public boolean onCreateOptionsMenu(Menu menu) ( super.onCreateOptionsMenu(menu); menu.add{0, MENU START, 0, R.string.menu start) .setlcon(R.drawable.menustart) .setAlphabeticShortcut('S');

menu.add{0, MENU_HELP, 0, R.string.menu_helps) .setlcon ( R.drawable.helps) .setAlphabeticShortcut ( ' H ') ;

return true; )

l^cM^'V1-. MENU START fllMENU HELP, K^tfitffjnfl^A'fi-in Ks n 15 * Android -SS&gJi!»»»

@Override public boolean onOptionsltemSelected (Menultem item) { Intent intent - new Intent 0; switch (item.getltemid()) | case MENU START:

intent.setClass(Main.this, Auth.class); startActivity(intent); return true; case MENU HELP:

intent.setClass(Main.this, Helps.class); startActivity(intent) ; break; \

return true; }

hiXblhffr>T<» saffltt'r1 MENU START HjBtfc, »JJS*S Auth.class X*]'hVfKj Activity; / MENU HELP. Helps, class Activity a

/JIIA -mttttflMiHS:2?. LL/IJ^etftifc 15-4 i?f/j<o

Q^tfiO 2:10 PM1

YOtO: fcJWFtoB.'i.DNA1

0 0

Post a comment