Android Programming Lecture 9 Service and Broadcast Receiver
Android Programming Lecture 9 Service and Broadcast Receiver
Sample App:Music Player With A Love Like You 2
Sample App: Music Player 2
Sample App (1/7) Click on the icon and get the startup 173 Launcher activity is started by the sending of a special intent-the Launcher intent o Application Manifest declares which Java class accepts the launcher intent <activity android:name=".MainActivity" android:label="@string/app_name"> <intent-filter> <action android:name="android.intent.action.MAIN"/> <category android:name="android.intent.category.LAUNCHER"/> </intent-filter> </activity> 3
Sample App (1/7) • Click on the icon and get the startup • Launcher activity is started by the sending of a special intent – the Launcher intent o Application Manifest declares which Java class accepts the launcher intent 3
Sample App(2/7) Left side is a menu for different views The activity has a few fragments(sub- 9☑75胡 activity)for navigation Listen Now o Youtube tutorial My Library Tablet Playlists Click on Selecting an item updates Fragment B My Library Activity A contains Fragment A and Fragment B 4
Sample App (2/7) • Left side is a menu for different views • The activity has a few fragments (subactivity) for navigation o Youtube tutorial • Click on My Library 4
Lisiun Now Sample App(3/7) ● Click Albums to get into the Albums sub-activity (fragment) o Tab Ul can be easily achieved 73 介Lby using Tab Host ViewGroup A域57荐 Palette □Form Widgets Text Fields ·Click □Layouts Composite an album name ListView ExpandableList American ldiot于mercano目 ▣GridView团ScrolIView HorizontalScrollView SearchView c 2o2no ④WebView
Sample App (3/7) • Click Albums to get into the Albums sub-activity (fragment) o Tab UI can be easily achieved using Tab Host ViewGroup • Click an album name 5