Skip to content

Commit

Permalink
Theme changes
Browse files Browse the repository at this point in the history
  • Loading branch information
khaleeljageer committed Aug 8, 2021
1 parent cbbfdc8 commit 2ea439a
Show file tree
Hide file tree
Showing 28 changed files with 52 additions and 45 deletions.
13 changes: 7 additions & 6 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ android {
applicationId "com.jskaleel.fte"
minSdkVersion versions.androidMinSdk
targetSdkVersion versions.androidTargetSdk
versionCode 36
versionCode 37
versionName "8.1.0"
multiDexEnabled true
}
Expand Down Expand Up @@ -73,11 +73,12 @@ dependencies {

implementation 'np.com.susanthapa:curved_bottom_navigation:0.6.5'
// Koin for Android
implementation "org.koin:koin-android:$versions.koin"
// or Koin for Lifecycle scoping
implementation "org.koin:koin-androidx-scope:$versions.koin"
// or Koin for Android Architecture ViewModel
implementation "org.koin:koin-androidx-viewmodel:$versions.koin"
implementation "io.insert-koin:koin-android:$versions.koin"
// Koin AndroidX Scope features
implementation "io.insert-koin:koin-androidx-scope:$versions.koin"
// Koin AndroidX ViewModel features
implementation "io.insert-koin:koin-androidx-viewmodel:$versions.koin"

//Coroutines
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.2'

Expand Down
15 changes: 10 additions & 5 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
android:name="com.jskaleel.fte.ui.splash.SplashActivity"
android:label="@string/app_name"
android:screenOrientation="portrait"
android:theme="@style/Splash_Theme">
android:theme="@style/Splash_Theme"
tools:ignore="LockedOrientationActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

Expand All @@ -36,20 +37,24 @@
</activity>
<activity
android:name=".ui.main.MainLandingActivity"
android:screenOrientation="portrait" />
android:screenOrientation="portrait"
tools:ignore="LockedOrientationActivity" />
<activity
android:name=".ui.search.SearchActivity"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateHidden|adjustPan" />
android:windowSoftInputMode="stateHidden|adjustPan"
tools:ignore="LockedOrientationActivity" />

<activity
android:name=".ui.webview.WebViewActivity"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateHidden|adjustPan" />
android:windowSoftInputMode="stateHidden|adjustPan"
tools:ignore="LockedOrientationActivity" />
<activity
android:name=".ui.feedback.FeedbackActivity"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateHidden|adjustResize" />
android:windowSoftInputMode="stateHidden|adjustResize"
tools:ignore="LockedOrientationActivity" />

<provider
android:name="androidx.core.content.FileProvider"
Expand Down
Binary file removed app/src/main/ic_launcher-playstore.png
Binary file not shown.
19 changes: 9 additions & 10 deletions app/src/main/java/com/jskaleel/fte/utils/FileUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,15 @@ object FileUtils {
}
}

