Skip to content

Commit

Permalink
Merge pull request #53 from uhooi/release/1.1.0
Browse files Browse the repository at this point in the history
Release/1.1.0
  • Loading branch information
uhooi authored Aug 17, 2020
2 parents 66a40df + a8c60ca commit 1f119fd
Show file tree
Hide file tree
Showing 22 changed files with 71 additions and 53 deletions.
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,29 @@

UhooiPicBook-Android is Uhooi's character book for Android.

[<img src="./docs/google-play-badge.png" width="161.5">](https://play.google.com/store/apps/details?id=com.theuhooi.uhooipicbook)

## Screenshots

### Light

|MonsterList|MonsterDetail|
|:--|:--|
|<img src="./docs/screenshots/monsterList.png" width="270">|<img src="./docs/screenshots/monsterDetail.png" width="270">|
|<img src="./docs/screenshots/monsterList-light.png" width="270">|<img src="./docs/screenshots/monsterDetail-light.png" width="270">|

## Demo
### Dark

<img src="./docs/demo/demo.gif" width="270">
|MonsterList|MonsterDetail|
|:--|:--|
|<img src="./docs/screenshots/monsterList-dark.png" width="270">|<img src="./docs/screenshots/monsterDetail-dark.png" width="270">|

## Development

You can develop UhooiPicBook-Android.

### Environment

- Android Studio: 3.6.1
- Android Studio: 4.0.0

### Configuration

Expand Down
23 changes: 12 additions & 11 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ android {
applicationId "com.theuhooi.uhooipicbook"
minSdkVersion 26
targetSdkVersion 29
versionCode 1
versionName "1.0.0"
versionCode 2
versionName "1.1.0"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
Expand Down Expand Up @@ -49,22 +49,21 @@ android {
}
}

dataBinding {
enabled = true
buildFeatures {
dataBinding = true
}
}

dependencies {
implementation 'io.coil-kt:coil:0.9.5'

// Firebase
implementation 'com.google.firebase:firebase-analytics:17.4.2'
implementation 'com.google.firebase:firebase-crashlytics:17.0.0'
implementation 'com.google.firebase:firebase-perf:19.0.7'
implementation 'com.google.firebase:firebase-firestore-ktx:21.4.3'
implementation 'com.google.firebase:firebase-analytics:17.4.4'
implementation 'com.google.firebase:firebase-crashlytics:17.1.1'
implementation 'com.google.firebase:firebase-perf:19.0.8'
implementation 'com.google.firebase:firebase-firestore-ktx:21.5.0'

implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'androidx.cardview:cardview:1.0.0'

implementation "androidx.navigation:navigation-fragment-ktx:$nav_version"
implementation "androidx.navigation:navigation-ui-ktx:$nav_version"
Expand All @@ -76,10 +75,12 @@ dependencies {
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.core:core-ktx:1.2.0'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.core:core-ktx:1.3.1'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'

implementation 'com.google.android.material:material:1.2.0'

testImplementation 'org.robolectric:robolectric:4.3.1'
testImplementation 'androidx.test:runner:1.2.0'
}
Expand Down
11 changes: 6 additions & 5 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,20 @@

<application
android:allowBackup="true"
android:fullBackupContent="@xml/backup_descriptor"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme"
android:fullBackupContent="@xml/backup_descriptor">
<activity android:name=".MainActivity">
android:theme="@style/Theme.UhooiPicBook">
<activity
android:name=".MainActivity"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>

</manifest>
</manifest>
16 changes: 13 additions & 3 deletions app/src/main/java/com/theuhooi/uhooipicbook/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import android.graphics.Color
import android.graphics.drawable.ColorDrawable
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import androidx.core.content.ContextCompat
import androidx.navigation.findNavController
import androidx.navigation.ui.AppBarConfiguration
import androidx.navigation.ui.setupActionBarWithNavController
import com.google.android.material.color.MaterialColors
import com.theuhooi.uhooipicbook.extensions.IntColorInterface
import com.theuhooi.uhooipicbook.modules.monsterlist.MonsterListFragment
import com.theuhooi.uhooipicbook.modules.monsterlist.MonsterListFragmentDirections
Expand Down Expand Up @@ -38,9 +38,19 @@ class MainActivity : AppCompatActivity(), MonsterListFragment.OnListFragmentInte
navController.addOnDestinationChangedListener { _, destination, _ ->
if (destination.id == R.id.monster_list_fragment) {
this.supportActionBar?.setBackgroundDrawable(
ColorDrawable(ContextCompat.getColor(this, R.color.colorPrimary))
ColorDrawable(
MaterialColors.getColor(
this,
R.attr.colorPrimary,
"colorPrimary is not set in the current theme"
)
)
)
this.window.statusBarColor = MaterialColors.getColor(
this,
R.attr.colorPrimaryVariant,
"colorPrimaryVariant is not set in the current theme"
)
this.window.statusBarColor = ContextCompat.getColor(this, R.color.colorPrimaryDark)
}
}
val appBarConfiguration = AppBarConfiguration(navController.graph)
Expand Down
9 changes: 3 additions & 6 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,11 @@
android:layout_height="fill_parent"
android:orientation="vertical">

<androidx.appcompat.widget.Toolbar
<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/toolbar"
style="@style/Widget.MaterialComponents.Toolbar.Primary"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
android:elevation="@dimen/toolbar_elevation"
android:theme="@style/ThemeOverlay.AppCompat.ActionBar"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light" />
android:layout_height="?attr/actionBarSize" />

<fragment
android:id="@+id/nav_host_fragment"
Expand Down
6 changes: 3 additions & 3 deletions app/src/main/res/layout/fragment_monster_detail.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
android:layout_height="240dp"
android:layout_gravity="center_horizontal"
android:layout_marginTop="56dp"
android:contentDescription="@string/icon_content_description" />
android:contentDescription="@string/icon_description" />

<TextView
android:id="@+id/name_textview"
Expand All @@ -22,7 +22,7 @@
android:layout_marginTop="32dp"
android:text="@string/name_dummy"
android:textAlignment="center"
android:textColor="@android:color/black"
android:textColor="?android:attr/textColorPrimary"
android:textSize="36sp"
android:textStyle="bold" />

Expand All @@ -34,7 +34,7 @@
android:layout_marginTop="64dp"
android:text="@string/description_dummy"
android:textAlignment="center"
android:textColor="@android:color/darker_gray"
android:textColor="?android:attr/textColorSecondary"
android:textSize="16sp" />

</LinearLayout>
9 changes: 4 additions & 5 deletions app/src/main/res/layout/item_monster_list.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,11 @@
type="com.theuhooi.uhooipicbook.modules.monsterlist.entities.MonsterItem" />
</data>

<androidx.cardview.widget.CardView
<com.google.android.material.card.MaterialCardView
android:id="@+id/cardView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/card_margin"
android:foreground="?android:attr/selectableItemBackground"
app:cardElevation="@dimen/card_elevation">

<LinearLayout
Expand All @@ -28,7 +27,7 @@
android:layout_width="68dp"
android:layout_height="68dp"
android:layout_margin="16dp"
android:contentDescription="@string/icon_content_description"
android:contentDescription="@string/icon_description"
app:imageUrl="@{monsterItem.iconUrlString}"/>

<TextView
Expand All @@ -39,9 +38,9 @@
android:layout_margin="@dimen/text_margin"
android:text="@{monsterItem.name, default=@string/name_dummy}"
android:textAppearance="?attr/textAppearanceListItem"
android:textColor="@android:color/black"
android:textColor="?attr/colorOnSurface"
android:textSize="24sp"
android:textStyle="bold" />
</LinearLayout>
</androidx.cardview.widget.CardView>
</com.google.android.material.card.MaterialCardView>
</layout>
1 change: 0 additions & 1 deletion app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@
<color name="colorPrimary">#81D674</color>
<color name="colorPrimaryDark">#64C746</color>
<color name="colorAccent">#03DAC5</color>
<color name="textColorPrimary">#FFFFFF</color>
</resources>
1 change: 0 additions & 1 deletion app/src/main/res/values/dimens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,5 @@
<dimen name="start_padding">16dp</dimen>
<dimen name="end_padding">16dp</dimen>

<dimen name="toolbar_elevation">4dp</dimen>
<dimen name="card_elevation">1dp</dimen>
</resources>
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<resources>
<string name="app_name">UhooiPicBook</string>
<string name="icon_content_description">Icon</string>
<string name="icon_description">Icon</string>

<string name="name_dummy">uhooi</string>
<string name="description_dummy">ゆかいな みどりの せいぶつ。\nわるそうに みえるが むがい。</string>
Expand Down
12 changes: 4 additions & 8 deletions app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
<resources>

<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="android:textColorPrimary">@color/textColorPrimary</item>
</style>

<!--
Define widget styles
ex. <style name="Widget.UhooiPicBook.Toolbar" />
-->
</resources>
10 changes: 10 additions & 0 deletions app/src/main/res/values/themes.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Theme.UhooiPicBook" parent="Theme.MaterialComponents.DayNight.NoActionBar">
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryVariant">@color/colorPrimaryDark</item>
<item name="colorSecondary">@color/colorAccent</item>
<item name="colorSecondaryVariant">@color/colorAccent</item>
<item name="colorOnPrimary">@android:color/white</item>
</style>
</resources>
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@
buildscript {
ext {
kotlin_version = '1.3.72'
nav_version = '2.3.0-beta01'
nav_version = '2.3.0'
detekt_version = '1.7.4'
}
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.6.3'
classpath 'com.android.tools.build:gradle:4.0.1'
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.3'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.1.1'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.2.0'
classpath 'com.google.firebase:perf-plugin:1.3.1'

classpath "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:$detekt_version"
Expand Down
Binary file removed docs/demo/demo.gif
Binary file not shown.
Binary file added docs/google-play-badge.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/screenshots/monsterDetail-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/screenshots/monsterDetail-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/screenshots/monsterDetail.png
Binary file not shown.
Binary file added docs/screenshots/monsterList-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/screenshots/monsterList-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/screenshots/monsterList.png
Binary file not shown.
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Mon May 25 14:59:31 JST 2020
#Sun Jul 12 13:12:14 JST 2020
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5.1-all.zip

0 comments on commit 1f119fd

Please sign in to comment.