-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from shinhyo/add_theme_toggle
feat: add theme toggle button
- Loading branch information
Showing
86 changed files
with
1,082 additions
and
724 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,6 @@ | ||
# https://pinterest.github.io/ktlint/latest/rules/standard | ||
|
||
root = true | ||
|
||
[*.{kt, kts}] | ||
ktlint_code_style = ktlint_official | ||
indent_size = 4 | ||
indent_style = space | ||
ij_kotlin_allow_trailing_comma = false | ||
ij_kotlin_allow_trailing_comma_on_call_site = false | ||
|
||
# enabled, disabled | ||
ktlint_standard = enabled | ||
ktlint_experimental = disabled | ||
ktlint_custom-rule-set = disabled | ||
|
||
max_line_length = off | ||
insert_final_newline = false | ||
|
||
# ktlint_standard_multiline-expression-wrapping = disabled | ||
# ktlint_standard_import-ordering = disabled | ||
# ktlint_standard_trailing-comma-on-declaration-site = disabled | ||
[*.{kt,kts}] | ||
ij_kotlin_allow_trailing_comma = true | ||
ij_kotlin_allow_trailing_comma_on_call_site = true | ||
ktlint_function_naming_ignore_when_annotated_with = Composable, Test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
app/src/main/java/io/github/shinhyo/brba/initializer/CoilInitializer.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/* | ||
* Copyright 2024 shinhyo | ||
* | ||
* Licensed 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 | ||
* | ||
* https://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. | ||
*/ | ||
package io.github.shinhyo.brba.initializer | ||
|
||
import android.content.Context | ||
import androidx.startup.Initializer | ||
import coil.Coil | ||
import coil.ImageLoader | ||
import coil.disk.DiskCache | ||
import coil.memory.MemoryCache | ||
|
||
class CoilInitializer : Initializer<Unit> { | ||
|
||
override fun create(context: Context) { | ||
Coil.setImageLoader( | ||
ImageLoader.Builder(context) | ||
.memoryCache { | ||
MemoryCache.Builder(context) | ||
.maxSizePercent(0.25) | ||
.build() | ||
} | ||
.crossfade(true) | ||
// .logger(if (BuildConfig.DEBUG) DebugLogger() else null) | ||
.respectCacheHeaders(false) | ||
.diskCache { | ||
DiskCache.Builder() | ||
.directory(context.cacheDir.resolve("image_cache")) | ||
.maxSizePercent(0.10) | ||
.build() | ||
} | ||
.build(), | ||
) | ||
} | ||
|
||
override fun dependencies(): MutableList<Class<out Initializer<*>>> = mutableListOf() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
</resources> | ||
<resources></resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 0 additions & 23 deletions
23
build-logic/convention/src/main/kotlin/io/github/shinhyo/brba/buildlogic/KtlintAndroid.kt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.