We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🖥️ 詳細画面を追加してメイン画面から遷移できるようにします
Note
以下の条件を満たす範囲で自由にレイアウトを組んでください
Tip
リスト表示にはRecyclerViewもしくはListViewを利用します
リストの各要素に表示する
Fragmentを追加したり、移動するにはFragmentManagerを利用します。戻るボタンで元の画面に遷移できよう、BackStackにトランザクションを積んでおきましょう。
Warning
Fragmentのコンストラクタに引数を渡す方法は正しく動作しない場合があります。Activity同様にFragmentもAndroidシステムによって破棄&再生成される場合がありますが、再生成時は引数なしコンストラクタが呼ばれるためデータが失われてしまいます😰
代わりにBundleを利用します
val fragment = YourFragment().apply { arguments = bundleOf( "key" to "value", ) }
天気予報のリスト表示は空もしくはダミーデータで大丈夫です
The text was updated successfully, but these errors were encountered:
No branches or pull requests
🖥️ 詳細画面を追加してメイン画面から遷移できるようにします
Note
Required(先に完了させましょう)
Next(次に取り組みましょう)
Viewで天気予報を表示する #28
課題内容
詳細画面のレイアウト
以下の条件を満たす範囲で自由にレイアウトを組んでください
Tip
リスト表示にはRecyclerViewもしくはListViewを利用します
リストの各要素に表示する
Fragmentの画面遷移
Fragmentを追加したり、移動するにはFragmentManagerを利用します。戻るボタンで元の画面に遷移できよう、BackStackにトランザクションを積んでおきましょう。
Fragmentに引数を渡す
Warning
Fragmentのコンストラクタに引数を渡す方法は正しく動作しない場合があります。Activity同様にFragmentもAndroidシステムによって破棄&再生成される場合がありますが、再生成時は引数なしコンストラクタが呼ばれるためデータが失われてしまいます😰
代わりにBundleを利用します
完成イメージ
天気予報のリスト表示は空もしくはダミーデータで大丈夫です
参考資料
The text was updated successfully, but these errors were encountered: