More Related Content
Similar to Iosched読書会向け資料
Similar to Iosched読書会向け資料 (18)
Iosched読書会向け資料
- 2. 機能概要
• Google I/O 2011 スケジュール閲覧
• セッションの詳細とスピーカー情報の閲覧
• セッションとサンドボックスの評価
• リアルタイムの buzz 情報の閲覧
• カンファレンス地図を利用したガイド
• Catch を利用したノート作成・管理
- 13. 中身をざっとみた雑感
• Honycombで Activity + Fragment のアプリを作ったことが
ないため、違和感あり
– 3.0以上では、Activity+Fragment
– 2.3以下では、FragmentActivity + Fragment
• 互換ライブラリの準備が必要
• iosched のビルドにも必要
– 1画面 1Activity に慣れているAndroid開発者はつらそう
– tabletの1Activity 複数Fragmentからみたほうがよかったかも
• 端末がないからイメージできず・・・
• これをベースに他のイベント向けスケジュールアプリ作るの
は、意外と時間がかかりそう
– phone向けのみで Fragment 利用無し版があればいいのに・・・
– でも、CEATECなどでは両対応のものを提供してもらいたい
- 17. AndroidManifest.xml(2/?)
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.USE_CREDENTIALS" />
<uses-permission
android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application
android:label="@string/app_name"
android:icon="@drawable/ic_launcher"
android:logo="@drawable/title_logo"
android:theme="@style/Theme.IOSched"
android:hardwareAccelerated="true">
- 19. AndroidManifest.xml(3/?)
<!-- Used for install referrer tracking -->
<receiver
android:name="com.google.android.apps.analytics.AnalyticsReceiver"
android:exported="true">
<intent-filter>
<action android:name="com.android.vending.INSTALL_REFERRER" />
</intent-filter>
</receiver>
<!-- Other manifest items -->
<meta-data
android:name="android.app.default_searchable"
android:value=".ui.SearchActivity" />
<service android:name=".service.SyncService" />
<provider
android:name=".provider.ScheduleProvider"
android:authorities="com.google.android.apps.iosched"
android:writePermission="com.google.android.apps.iosched.permission.WRITE_SCHEDULE" />
Google Analytics向け
インストール数計算?
- 21. Activity 一覧
• Common Activity
– .ui.HomeActivity
– .ui.BulletinActivity
– .ui.TagStreamActivity
– .ui.StarredActivity
– .ui.SearchActivity
• For Phone
– .ui.phone.ScheduleActivity
– .ui.phone.TracksActivity
– .ui.phone.SessionsActivity
– .ui.phone.SessionDetailActivity
– .ui.phone.VendorsActivity
– .ui.phone.VendorDetailActivity
– .ui.phone.MapActivity
• For Tablet
– .ui.tablet.SessionsMultiPaneActivity
– .ui.tablet.VendorsMultiPaneActivity
– .ui.tablet.ScheduleMultiPaneActivity
– .ui.tablet.MapMultiPaneActivity
– .ui.tablet.NowPlayingMultiPaneActivity
- 22. Activity 一覧
• Common Activity
– .ui.HomeActivity
• intent-filter
– android.intent.action.MAIN
– android.intent.category.LAUNCHER
– .ui.BulletinActivity
– .ui.TagStreamActivity
– .ui.StarredActivity
– .ui.SearchActivity
• android:launchMode="singleTop“
• intent-filter
– android.intent.action.SEARCH
– android.intent.category.DEFAULT
• <meta-data android:name="android.app.searchable"
android:resource="@xml/searchable" />
- 23. Activity 一覧
• For Phone
– .ui.phone.ScheduleActivity
– .ui.phone.TracksActivity
– .ui.phone.SessionsActivity
– .ui.phone.SessionDetailActivity
– .ui.phone.VendorsActivity
– .ui.phone.VendorDetailActivity
– .ui.phone.MapActivity
- 28. .ui.HomeActivity
• トップページで、phone と tablet で異なるレイアウト
– Phone
• ダッシュボード(DashboardFragment)
– tablet
• ダッシュボード(DashboardFragment)
• Stream(TagStreamFragment)
• Layout
– activity_home.xml
• [include] actionbar.xml
– [include] colorstrip.xml
• [fragment] DashboradFragment
– layout/fragment_dashboard.xml
• [fragment] WhatsOnFragment
– layout/fragment_whats_on
• 疑問
– Actionbarのデザインや機能は誰が設定しているか?
• *Fragment の中で Honycomb かどうかを判断して、View を構築し、onCreateView()の返
り値として、そのview として返すことによって画面を作成
- 30. WhatsOnFragment
• layout
– R.layout.fragment_whats_on
• <LinearLayout>のみ horizontal
• 第1要素
– 3パターンの文言表示
• Google IO 開催前
– R.layout.whats_on_countdown
– カウントダウンタイマー
– 残り時間、日数を表示
• 開催中
– R.layout.whats_on_now_playing
– Now Playing(リンク設定)
» Honycombの場合:NowPlayingMultiPaneActivity へのリンク
» phoneの場合:現在開催中のScheduleContract へのリンク
• 開催後
– R.layout.whats_on_thank_you
» @string/whats_on_thank_you_title
» you next year!
• 参考情報
– UIUtils
» public static final long CONFERENCE_START_MILLIS = ParserUtils.parseTime("2011-05-10T09:00:00.000-
07:00");
» public static final long CONFERENCE_END_MILLIS = ParserUtils.parseTime("2011-05-11T17:30:00.000-07:00");
• 第2要素
– phoneのみ
• R.layout.whats_on_stream
– 文言:Realtime¥nStream
– TagStreamActivity へのリンク
第1 第2
- 31. Fragment系クラス
• Fragment の派生クラス
– .ui
• BulletinFragment
• DashboardFragment
• MapFragment
• ScheduleFragment
• SessionDetailFragment
• SessionsFragment
• TagStreamFragment
• TracksFragment
• VendorDetailFragment
• VendorsFragment
• WhatsOnFragment
– .ui.tablet
• TracksDropdownFragment