fun openSavedBook(context: Context, book: LocalBooks) {
if (book.savedPath == null) {
return
fun openSavedBook(context: Context, book: LocalBooks?) {
book?.let {
var config = AppUtil.getSavedConfig(context)
if (config == null) config = Config()
config.allowedDirection = Config.AllowedDirection.VERTICAL_AND_HORIZONTAL
config.isShowTts = false
config.setThemeColorInt(ContextCompat.getColor(context, R.color.fte_blue_700))
val folioReader = FolioReader.get()
folioReader.setConfig(config, true).openBook(book.savedPath.replace("file://", ""))
}
var config = AppUtil.getSavedConfig(context)
if (config == null) config = Config()
config.allowedDirection = Config.AllowedDirection.VERTICAL_AND_HORIZONTAL
config.isShowTts = false
config.setThemeColorInt(ContextCompat.getColor(context, R.color.fte_blue_700))
val folioReader = FolioReader.get()
folioReader.setConfig(config, true).openBook(book.savedPath!!.replace("file://", ""))
}
}
4 changes: 0 additions & 4 deletions app/src/main/res/drawable/ic_launcher_splash.xml

This file was deleted.

9 changes: 5 additions & 4 deletions app/src/main/res/drawable/ic_no_documents.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,24 @@
android:viewportWidth="250"
android:viewportHeight="200">
<path
android:fillColor="#FFF8E1"
android:fillColor="#FFEB3B"
android:fillType="evenOdd"
android:strokeColor="#000000"
android:strokeWidth="2"
android:pathData="M93,135H176C179.866,135 183,131.866 183,128C183,124.134 179.866,121 176,121C176,121 170,117.866 170,114C170,110.134 173.952,107 178.826,107H189C192.866,107 196,103.866 196,100C196,96.134 192.866,93 189,93H167C170.866,93 174,89.866 174,86C174,82.134 170.866,79 167,79H207C210.866,79 214,75.866 214,72C214,68.134 210.866,65 207,65H109C105.134,65 102,68.134 102,72C102,75.866 105.134,79 109,79H69C65.134,79 62,82.134 62,86C62,89.866 65.134,93 69,93H94C97.866,93 101,96.134 101,100C101,103.866 97.866,107 94,107H54C50.134,107 47,110.134 47,114C47,117.866 50.134,121 54,121H93C89.134,121 86,124.134 86,128C86,131.866 89.134,135 93,135ZM200,100C200,103.866 203.134,107 207,107C210.866,107 214,103.866 214,100C214,96.134 210.866,93 207,93C203.134,93 200,96.134 200,100Z" />
<path
android:fillColor="#FFF8E1"
android:fillColor="#FFEB3B"
android:fillType="evenOdd"
android:pathData="M153.672,64L162.974,131.843L163.809,138.649C164.079,140.842 162.519,142.837 160.327,143.107L101.766,150.297C99.574,150.566 97.578,149.007 97.309,146.814L88.293,73.387C88.158,72.29 88.938,71.293 90.034,71.158C90.041,71.157 90.048,71.156 90.055,71.156L94.914,70.61M98.842,70.17L103.429,69.655Z" />
<path
android:fillColor="#000000"
android:pathData="M154.91,63.83C154.816,63.146 154.186,62.668 153.502,62.762C152.818,62.855 152.34,63.486 152.433,64.17L154.91,63.83ZM162.974,131.843L164.214,131.69L164.213,131.682L164.212,131.673L162.974,131.843ZM163.809,138.649L165.05,138.497L163.809,138.649ZM160.327,143.107L160.479,144.347L160.327,143.107ZM101.766,150.297L101.919,151.538L101.766,150.297ZM97.309,146.814L98.549,146.662L97.309,146.814ZM88.293,73.387L89.534,73.234L88.293,73.387ZM90.055,71.156L90.195,72.398L90.055,71.156ZM95.053,71.853C95.739,71.776 96.233,71.157 96.156,70.471C96.079,69.785 95.46,69.291 94.774,69.368L95.053,71.853ZM98.703,68.928C98.017,69.005 97.523,69.623 97.6,70.309C97.677,70.995 98.295,71.489 98.981,71.412L98.703,68.928ZM103.568,70.897C104.255,70.821 104.748,70.202 104.671,69.516C104.594,68.83 103.976,68.336 103.29,68.413L103.568,70.897ZM152.433,64.17L161.735,132.013L164.212,131.673L154.91,63.83L152.433,64.17ZM161.733,131.995L162.569,138.801L165.05,138.497L164.214,131.69L161.733,131.995ZM162.569,138.801C162.754,140.309 161.682,141.681 160.174,141.866L160.479,144.347C163.357,143.994 165.403,141.375 165.05,138.497L162.569,138.801ZM160.174,141.866L101.614,149.056L101.919,151.538L160.479,144.347L160.174,141.866ZM101.614,149.056C100.107,149.241 98.735,148.169 98.549,146.662L96.068,146.967C96.422,149.845 99.041,151.891 101.919,151.538L101.614,149.056ZM98.549,146.662L89.534,73.234L87.052,73.539L96.068,146.967L98.549,146.662ZM89.534,73.234C89.483,72.823 89.776,72.449 90.187,72.399L89.882,69.917C88.101,70.136 86.834,71.758 87.052,73.539L89.534,73.234ZM90.187,72.399C90.189,72.398 90.192,72.398 90.195,72.398L89.916,69.913C89.905,69.914 89.893,69.916 89.882,69.917L90.187,72.399ZM90.195,72.398L95.053,71.853L94.774,69.368L89.916,69.913L90.195,72.398ZM98.981,71.412L103.568,70.897L103.29,68.413L98.703,68.928L98.981,71.412Z" />
<path
android:fillColor="#FFF8E1"
android:fillColor="#FFEB3B"
android:fillType="evenOdd"
android:pathData="M151.14,68.269L159.56,129.753L160.317,135.921C160.561,137.908 159.167,139.715 157.203,139.956L104.761,146.395C102.798,146.636 101.008,145.22 100.764,143.233L92.614,76.857C92.479,75.76 93.259,74.763 94.355,74.628L100.843,73.831" />
<path
android:fillColor="#FFF8E1"
android:fillColor="#FFEB3B"
android:pathData="M110.672,51.25H156.229C156.958,51.25 157.657,51.54 158.173,52.055L171.616,65.49C172.132,66.006 172.422,66.705 172.422,67.435V130C172.422,131.519 171.191,132.75 169.672,132.75H110.672C109.153,132.75 107.922,131.519 107.922,130V54C107.922,52.481 109.153,51.25 110.672,51.25Z"
android:strokeWidth="2.5"
android:strokeColor="#000000" />
Expand Down
File renamed without changes
3 changes: 2 additions & 1 deletion app/src/main/res/layout/activity_splash.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
android:id="@+id/llSplashLogo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="150dp"
android:orientation="vertical">

<androidx.appcompat.widget.AppCompatImageView
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/layout/fragment_home.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
android:id="@+id/searchWidget"
android:layout_width="match_parent"
android:layout_height="@dimen/margin_75dp"
android:background="@android:color/transparent"
app:cardCornerRadius="@dimen/margin_6dp"
app:cardElevation="@dimen/margin_5dp"
app:cardPreventCornerOverlap="true"
Expand Down
3 changes: 2 additions & 1 deletion app/src/main/res/layout/fragment_settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,8 @@
android:layout_height="wrap_content"
android:gravity="center"
android:padding="5dp"
android:textAppearance="?attr/textAppearanceCaption" />
android:textAppearance="?attr/textAppearanceCaption"
android:textStyle="bold" />
</LinearLayout>
</ScrollView>
</LinearLayout>
2 changes: 1 addition & 1 deletion app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>
2 changes: 1 addition & 1 deletion app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>
Binary file modified app/src/main/res/mipmap-hdpi/ic_launcher.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 modified app/src/main/res/mipmap-hdpi/ic_launcher_round.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 modified app/src/main/res/mipmap-mdpi/ic_launcher.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 modified app/src/main/res/mipmap-mdpi/ic_launcher_round.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 modified app/src/main/res/mipmap-xhdpi/ic_launcher.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 modified app/src/main/res/mipmap-xhdpi/ic_launcher_round.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 modified app/src/main/res/mipmap-xxhdpi/ic_launcher.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 modified app/src/main/res/mipmap-xxhdpi/ic_launcher_round.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 modified app/src/main/res/mipmap-xxxhdpi/ic_launcher.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 modified app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 10 additions & 6 deletions app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="fte_yellow_400">#ddb892</color>
<color name="fte_yellow_500">#e6ccb2</color>
<color name="fte_yellow_50">#ede0d4</color>
<color name="fte_yellow_4001">#ddb892</color>
<color name="fte_yellow_5001">#e6ccb2</color>
<color name="fte_yellow_501">#ede0d4</color>

<color name="fte_blue_200">#b08968</color>
<color name="fte_blue_700">#9c6644</color>
<color name="fte_blue_800">#7f5539</color>
<color name="fte_yellow_400">#FFEE15</color>
<color name="fte_yellow_500">#FFEB3B</color>
<color name="fte_yellow_50">#FFFDE7</color>

<color name="fte_blue_200">#90CAF9</color>
<color name="fte_blue_700">#1976D2</color>
<color name="fte_blue_800">#1565C0</color>
<color name="fte_blue_dark_primary">#1c1d24</color>

<!--background protection for nav-bar, varied on Q+-->
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/ic_launcher_background.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_background">#9C6644</color>
<color name="ic_launcher_background">#FFEB3B</color>
</resources>
3 changes: 1 addition & 2 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@
<string name="no_downloads">பதிவிறக்கங்கள் எதுவும்\nகாணப்படவில்லை.</string>
<string name="open_sources">மூன்றாம் தரப்பு நூலகங்கள்</string>
<string name="book_by_mariyani_from_the_noun_project">
Logo Credits:\nThis file is licensed under the Creative Commons Attribution 4.0 International license.\n
https://commons.wikimedia.org/wiki/File:Font_Awesome_5_solid_book-reader.svg
Logo Credits:\nThis file is licensed under the Creative Commons Attribution 4.0 International license.\nBook by Mariyani from the Noun Project
</string>
<string name="search_for_books_authors">புத்தகம்/ஆசிரியர் பெயரில் தேடவும்…</string>
<string name="try_again_later">சிறிது நேரம் கழித்து முயற்சிக்கவும்…</string>
Expand Down
3 changes: 2 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@ buildscript {
apply from: 'versions.gradle'

ext {
kotlin_version = '1.4.21'
kotlin_version = '1.5.20'
retrofit_version = '2.9.0'
navigationVersion = '2.3.3'
}
repositories {
google()
jcenter()
mavenCentral()
maven {
url 'https://maven.fabric.io/public'
}
Expand Down
2 changes: 1 addition & 1 deletion versions.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ versions.gson = "2.8.6"

versions.lifecycle = "2.2.0"
versions.localbcmanager = "1.0.0"
versions.koin = "2.2.2"
versions.koin = "2.2.3"

ext.versions = versions

0 comments on commit 2ea439a

Please sign in to comment.