mirror of
https://github.com/Skysamara/android-kotlin-fundamentals-apps.git
synced 2025-12-06 06:16:03 +00:00
46 lines
1.7 KiB
Markdown
46 lines
1.7 KiB
Markdown
ViewModel and ViewModelFactory - Solution Code
|
|
==================================
|
|
|
|
This is the solution code for the ViewModel and ViewModelFactory codelab.
|
|
|
|
Introduction
|
|
------------
|
|
|
|
This starter app is a two player game, GuessTheWord. It is a word guessing app you can play with one or more friends. To play, hold the device in landscape, facing away from you with your thumbs on the **Skip** and **Got It** buttons. Your friends can then give you clues to help you guess the word. If you get the word right, press **Got It**. If you're stuck, press **Skip**.
|
|
This code demostrates the Android Architecture components, ViewModel and ViewModelFactory.
|
|
|
|
Pre-requisites
|
|
--------------
|
|
|
|
You need to know:
|
|
- How to open, build, and run Android apps with Android Studio.
|
|
- How to use the Navigation Architecture Component
|
|
- Passing the data between navigation destinations.
|
|
- Read the logs using the Logcat.
|
|
|
|
|
|
Getting Started
|
|
---------------
|
|
|
|
1. Download and run the app.
|
|
|
|
License
|
|
-------
|
|
|
|
Copyright 2019 Google, Inc.
|
|
|
|
Licensed to the Apache Software Foundation (ASF) under one or more contributor
|
|
license agreements. See the NOTICE file distributed with this work for
|
|
additional information regarding copyright ownership. The ASF licenses this
|
|
file to you under the Apache License, Version 2.0 (the "License"); you may not
|
|
use this file except in compliance with the License. You may obtain a copy of
|
|
the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
License for the specific language governing permissions and limitations under
|
|
the License.
|