diff --git a/.github/workflows/generate-aab.yml b/.github/workflows/generate-aab.yml
new file mode 100644
index 00000000..c66353a1
--- /dev/null
+++ b/.github/workflows/generate-aab.yml
@@ -0,0 +1,47 @@
+name: "Generate AAB"
+
+on:
+ push:
+ branches:
+ - release/*
+ paths-ignore:
+ - docs/**
+ - README.md
+ - LICENSE
+
+jobs:
+ generate-aab:
+ runs-on: ubuntu-latest
+ steps:
+ # チェックアウト
+ - uses: actions/checkout@v2
+
+ # JDKのセットアップ
+ - name: set up JDK 1.8
+ uses: actions/setup-java@v1
+ with:
+ java-version: 1.8
+
+ # 依存関係の出力
+ - name: Displays the Android dependencies of the project
+ run: ./gradlew androidDependencies
+
+ # キーストアのデコード
+ - name: Decode Keystore
+ run: echo ${{ secrets.ENCODED_RELEASE_KEYSTORE }} | base64 --decode > ./app/release.keystore
+
+ # AABの生成
+ - name: Generate AAB
+ run: ./gradlew :app:bundleRelease
+ env:
+ RELEASE_KEYSTORE_STORE_PASSWORD: ${{ secrets.RELEASE_KEYSTORE_STORE_PASSWORD }}
+ RELEASE_KEYSTORE_KEY_PASSWORD: ${{ secrets.RELEASE_KEYSTORE_KEY_PASSWORD }}
+
+ # AABのアップロード
+ - name: Upload AAB Artifact
+ uses: actions/upload-artifact@v2
+ with:
+ name: aab
+ path: app/build/outputs/bundle/release/app-release.aab
+ if-no-files-found: error
+
diff --git a/.gitignore b/.gitignore
index 59edce09..a2c7f4e3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,12 +1,24 @@
*.iml
.gradle
/local.properties
-/.idea/caches
-/.idea/libraries
-/.idea/modules.xml
-/.idea/workspace.xml
-/.idea/navEditor.xml
-/.idea/assetWizardSettings.xml
+
+# User-specific configurations
+.idea/caches/
+.idea/dictionaries/**
+!.idea/dictionaries/Project.xml
+.idea/libraries/
+.idea/shelf/
+.idea/scopes/scope_settings.xml
+.idea/assetWizardSettings.xml
+.idea/compiler.xml
+.idea/gradle.xml
+.idea/jarRepositories.xml
+.idea/misc.xml
+.idea/modules.xml
+.idea/navEditor.xml
+.idea/tasks.xml
+.idea/workspace.xml
+
.DS_Store
/build
/captures
diff --git a/.idea/dictionaries/kawaguchi_m.xml b/.idea/dictionaries/Project.xml
similarity index 77%
rename from .idea/dictionaries/kawaguchi_m.xml
rename to .idea/dictionaries/Project.xml
index 8cad093d..21a56741 100644
--- a/.idea/dictionaries/kawaguchi_m.xml
+++ b/.idea/dictionaries/Project.xml
@@ -1,8 +1,10 @@
-
+
cardview
crashlytics
+ dancingmonster
+ fileprovider
firestore
imageview
initializers
@@ -14,7 +16,8 @@
theuhooi
uhooi
uhooipicbook
+ viewmodel
viewmodels
-
\ No newline at end of file
+
diff --git a/.idea/gradle.xml b/.idea/gradle.xml
deleted file mode 100644
index 5cd135a0..00000000
--- a/.idea/gradle.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml
deleted file mode 100644
index a5f05cd8..00000000
--- a/.idea/jarRepositories.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
deleted file mode 100644
index 37a75096..00000000
--- a/.idea/misc.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/README.md b/README.md
index 0cb61715..458e8ed2 100644
--- a/README.md
+++ b/README.md
@@ -14,15 +14,23 @@ UhooiPicBook-Android is Uhooi's character book for Android.
### Light
-|MonsterList|MonsterDetail|
+|MonsterList|MonsterDetail|DancingMonster|
+|:--|:--|:--|
+||||
+
+|Menu opened in MonsterList|Licenses|
|:--|:--|
-|||
+|||
### Dark
-|MonsterList|MonsterDetail|
+|MonsterList|MonsterDetail|DancingMonster|
+|:--|:--|:--|
+||||
+
+|Menu opened in MonsterList|Licenses|
|:--|:--|
-|||
+|||
## Development
@@ -30,7 +38,7 @@ You can develop UhooiPicBook-Android.
### Environment
-- Android Studio: 4.0.0
+- Android Studio: 4.1.2
### Configuration
diff --git a/app/build.gradle b/app/build.gradle
index 74c321b4..ce77406d 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -1,12 +1,16 @@
-apply plugin: 'com.android.application'
-apply plugin: 'kotlin-android'
-apply plugin: 'kotlin-android-extensions'
-apply plugin: 'androidx.navigation.safeargs.kotlin'
-apply plugin: 'com.google.gms.google-services'
-apply plugin: 'com.google.firebase.crashlytics'
-apply plugin: 'com.google.firebase.firebase-perf'
-apply plugin: 'io.gitlab.arturbosch.detekt'
-apply plugin: 'kotlin-kapt'
+plugins {
+ id 'com.android.application'
+ id 'kotlin-android'
+ id 'kotlin-android-extensions'
+ id 'androidx.navigation.safeargs.kotlin'
+ id 'com.google.gms.google-services'
+ id 'com.google.firebase.crashlytics'
+ id 'com.google.firebase.firebase-perf'
+ id 'io.gitlab.arturbosch.detekt'
+ id 'kotlin-kapt'
+ id 'com.google.android.gms.oss-licenses-plugin'
+ id 'dagger.hilt.android.plugin'
+}
android {
compileSdkVersion 29
@@ -16,8 +20,8 @@ android {
applicationId "com.theuhooi.uhooipicbook"
minSdkVersion 26
targetSdkVersion 29
- versionCode 4
- versionName "1.3.0"
+ versionCode 5
+ versionName "1.4.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
@@ -52,19 +56,26 @@ android {
buildFeatures {
dataBinding = true
}
+
+ compileOptions {
+ sourceCompatibility JavaVersion.VERSION_1_8
+ targetCompatibility JavaVersion.VERSION_1_8
+ }
+
}
dependencies {
- def coil_version = '0.13.0'
+ def coil_version = '1.1.1'
implementation "io.coil-kt:coil:$coil_version"
implementation "io.coil-kt:coil-base:$coil_version"
+ implementation "io.coil-kt:coil-gif:$coil_version"
// Firebase
- implementation 'com.google.firebase:firebase-analytics-ktx:17.5.0'
- implementation 'com.google.firebase:firebase-crashlytics-ktx:17.2.2'
- implementation 'com.google.firebase:firebase-firestore-ktx:21.7.0'
- implementation 'com.google.firebase:firebase-messaging:20.3.0'
- implementation 'com.google.firebase:firebase-perf:19.0.9'
+ implementation 'com.google.firebase:firebase-analytics-ktx:18.0.2'
+ implementation 'com.google.firebase:firebase-crashlytics-ktx:17.3.1'
+ implementation 'com.google.firebase:firebase-firestore-ktx:22.0.2'
+ implementation 'com.google.firebase:firebase-messaging:21.0.1'
+ implementation 'com.google.firebase:firebase-perf:19.1.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
@@ -80,14 +91,23 @@ dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.core:core-ktx:1.3.2'
- implementation 'androidx.constraintlayout:constraintlayout:2.0.1'
+ implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
- implementation 'com.google.android.material:material:1.2.1'
+ implementation 'com.google.android.material:material:1.3.0'
+
+ implementation "com.google.dagger:hilt-android:$rootProject.hilt_version"
+ kapt "com.google.dagger:hilt-android-compiler:$rootProject.hilt_version"
+
+ implementation "com.google.android.gms:play-services-oss-licenses:17.0.0"
testImplementation 'org.robolectric:robolectric:4.3.1'
testImplementation 'androidx.test:runner:1.3.0'
}
+kapt {
+ correctErrorTypes = true
+}
+
detekt {
failFast = true
buildUponDefaultConfig = true
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index abbd8a81..7760895f 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -16,7 +16,8 @@
android:theme="@style/Theme.UhooiPicBook">
+ android:screenOrientation="portrait"
+ android:theme="@style/Theme.UhooiPicBook.NoActionBar">
diff --git a/app/src/main/java/com/theuhooi/uhooipicbook/MainActivity.kt b/app/src/main/java/com/theuhooi/uhooipicbook/MainActivity.kt
index 8511ddf2..263d7be5 100644
--- a/app/src/main/java/com/theuhooi/uhooipicbook/MainActivity.kt
+++ b/app/src/main/java/com/theuhooi/uhooipicbook/MainActivity.kt
@@ -12,7 +12,9 @@ import com.theuhooi.uhooipicbook.extensions.IntColorInterface
import com.theuhooi.uhooipicbook.modules.monsterlist.MonsterListFragment
import com.theuhooi.uhooipicbook.modules.monsterlist.MonsterListFragmentDirections
import com.theuhooi.uhooipicbook.modules.monsterlist.entities.MonsterItem
+import dagger.hilt.android.AndroidEntryPoint
+@AndroidEntryPoint
class MainActivity : AppCompatActivity(), MonsterListFragment.OnListFragmentInteractionListener,
IntColorInterface {
diff --git a/app/src/main/java/com/theuhooi/uhooipicbook/UhooiPicBookApp.kt b/app/src/main/java/com/theuhooi/uhooipicbook/UhooiPicBookApp.kt
index 4eb33b39..75cf42a3 100644
--- a/app/src/main/java/com/theuhooi/uhooipicbook/UhooiPicBookApp.kt
+++ b/app/src/main/java/com/theuhooi/uhooipicbook/UhooiPicBookApp.kt
@@ -4,7 +4,16 @@ import android.app.Application
import android.app.NotificationChannel
import android.app.NotificationManager
import android.content.Context
+import android.os.Build
+import coil.Coil
+import coil.ImageLoader
+import coil.decode.GifDecoder
+import coil.decode.ImageDecoderDecoder
+import coil.util.CoilUtils
+import dagger.hilt.android.HiltAndroidApp
+import okhttp3.OkHttpClient
+@HiltAndroidApp
class UhooiPicBookApp : Application() {
// region View Life-Cycle Methods
@@ -12,6 +21,7 @@ class UhooiPicBookApp : Application() {
override fun onCreate() {
super.onCreate()
createNotificationChannels()
+ initializeCoilImageLoader()
}
// endregion
@@ -48,6 +58,24 @@ class UhooiPicBookApp : Application() {
}
}
+ private fun initializeCoilImageLoader() {
+ val imageLoader = ImageLoader.Builder(this)
+ .okHttpClient {
+ OkHttpClient.Builder()
+ .cache(CoilUtils.createDefaultCache(this))
+ .build()
+ }
+ .componentRegistry {
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
+ add(ImageDecoderDecoder())
+ } else {
+ add(GifDecoder())
+ }
+ }
+ .build()
+ Coil.setImageLoader(imageLoader)
+ }
+
// endregion
}
diff --git a/app/src/main/java/com/theuhooi/uhooipicbook/di/AppModule.kt b/app/src/main/java/com/theuhooi/uhooipicbook/di/AppModule.kt
new file mode 100644
index 00000000..c6770b21
--- /dev/null
+++ b/app/src/main/java/com/theuhooi/uhooipicbook/di/AppModule.kt
@@ -0,0 +1,17 @@
+package com.theuhooi.uhooipicbook.di
+
+import com.theuhooi.uhooipicbook.modules.monsterlist.MonstersRepository
+import com.theuhooi.uhooipicbook.repository.monsters.firebase.MonstersFirestoreClient
+import dagger.Binds
+import dagger.Module
+import dagger.hilt.InstallIn
+import dagger.hilt.components.SingletonComponent
+import javax.inject.Singleton
+
+@Module
+@InstallIn(SingletonComponent::class)
+abstract class AppModule {
+ @Singleton
+ @Binds
+ abstract fun bindMonstersRepository(monstersFirestoreClient: MonstersFirestoreClient): MonstersRepository
+}
diff --git a/app/src/main/java/com/theuhooi/uhooipicbook/modules/monsterdetail/MonsterDetailFragment.kt b/app/src/main/java/com/theuhooi/uhooipicbook/modules/monsterdetail/MonsterDetailFragment.kt
index bdba393c..88cfccd7 100644
--- a/app/src/main/java/com/theuhooi/uhooipicbook/modules/monsterdetail/MonsterDetailFragment.kt
+++ b/app/src/main/java/com/theuhooi/uhooipicbook/modules/monsterdetail/MonsterDetailFragment.kt
@@ -14,9 +14,10 @@ import android.view.ViewGroup
import androidx.core.app.ShareCompat
import androidx.core.content.FileProvider
import androidx.fragment.app.Fragment
+import androidx.navigation.fragment.findNavController
import androidx.navigation.fragment.navArgs
import coil.ImageLoader
-import coil.api.load
+import coil.load
import coil.request.Disposable
import coil.request.ImageRequest
import com.theuhooi.uhooipicbook.R
@@ -40,7 +41,7 @@ class MonsterDetailFragment : Fragment() {
inflater: LayoutInflater,
container: ViewGroup?,
savedInstanceState: Bundle?
- ): View? {
+ ): View {
setHasOptionsMenu(true)
return inflater.inflate(R.layout.fragment_monster_detail, container, false)
}
@@ -49,6 +50,12 @@ class MonsterDetailFragment : Fragment() {
super.onViewCreated(view, savedInstanceState)
view.icon_imageview.load(this.args.monster.iconUrlString)
+ view.dancing_imageview.load(this.args.monster.dancingUrlString)
+ view.dancing_imageview.setOnClickListener {
+ val action =
+ MonsterDetailFragmentDirections.actionDetailToDancing(this.args.monster.dancingUrlString)
+ findNavController().navigate(action)
+ }
view.name_textview.text = this.args.monster.name
view.description_textview.text = unescapeNewline(this.args.monster.description)
}
@@ -56,7 +63,7 @@ class MonsterDetailFragment : Fragment() {
override fun onCreateOptionsMenu(menu: Menu, inflater: MenuInflater) {
super.onCreateOptionsMenu(menu, inflater)
- inflater.inflate(R.menu.menu_share, menu)
+ inflater.inflate(R.menu.menu_monster_detail, menu)
val shareMenuItem = menu.findItem(R.id.share_menu_item)
shareMenuItem.setOnMenuItemClickListener {
shareMonster()
diff --git a/app/src/main/java/com/theuhooi/uhooipicbook/modules/monsterdetail/dancingmonster/DancingMonsterFragment.kt b/app/src/main/java/com/theuhooi/uhooipicbook/modules/monsterdetail/dancingmonster/DancingMonsterFragment.kt
new file mode 100644
index 00000000..60841e52
--- /dev/null
+++ b/app/src/main/java/com/theuhooi/uhooipicbook/modules/monsterdetail/dancingmonster/DancingMonsterFragment.kt
@@ -0,0 +1,58 @@
+package com.theuhooi.uhooipicbook.modules.monsterdetail.dancingmonster
+
+import android.graphics.Color
+import android.graphics.drawable.ColorDrawable
+import android.os.Bundle
+import android.view.LayoutInflater
+import android.view.View
+import android.view.ViewGroup
+import android.view.WindowManager
+import androidx.appcompat.app.AppCompatDialogFragment
+import androidx.navigation.fragment.navArgs
+import coil.load
+import com.theuhooi.uhooipicbook.R
+import kotlinx.android.synthetic.main.fragment_dancing_monster.view.*
+
+class DancingMonsterFragment : AppCompatDialogFragment() {
+
+ // region Stored Instance Properties
+
+ private val args: DancingMonsterFragmentArgs by navArgs()
+
+ // endregion
+
+ // region View Life-Cycle Methods
+
+ override fun onCreateView(
+ inflater: LayoutInflater,
+ container: ViewGroup?,
+ savedInstanceState: Bundle?
+ ): View {
+ return inflater.inflate(R.layout.fragment_dancing_monster, container, false)
+ }
+
+ override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
+ super.onViewCreated(view, savedInstanceState)
+
+ view.dancing_imageview.load(this.args.dancingUrlString)
+ view.close_button.setOnClickListener { dismiss() }
+ }
+
+ override fun onStart() {
+ super.onStart()
+ dialog?.window?.apply {
+ setFlags(
+ WindowManager.LayoutParams.FLAG_FULLSCREEN,
+ WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN
+ )
+ setBackgroundDrawable(ColorDrawable(Color.TRANSPARENT))
+ val layoutParams = attributes.apply {
+ width = WindowManager.LayoutParams.MATCH_PARENT
+ height = WindowManager.LayoutParams.MATCH_PARENT
+ }
+ attributes = layoutParams
+ }
+ }
+
+ // endregion
+}
diff --git a/app/src/main/java/com/theuhooi/uhooipicbook/modules/monsterlist/MonsterListFragment.kt b/app/src/main/java/com/theuhooi/uhooipicbook/modules/monsterlist/MonsterListFragment.kt
index 6f8ab8f5..63bd9a4e 100644
--- a/app/src/main/java/com/theuhooi/uhooipicbook/modules/monsterlist/MonsterListFragment.kt
+++ b/app/src/main/java/com/theuhooi/uhooipicbook/modules/monsterlist/MonsterListFragment.kt
@@ -3,23 +3,29 @@ package com.theuhooi.uhooipicbook.modules.monsterlist
import android.content.Context
import android.os.Bundle
import android.view.LayoutInflater
+import android.view.Menu
+import android.view.MenuInflater
+import android.view.MenuItem
import android.view.View
import android.view.ViewGroup
import androidx.fragment.app.Fragment
-import androidx.navigation.navGraphViewModels
+import androidx.fragment.app.viewModels
+import androidx.navigation.fragment.findNavController
import androidx.recyclerview.widget.LinearLayoutManager
import com.theuhooi.uhooipicbook.R
import com.theuhooi.uhooipicbook.databinding.FragmentMonsterListBinding
import com.theuhooi.uhooipicbook.modules.monsterlist.entities.MonsterItem
import com.theuhooi.uhooipicbook.modules.monsterlist.viewmodels.MonsterListViewModel
+import dagger.hilt.android.AndroidEntryPoint
+@AndroidEntryPoint
class MonsterListFragment : Fragment() {
// region Stored Instance Properties
private var listener: OnListFragmentInteractionListener? = null
- private val viewModel: MonsterListViewModel by navGraphViewModels(R.id.nav_graph)
+ private val viewModel: MonsterListViewModel by viewModels()
// endregion
@@ -29,7 +35,8 @@ class MonsterListFragment : Fragment() {
inflater: LayoutInflater,
container: ViewGroup?,
savedInstanceState: Bundle?
- ): View? {
+ ): View {
+ setHasOptionsMenu(true)
val binding = FragmentMonsterListBinding.inflate(inflater, container, false)
binding.monsterListRecyclerview.adapter =
MonsterListRecyclerViewAdapter(
@@ -59,6 +66,21 @@ class MonsterListFragment : Fragment() {
this.listener = null
}
+ override fun onCreateOptionsMenu(menu: Menu, inflater: MenuInflater) {
+ super.onCreateOptionsMenu(menu, inflater)
+ inflater.inflate(R.menu.menu_monster_list, menu)
+ }
+
+ override fun onOptionsItemSelected(item: MenuItem): Boolean {
+ return when (item.itemId) {
+ R.id.licenses_menu_item -> {
+ findNavController().navigate(MonsterListFragmentDirections.actionListToLicenses())
+ true
+ }
+ else -> super.onOptionsItemSelected(item)
+ }
+ }
+
// endregion
// region Interfaces
diff --git a/app/src/main/java/com/theuhooi/uhooipicbook/modules/monsterlist/viewmodels/MonsterListViewModel.kt b/app/src/main/java/com/theuhooi/uhooipicbook/modules/monsterlist/viewmodels/MonsterListViewModel.kt
index c0e90a4c..980352ef 100644
--- a/app/src/main/java/com/theuhooi/uhooipicbook/modules/monsterlist/viewmodels/MonsterListViewModel.kt
+++ b/app/src/main/java/com/theuhooi/uhooipicbook/modules/monsterlist/viewmodels/MonsterListViewModel.kt
@@ -5,14 +5,16 @@ import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
import com.theuhooi.uhooipicbook.modules.monsterlist.MonstersRepository
import com.theuhooi.uhooipicbook.modules.monsterlist.entities.MonsterItem
-import com.theuhooi.uhooipicbook.repository.monsters.firebase.MonstersFirestoreClient
+import dagger.hilt.android.lifecycle.HiltViewModel
+import javax.inject.Inject
-class MonsterListViewModel : ViewModel() {
+@HiltViewModel
+class MonsterListViewModel @Inject constructor(
+ private val repository: MonstersRepository
+) : ViewModel() {
// region Stored Instance Properties
- private val repository: MonstersRepository = MonstersFirestoreClient() // TODO: DIする
-
private val _monsters = MutableLiveData>()
val monsters: LiveData>
get() = _monsters
diff --git a/app/src/main/java/com/theuhooi/uhooipicbook/repository/monsters/firebase/MonstersFirestoreClient.kt b/app/src/main/java/com/theuhooi/uhooipicbook/repository/monsters/firebase/MonstersFirestoreClient.kt
index 6aa25160..a57d7dc3 100644
--- a/app/src/main/java/com/theuhooi/uhooipicbook/repository/monsters/firebase/MonstersFirestoreClient.kt
+++ b/app/src/main/java/com/theuhooi/uhooipicbook/repository/monsters/firebase/MonstersFirestoreClient.kt
@@ -5,8 +5,9 @@ import com.google.firebase.firestore.ktx.toObjects
import com.google.firebase.ktx.Firebase
import com.theuhooi.uhooipicbook.modules.monsterlist.MonstersRepository
import com.theuhooi.uhooipicbook.modules.monsterlist.entities.MonsterItem
+import javax.inject.Inject
-class MonstersFirestoreClient : MonstersRepository {
+class MonstersFirestoreClient @Inject constructor() : MonstersRepository {
// region Stored Instance Properties
diff --git a/app/src/main/java/com/theuhooi/uhooipicbook/util/ViewBindingAdapters.kt b/app/src/main/java/com/theuhooi/uhooipicbook/util/ViewBindingAdapters.kt
index 950d3741..5d75939a 100644
--- a/app/src/main/java/com/theuhooi/uhooipicbook/util/ViewBindingAdapters.kt
+++ b/app/src/main/java/com/theuhooi/uhooipicbook/util/ViewBindingAdapters.kt
@@ -6,7 +6,7 @@ import android.view.View.VISIBLE
import android.widget.ImageView
import androidx.databinding.BindingAdapter
import androidx.recyclerview.widget.RecyclerView
-import coil.api.load
+import coil.load
@BindingAdapter("goneUnless")
fun goneUnless(view: View, visible: Boolean) {
diff --git a/app/src/main/res/drawable/ic_baseline_close_24.xml b/app/src/main/res/drawable/ic_baseline_close_24.xml
new file mode 100644
index 00000000..6f6c8767
--- /dev/null
+++ b/app/src/main/res/drawable/ic_baseline_close_24.xml
@@ -0,0 +1,9 @@
+
+
+
diff --git a/app/src/main/res/layout/fragment_dancing_monster.xml b/app/src/main/res/layout/fragment_dancing_monster.xml
new file mode 100644
index 00000000..15670ddb
--- /dev/null
+++ b/app/src/main/res/layout/fragment_dancing_monster.xml
@@ -0,0 +1,48 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/fragment_monster_detail.xml b/app/src/main/res/layout/fragment_monster_detail.xml
index 9e33e5d0..eb9e606e 100644
--- a/app/src/main/res/layout/fragment_monster_detail.xml
+++ b/app/src/main/res/layout/fragment_monster_detail.xml
@@ -1,5 +1,6 @@
-
+ android:contentDescription="@string/icon_description"
+ app:layout_constraintBottom_toTopOf="@id/dancing_imageview"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintVertical_bias="0.0"
+ app:layout_constraintVertical_chainStyle="packed"
+ tools:src="@tools:sample/avatars" />
+
+
+ android:textStyle="bold"
+ app:layout_constraintBottom_toTopOf="@id/description_textview"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toBottomOf="@id/dancing_imageview"
+ tools:text="@string/name_dummy" />
+ android:textSize="16sp"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toBottomOf="@id/name_textview"
+ tools:text="@string/description_dummy" />
-
\ No newline at end of file
+
diff --git a/app/src/main/res/menu/menu_share.xml b/app/src/main/res/menu/menu_monster_detail.xml
similarity index 100%
rename from app/src/main/res/menu/menu_share.xml
rename to app/src/main/res/menu/menu_monster_detail.xml
diff --git a/app/src/main/res/menu/menu_monster_list.xml b/app/src/main/res/menu/menu_monster_list.xml
new file mode 100644
index 00000000..990b4653
--- /dev/null
+++ b/app/src/main/res/menu/menu_monster_list.xml
@@ -0,0 +1,8 @@
+
+
\ No newline at end of file
diff --git a/app/src/main/res/navigation/nav_graph.xml b/app/src/main/res/navigation/nav_graph.xml
index df9158f1..9ba0bb05 100644
--- a/app/src/main/res/navigation/nav_graph.xml
+++ b/app/src/main/res/navigation/nav_graph.xml
@@ -13,6 +13,9 @@
+
+
+
-
\ No newline at end of file
+
+
+
+
+
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index e82adf51..cdfc48ce 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -1,7 +1,10 @@
UhooiPicBook
Icon
+ Dancing
+ Close button
+ ライセンス
共有
info
diff --git a/app/src/main/res/values/themes.xml b/app/src/main/res/values/themes.xml
index 079a4573..463b235a 100644
--- a/app/src/main/res/values/themes.xml
+++ b/app/src/main/res/values/themes.xml
@@ -1,10 +1,21 @@
-
+
+
diff --git a/build.gradle b/build.gradle
index 00cd4eef..b29d9d28 100644
--- a/build.gradle
+++ b/build.gradle
@@ -2,8 +2,9 @@
buildscript {
ext {
- kotlin_version = '1.4.10'
- nav_version = '2.3.0'
+ kotlin_version = '1.4.20'
+ nav_version = '2.3.3'
+ hilt_version = '2.31-alpha'
detekt_version = '1.7.4'
}
repositories {
@@ -11,14 +12,18 @@ buildscript {
jcenter()
}
dependencies {
- classpath 'com.android.tools.build:gradle:4.0.1'
+ classpath 'com.android.tools.build:gradle:4.1.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$nav_version"
// Firebase
- classpath 'com.google.gms:google-services:4.3.4'
- classpath 'com.google.firebase:firebase-crashlytics-gradle:2.3.0'
- classpath 'com.google.firebase:perf-plugin:1.3.1'
+ classpath 'com.google.gms:google-services:4.3.5'
+ classpath 'com.google.firebase:firebase-crashlytics-gradle:2.4.1'
+ classpath 'com.google.firebase:perf-plugin:1.3.4'
+
+ classpath "com.google.dagger:hilt-android-gradle-plugin:$hilt_version"
+
+ classpath 'com.google.android.gms:oss-licenses-plugin:0.10.2'
classpath "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:$detekt_version"
diff --git a/docs/screenshots/monsterDetail-dark.png b/docs/screenshots/monsterDetail-dark.png
deleted file mode 100644
index 245f0959..00000000
Binary files a/docs/screenshots/monsterDetail-dark.png and /dev/null differ
diff --git a/docs/screenshots/monsterDetail-light.png b/docs/screenshots/monsterDetail-light.png
deleted file mode 100644
index deb8de24..00000000
Binary files a/docs/screenshots/monsterDetail-light.png and /dev/null differ
diff --git a/docs/screenshots/monsterList-dark.png b/docs/screenshots/monsterList-dark.png
deleted file mode 100644
index 16be3138..00000000
Binary files a/docs/screenshots/monsterList-dark.png and /dev/null differ
diff --git a/docs/screenshots/monsterList-light.png b/docs/screenshots/monsterList-light.png
deleted file mode 100644
index cbc232b9..00000000
Binary files a/docs/screenshots/monsterList-light.png and /dev/null differ
diff --git a/docs/screenshots/pixel3a/dark/dancing_monster.png b/docs/screenshots/pixel3a/dark/dancing_monster.png
new file mode 100644
index 00000000..9298617a
Binary files /dev/null and b/docs/screenshots/pixel3a/dark/dancing_monster.png differ
diff --git a/docs/screenshots/pixel3a/dark/menu_opened_in_monster_list.png b/docs/screenshots/pixel3a/dark/menu_opened_in_monster_list.png
new file mode 100644
index 00000000..4daaf8e0
Binary files /dev/null and b/docs/screenshots/pixel3a/dark/menu_opened_in_monster_list.png differ
diff --git a/docs/screenshots/pixel3a/dark/monster_detail.png b/docs/screenshots/pixel3a/dark/monster_detail.png
new file mode 100644
index 00000000..6c59ce33
Binary files /dev/null and b/docs/screenshots/pixel3a/dark/monster_detail.png differ
diff --git a/docs/screenshots/pixel3a/dark/monster_list.png b/docs/screenshots/pixel3a/dark/monster_list.png
new file mode 100644
index 00000000..c1c8d49d
Binary files /dev/null and b/docs/screenshots/pixel3a/dark/monster_list.png differ
diff --git a/docs/screenshots/pixel3a/dark/oss_licenses_menu.png b/docs/screenshots/pixel3a/dark/oss_licenses_menu.png
new file mode 100644
index 00000000..104c5557
Binary files /dev/null and b/docs/screenshots/pixel3a/dark/oss_licenses_menu.png differ
diff --git a/docs/screenshots/pixel3a/light/dancing_monster.png b/docs/screenshots/pixel3a/light/dancing_monster.png
new file mode 100644
index 00000000..aafc1260
Binary files /dev/null and b/docs/screenshots/pixel3a/light/dancing_monster.png differ
diff --git a/docs/screenshots/pixel3a/light/menu_opened_in_monster_list.png b/docs/screenshots/pixel3a/light/menu_opened_in_monster_list.png
new file mode 100644
index 00000000..2fc01399
Binary files /dev/null and b/docs/screenshots/pixel3a/light/menu_opened_in_monster_list.png differ
diff --git a/docs/screenshots/pixel3a/light/monster_detail.png b/docs/screenshots/pixel3a/light/monster_detail.png
new file mode 100644
index 00000000..c8caaf01
Binary files /dev/null and b/docs/screenshots/pixel3a/light/monster_detail.png differ
diff --git a/docs/screenshots/pixel3a/light/monster_list.png b/docs/screenshots/pixel3a/light/monster_list.png
new file mode 100644
index 00000000..4f8d5809
Binary files /dev/null and b/docs/screenshots/pixel3a/light/monster_list.png differ
diff --git a/docs/screenshots/pixel3a/light/oss_licenses_menu.png b/docs/screenshots/pixel3a/light/oss_licenses_menu.png
new file mode 100644
index 00000000..400553c9
Binary files /dev/null and b/docs/screenshots/pixel3a/light/oss_licenses_menu.png differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 54806d65..21c251d5 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
-#Sun Jul 12 13:12:14 JST 2020
+#Fri Jan 22 20:53:09 JST 2021
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-6.5.1-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-6.8-all.zip