Compare commits

..
145 Commits
Author SHA1 Message Date
nero 349768aa07 memo 2023-12-18 14:13:02 +09:00
r-ca 14a8b1a66d Injectした, 例を追加した 2023-12-11 15:39:34 +09:00
r-ca e9f03ed115 レイアウト修正 2023-12-11 15:36:23 +09:00
r-ca 1a86849463 Playgroundを開けるようにした 2023-12-11 15:36:05 +09:00
r-ca 9dac625117 ナビゲーションに追加 2023-12-11 15:32:44 +09:00
r-ca 4099e233d1 Playgroundをつくった 2023-12-11 15:32:38 +09:00
r-ca d68f9942eb Dynamic Colorを使わないようにした 2023-12-11 15:10:53 +09:00
r-ca d57fa48058 バージョンカタログにRoomを追加 2023-12-11 14:39:37 +09:00
r-ca 07b6434689 Impl 2023-12-11 14:36:08 +09:00
r-ca 1566807d4d WIP 2023-12-11 14:35:21 +09:00
r-ca f4eee6f58e Starredを追加 2023-12-11 14:35:17 +09:00
r-ca dc05e809f5 スタブをInjectionするようにした 2023-12-11 13:49:32 +09:00
r-ca 7d158bf3e2 ListからArrayListに変更, スタブを追加 2023-12-11 13:48:21 +09:00
r-ca 7d460a6069 MetaからDescriptionを削除してcreatedを追加 2023-12-11 13:23:01 +09:00
r-ca c6056dd033 なぜかハードコーディングされてたので修正 2023-12-11 13:13:10 +09:00
r-ca 29a77307a1 ラジオボタン切り替え時にリストを更新するように 2023-12-11 13:12:08 +09:00
r-ca 6839e60ff9 不要なラジオボタンを削除 2023-12-11 13:08:52 +09:00
r-ca 0473c5abc2 不要な処理を削除 2023-12-11 13:08:37 +09:00
r-ca 504e0a76d5 ロジックが意味不明だったので修正 2023-12-11 13:08:16 +09:00
r-ca 538e6ed98d レイアウト修正 2023-12-11 13:07:59 +09:00
r-ca 516ca15abd 取り違えていたので修正 2023-12-11 12:58:13 +09:00
r-ca c5485d0e4d Set忘れの修正 2023-12-11 12:57:05 +09:00
r-ca 7a3c6daf3d PrefのListを表示するように 2023-12-11 12:56:47 +09:00
r-ca 00aa51e082 fix 2023-12-11 12:56:13 +09:00
r-ca d36195c89b RecyclerViewやめた 2023-12-11 12:46:10 +09:00
r-ca 28d2eaa527 RecyclerView追加 2023-12-11 12:43:15 +09:00
r-ca f6b57a4b09 挙動実装 2023-12-11 12:42:26 +09:00
r-ca 386877e91e SharedPrefEditorのUI修正 2023-12-11 12:38:52 +09:00
r-ca 5a0c43b7fe SharedPrefEditorのUI修正 2023-12-11 12:38:41 +09:00
r-ca dbc22e7d87 SharedPrefEditorのUIを作成 2023-12-11 12:35:47 +09:00
r-ca 9685f05c53 SharedPref repoを作成 2023-12-11 12:32:35 +09:00
r-ca 6fb9d77f70 Revert "テスト"
This reverts commit 4c4664f4f6.
2023-12-11 12:19:04 +09:00
r-ca 4c4664f4f6 テスト 2023-12-11 12:15:00 +09:00
r-ca bbb7c38416 結果のよみこみかたを変更 2023-12-11 11:55:23 +09:00
r-ca 701bb898c5 ログ挿入 2023-12-11 11:54:02 +09:00
r-ca 1fa625e948 Contextの取得方法を修正 2023-12-11 11:53:56 +09:00
r-ca d4e429fdca 依存関係追加とか 2023-12-11 11:47:15 +09:00
r-ca 3dc1e2d4ee WIP 2023-12-11 11:47:01 +09:00
r-ca 9e8b222181 テスト 2023-12-11 11:46:51 +09:00
r-ca 3d22d68548 Fix typo 2023-12-11 11:44:17 +09:00
r-ca afe92c04e0 WIP 2023-12-11 11:24:45 +09:00
r-ca d6d4998f3a 引数はいらないので削除 2023-12-11 11:08:22 +09:00
r-ca f77e19556a WIP Pref Editor 2023-12-11 11:07:40 +09:00
r-ca fd04610e6c WIP Binds 2023-12-11 10:50:28 +09:00
r-ca cb687d51e4 Impl実装 2023-12-11 10:49:21 +09:00
r-ca e37328e1f5 CommonPref Interface実装 2023-12-11 10:38:50 +09:00
r-ca d10990e337 WIP 2023-12-11 10:35:40 +09:00
r-ca d9d0e1ff63 WIP 2023-12-11 10:34:27 +09:00
r-ca 5c3c66ec6e JGitを依存関係に追加 2023-12-11 10:27:29 +09:00
r-ca e62614cb18 JGit追加 2023-12-11 10:24:07 +09:00
r-ca 4615418e38 WIP 2023-12-11 10:06:48 +09:00
r-ca 5ed74d18d8 メタデータの定義をつくった 2023-12-11 10:04:06 +09:00
r-ca 586e6972a1 ドキュメントタイプWIP 2023-12-11 10:01:46 +09:00
r-ca f1090e046d ドキュメントタイプWIP 2023-12-11 10:00:36 +09:00
r-ca 32a8d308a1 ドキュメントデータの取得WIP 2023-12-11 09:58:02 +09:00
r-ca 7ba7cc77bf WIP 2023-12-11 09:54:48 +09:00
r-ca 4ef8d8c7ef ScannerScanFragment 2023-12-10 23:16:07 +09:00
r-ca 6a43b55809 Revert "名称変更"
This reverts commit 323f29f4a7.
2023-12-10 23:15:39 +09:00
r-ca 323f29f4a7 名称変更 2023-12-10 23:14:43 +09:00
r-ca 825d285361 レイアウト移植 2023-12-10 23:05:01 +09:00
r-ca b98c08ef16 WIP 2023-12-10 23:04:21 +09:00
r-ca 03ec846b96 com.websitebeaver:documentscannerをscannerモジュールの依存関係に追加 2023-12-10 23:03:00 +09:00
r-ca c9b8a880f3 SharedPrefEditor 2023-12-10 22:59:57 +09:00
r-ca efac779874 SharedPrefEditor 2023-12-10 22:58:36 +09:00
r-ca 031c755e1d PlaceHolder入れたりした 2023-12-10 22:57:11 +09:00
r-ca 35a0e68e2d WIP 2023-12-10 22:54:08 +09:00
r-ca cd537649a0 WIP 2023-12-10 22:54:04 +09:00
r-ca d1e3255219 カラーパレットを適用するようにした 2023-12-10 22:53:59 +09:00
r-ca 0c215013f3 とりあえずコメントアウト 2023-12-10 22:28:21 +09:00
r-ca 5c8fe0998c API 31以上用に変更 2023-12-10 22:25:26 +09:00
r-ca 08361e5d4d Colors 2023-12-10 22:23:15 +09:00
r-ca 12b053f2c1 idea 2023-12-10 19:21:29 +09:00
r-ca 557bc63f95 実際の情報を返すように 2023-12-10 19:21:21 +09:00
r-ca 085e52d4b6 モデル定義 2023-12-10 19:07:49 +09:00
r-ca 24332576e2 パッケージ名のミスを修正, DI実装 2023-12-10 18:27:14 +09:00
r-ca 15ee6f344f HiltModule追加, Bind追加 2023-12-10 18:14:10 +09:00
r-ca c2eec8064b DeviceMeta実装WIP 2023-12-10 18:10:30 +09:00
r-ca 6e3434b7f1 Hiltを依存関係に追加した 2023-12-10 18:05:41 +09:00
r-ca c59fdcf696 DeviceMeta WIP 2023-12-10 18:05:06 +09:00
r-ca 17cc72bd36 :dataモジュール作り直し 2023-12-10 18:03:34 +09:00
r-ca 03877e3e2d :dataモジュール作り直し 2023-12-10 18:02:53 +09:00
r-ca 6d3d9f001e Dataモジュール削除 2023-12-10 17:58:41 +09:00
r-ca 4462ced6ae Dataモジュール削除 2023-12-10 17:58:09 +09:00
r-ca bc0370303f DIテスト 2023-12-10 17:49:08 +09:00
r-ca 7bcc4dbbad DIテスト 2023-12-10 17:43:06 +09:00
r-ca 7e2f97d900 DIテスト 2023-12-10 17:27:28 +09:00
r-ca ce757da3c0 DIテスト 2023-12-10 17:24:21 +09:00
r-ca 6373bd1f47 Add local dependency 2023-12-10 17:23:27 +09:00
r-ca d1373eab9e Add hilt dependency 2023-12-10 17:22:31 +09:00
r-ca 7b4304224b WIP 2023-12-10 17:22:05 +09:00
r-ca f3cb02b6b2 アプリケーションクラス作成 2023-12-10 17:16:12 +09:00
r-ca 65c1996c47 WIP 2023-12-10 17:12:46 +09:00
r-ca 7d5a2316b0 WIP 2023-12-10 16:14:34 +09:00
r-ca 5fd3cde33f 命名修正など 2023-12-09 13:44:42 +09:00
r-ca 8fd1e85bcf レイアウトのミスを修正 2023-12-09 13:41:17 +09:00
r-ca 68a8e75946 とりあえずデバッグメニューを表示できるようにした 2023-12-09 13:40:07 +09:00
r-ca 2d44b20352 WIP 2023-12-09 13:38:15 +09:00
r-ca e3faadef3b WIP 2023-12-09 13:30:36 +09:00
r-ca 944935faba WIP 2023-12-09 13:30:31 +09:00
r-ca b879f2d98e WIP 2023-12-09 12:32:42 +09:00
r-ca afdb560ccb Navigation Componentを依存関係に追加 2023-12-09 10:08:07 +09:00
r-ca 3f1654f76b WIP 2023-12-09 10:06:42 +09:00
r-ca 4ff9c63876 依存関係に追加 2023-12-09 09:56:45 +09:00
r-ca 2190a320e1 :feature:debug追加 2023-12-09 09:55:57 +09:00
r-ca 348a918ab9 :feature:debug追加 2023-12-09 09:55:49 +09:00
r-ca 4b608d986e Add gradle dependency(Project Module) 2023-12-08 18:57:53 +09:00
ろむねこ ab2dc8103e WIP Update README.md 2023-12-08 11:27:01 +09:00
r-ca 648535f17b :data:source:preferenceを追加 2023-12-08 11:21:15 +09:00
r-ca 1805d5fcf6 :data:source, :data:source:databaseを追加 2023-12-08 11:20:24 +09:00
r-ca d4b847acc6 :data, :data:repositoryを追加 2023-12-08 11:19:02 +09:00
r-ca cae849f1c1 :component:common を追加 2023-12-08 11:17:41 +09:00
r-ca 44232ef93f :component:viewerを追加 2023-12-08 11:17:09 +09:00
r-ca 3e81fab284 :component, :component:scannerを追加 2023-12-08 11:16:24 +09:00
r-ca 108bee3010 :feature:common を追加 2023-12-08 11:15:26 +09:00
r-ca 3457475c51 モジュールのインポートを追加 2023-12-07 14:58:03 +09:00
r-ca 9524b305c6 依存関係整理 2023-12-07 14:57:09 +09:00
r-ca 7bb5d5ddfc 依存関係をVersionCatalogに移動 2023-12-07 14:56:50 +09:00
r-ca ff0b272fa4 Navigation関係をversionCatalogsに移動 2023-12-07 14:48:48 +09:00
r-ca 5eb9af56c2 Navigation関係をversionCatalogsに移動 2023-12-07 14:32:57 +09:00
r-ca b49a002896 Navigation Component追加 2023-12-07 14:27:21 +09:00
r-ca c9efb8b93b :feature:scan モジュール作成 2023-12-07 14:26:18 +09:00
r-ca 40ff40b25d :feature:library モジュール作成 2023-12-07 14:25:43 +09:00
r-ca bd6e6f6140 :feature:home, :feature:search モジュール作成 2023-12-07 14:21:21 +09:00
r-ca d55544e2df Revert ":ui:home モジュールを作成"
This reverts commit 474ed831c0.
2023-12-07 13:51:07 +09:00
r-ca d2a7e82f44 Revert "WIP"
This reverts commit 23f6f90b56.
2023-12-07 13:51:07 +09:00
r-ca afb458daf6 Revert "Navigation Componentのアップデート, 別モジュールのインプリメント"
This reverts commit b2b2f3095f.
2023-12-07 13:51:06 +09:00
r-ca 78bba740c2 Revert "モジュールのネームスペースを変更"
This reverts commit 5de7b09967.
2023-12-07 13:51:06 +09:00
r-ca c434e15c06 Revert "WIP"
This reverts commit f9f537b56a.
2023-12-07 13:51:04 +09:00
r-ca 4250351f5b Revert "WIP"
This reverts commit a0e5e77dcb.
2023-12-07 13:51:03 +09:00
r-ca 2b3fb068df Revert "WIP"
This reverts commit bf3a0c4fb8.
2023-12-07 13:51:03 +09:00
r-ca bf3a0c4fb8 WIP 2023-12-07 13:44:02 +09:00
r-ca a0e5e77dcb WIP 2023-12-07 12:53:12 +09:00
r-ca f9f537b56a WIP 2023-12-07 12:39:48 +09:00
r-ca 5de7b09967 モジュールのネームスペースを変更 2023-12-07 12:38:55 +09:00
r-ca b2b2f3095f Navigation Componentのアップデート, 別モジュールのインプリメント 2023-12-07 12:38:40 +09:00
r-ca 23f6f90b56 WIP 2023-12-07 12:22:17 +09:00
r-ca 474ed831c0 :ui:home モジュールを作成 2023-12-07 12:08:51 +09:00
r-ca b10736804b まちがえてKotlin用の書き方で書いてたので修正 2023-12-07 11:27:38 +09:00
r-ca 6bce5197b0 build.gradle変更 2023-12-07 11:27:38 +09:00
r-ca bd5e1d53d6 build.gradle変更 2023-12-07 11:27:38 +09:00
r-ca fa75037ab3 build.gradle変更 2023-12-07 11:27:38 +09:00
r-ca 34d12ee6d8 Hiltをbuild.gradleに追加 2023-12-07 11:27:37 +09:00
r-ca a050e7c411 Android Gradle Pluginのバージョンを8.0.2に変更 2023-12-07 11:27:37 +09:00
r-ca c00177394d コンパイルSDKバージョンを34に変更 2023-12-07 11:27:37 +09:00
r-ca a0ac0d9348 Init 2023-12-07 11:27:36 +09:00
164 changed files with 3615 additions and 0 deletions

No files matched your search

+15
View File
@@ -0,0 +1,15 @@
*.iml
.gradle
/local.properties
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
/build
/captures
.externalNativeBuild
.cxx
local.properties
+3
View File
@@ -0,0 +1,3 @@
# Default ignored files
/shelf/
/workspace.xml
Generated
+1
View File
@@ -0,0 +1 @@
Lacerta
+6
View File
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<bytecodeTargetLevel target="17" />
</component>
</project>
+10
View File
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="deploymentTargetSelector">
<selectionStates>
<SelectionState runConfigName="app">
<option name="selectionMode" value="DROPDOWN" />
</SelectionState>
</selectionStates>
</component>
</project>
+32
View File
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GradleMigrationSettings" migrationVersion="1" />
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="testRunner" value="GRADLE" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="gradleJvm" value="jbr-17" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />
<option value="$PROJECT_DIR$/app" />
<option value="$PROJECT_DIR$/component" />
<option value="$PROJECT_DIR$/component/common" />
<option value="$PROJECT_DIR$/component/scanner" />
<option value="$PROJECT_DIR$/component/viewer" />
<option value="$PROJECT_DIR$/data" />
<option value="$PROJECT_DIR$/feature" />
<option value="$PROJECT_DIR$/feature/common" />
<option value="$PROJECT_DIR$/feature/debug" />
<option value="$PROJECT_DIR$/feature/home" />
<option value="$PROJECT_DIR$/feature/library" />
<option value="$PROJECT_DIR$/feature/scan" />
<option value="$PROJECT_DIR$/feature/search" />
</set>
</option>
<option name="resolveExternalAnnotations" value="false" />
</GradleProjectSettings>
</option>
</component>
</project>
+10
View File
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectMigrations">
<option name="MigrateToGradleLocalJavaHome">
<set>
<option value="$PROJECT_DIR$" />
</set>
</option>
</component>
</project>
+9
View File
@@ -0,0 +1,9 @@
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" project-jdk-name="jbr-17" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">
<option name="id" value="Android" />
</component>
</project>
Generated
+6
View File
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>
+11
View File
@@ -1,2 +1,13 @@
# Lacerta
WIP
## モジュール設計
![Untitled Diagram drawio(2)](https://github.com/lacerta-doc/Lacerta/assets/66072112/47006ffd-0fd3-4eec-8a28-fb9629b990bf)
## コーディング規則/推奨(WIP)
### 規則
- `// TODO`コメントには任意のsuffixを付ける
- 全員が同じ`// TODO:`を使っていると検索がむずかしくなるため
- (例: `// TODO-rca:`)
### 推奨
- マジックナンバーは控える(必要な場合もあるので)
+1
View File
@@ -0,0 +1 @@
/build
+70
View File
@@ -0,0 +1,70 @@
plugins {
id 'com.android.application'
id 'com.google.dagger.hilt.android'
}
android {
namespace 'one.nem.lacerta'
compileSdk 34
defaultConfig {
applicationId "one.nem.lacerta"
minSdk 26
targetSdk 33
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation libs.androidx.appcompat
implementation libs.com.google.android.material
implementation libs.androidx.constraintlayout
testImplementation libs.junit
androidTestImplementation libs.androidx.test.ext.junit
androidTestImplementation libs.androidx.test.espresso.core
// 内部モジュール
// Feature
implementation project(':feature:home')
implementation project(':feature:search')
implementation project(':feature:library')
implementation project(':feature:scan')
implementation project(':feature:debug') // デバッグメニュー
// // Component
// implementation project(':component:common')
// implementation project(':component:scanner')
// implementation project(':component:viewer')
// // Data
// implementation project(':data:repository')
//
// // Source
// implementation project(':data:source:database')
// implementation project(':data:source:preference')
//
implementation project(':data')
// Hilt (DI)
implementation libs.com.google.dagger.hilt.android
annotationProcessor libs.com.google.dagger.hilt.compiler
// Navigation
implementation libs.navigation.fragment
implementation libs.navigation.ui
implementation libs.navigation.dynamic.features.fragment
}
+21
View File
@@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
@@ -0,0 +1,26 @@
package one.nem.lacerta;
import android.content.Context;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
assertEquals("one.nem.lacerta", appContext.getPackageName());
}
}
+27
View File
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<application
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
android:icon="@mipmap/ic_launcher"
android:name=".LacertaApplication"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.Lacerta"
tools:targetApi="31">
<activity
android:name=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
@@ -0,0 +1,16 @@
package one.nem.lacerta;
import android.app.Application;
import com.google.android.material.color.DynamicColors;
import dagger.hilt.android.HiltAndroidApp;
@HiltAndroidApp
public class LacertaApplication extends Application {
@Override
public void onCreate() {
super.onCreate();
DynamicColors.applyToActivitiesIfAvailable(this);
}
}
@@ -0,0 +1,40 @@
package one.nem.lacerta;
import androidx.appcompat.app.AppCompatActivity;
import androidx.fragment.app.FragmentManager;
import androidx.navigation.NavController;
import androidx.navigation.fragment.NavHostFragment;
import androidx.navigation.ui.NavigationUI;
import android.os.Bundle;
import android.widget.Toast;
import com.google.android.material.bottomnavigation.BottomNavigationView;
import dagger.hilt.android.AndroidEntryPoint;
import javax.inject.Inject;
@AndroidEntryPoint
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
// Debug
FragmentManager supportFragmentManager = getSupportFragmentManager();
NavHostFragment navHostFragment = (NavHostFragment) supportFragmentManager.findFragmentById(R.id.nav_host_fragment);
NavController navController = navHostFragment.getNavController();
BottomNavigationView bottomNavigationView = findViewById(R.id.bottom_nav);
NavigationUI.setupWithNavController(bottomNavigationView, navController);
Toast.makeText(this, "testMessage", Toast.LENGTH_SHORT).show();
}
}
@@ -0,0 +1,170 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path
android:fillColor="#3DDC84"
android:pathData="M0,0h108v108h-108z" />
<path
android:fillColor="#00000000"
android:pathData="M9,0L9,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,0L19,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M29,0L29,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,0L39,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,0L49,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,0L59,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,0L69,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,0L79,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M89,0L89,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M99,0L99,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,9L108,9"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,19L108,19"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,29L108,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,39L108,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,49L108,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,59L108,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,69L108,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,79L108,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,89L108,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,99L108,99"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,29L89,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,39L89,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,49L89,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,59L89,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,69L89,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,79L89,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M29,19L29,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,19L39,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,19L49,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,19L59,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,19L69,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,19L79,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
</vector>
@@ -0,0 +1,30 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="85.84757"
android:endY="92.4963"
android:startX="42.9492"
android:startY="49.59793"
android:type="linear">
<item
android:color="#44000000"
android:offset="0.0" />
<item
android:color="#00000000"
android:offset="1.0" />
</gradient>
</aapt:attr>
</path>
<path
android:fillColor="#FFFFFF"
android:fillType="nonZero"
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
android:strokeWidth="1"
android:strokeColor="#00000000" />
</vector>
+31
View File
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<androidx.fragment.app.FragmentContainerView
android:id="@+id/nav_host_fragment"
android:name="androidx.navigation.fragment.NavHostFragment"
android:layout_width="0dp"
android:layout_height="0dp"
app:defaultNavHost="true"
app:layout_constraintBottom_toTopOf="@+id/bottom_nav"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:navGraph="@navigation/main_nav"
tools:layout="@layout/fragment_debug_menu" />
<com.google.android.material.bottomnavigation.BottomNavigationView
android:id="@+id/bottom_nav"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:menu="@menu/bottom_nav_menu"/>
</androidx.constraintlayout.widget.ConstraintLayout>
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:id="@id/feature_debug_navigation"
android:title="DebugMenu"/>
</menu>
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 982 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

+10
View File
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<navigation xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/app_main_nav"
app:startDestination="@id/feature_debug_navigation">
<include app:graph="@navigation/feature_debug_navigation" />
</navigation>
+7
View File
@@ -0,0 +1,7 @@
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="Base.Theme.Lacerta" parent="Theme.Material3.DayNight.NoActionBar">
<!-- Customize your dark theme here. -->
<!-- <item name="colorPrimary">@color/my_dark_primary</item> -->
</style>
</resources>
+61
View File
@@ -0,0 +1,61 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- UI -->
<color name="ui_bg">@android:color/system_neutral1_50</color>
<color name="ui_fg">@android:color/system_neutral1_900</color>
<color name="ui_fg_disabled">@android:color/system_neutral1_400</color>
<color name="ui_fg_secondary">@android:color/system_neutral2_600</color> <!-- A12 B2: 700 -->
<color name="ui_accent">@color/accent_dark</color>
<color name="ui_accent_inverse">@color/accent_light</color>
<color name="ui_accent_variant">@color/accent_variant_dark</color>
<color name="ui_surface">@android:color/system_accent1_50</color>
<color name="ui_primary_surface">@android:color/system_accent1_100</color>
<color name="changelog_bg">@android:color/system_neutral2_50</color>
<color name="changelog_border">@android:color/system_neutral1_400</color>
<color name="error">#DA000E</color>
<color name="success">#008753</color>
<!-- Launcher icon -->
<color name="launcher_fg">@android:color/system_neutral2_700</color>
<color name="launcher_bg">@android:color/background_light</color>
<color name="accent_light">@android:color/system_accent1_300</color>
<color name="accent_dark">@android:color/system_accent1_600</color>
<color name="accent_variant_light">@android:color/system_accent3_100</color>
<color name="accent_variant_dark">@android:color/system_accent3_600</color>
<!-- Material3 colors -->
<color name="colorPrimaryLight">@color/material_dynamic_primary40</color>
<color name="colorPrimaryDark">@color/material_dynamic_primary80</color>
<color name="colorPrimaryContainerLight">@color/material_dynamic_primary90</color>
<color name="colorPrimaryContainerDark">@color/material_dynamic_primary30</color>
<color name="colorOnPrimaryContainerLight">@color/material_dynamic_primary10</color>
<color name="colorOnPrimaryContainerDark">@color/material_dynamic_primary90</color>
<color name="colorSecondaryContainerLight">@color/material_dynamic_secondary90</color>
<color name="colorSecondaryContainerDark">@color/material_dynamic_secondary90</color>
<color name="colorOnSecondaryContainerLight">@color/material_dynamic_secondary10</color>
<color name="colorOnSecondaryContainerDark">@color/material_dynamic_secondary10</color>
<color name="colorTertiaryLight">@color/material_dynamic_tertiary40</color>
<color name="colorTertiaryDark">@color/material_dynamic_tertiary80</color>
<color name="colorOnTertiaryLight">@color/material_dynamic_primary100</color>
<color name="colorOnTertiaryDark">@color/material_dynamic_tertiary20</color>
<color name="colorTertiaryContainerLight">@color/material_dynamic_tertiary90</color>
<color name="colorTertiaryContainerDark">@color/material_dynamic_tertiary30</color>
<color name="colorOnTertiaryContainerLight">@color/material_dynamic_tertiary10</color>
<color name="colorOnTertiaryContainerDark">@color/material_dynamic_tertiary90</color>
<color name="colorSurfaceLight">@color/material_dynamic_neutral99</color>
<color name="colorSurfaceDark">@color/material_dynamic_neutral10</color>
<color name="colorOnSurfaceLight">@color/material_dynamic_neutral10</color>
<color name="colorOnSurfaceDark">@color/material_dynamic_neutral90</color>
<color name="colorSurfaceVariantLight">@color/material_dynamic_neutral_variant90</color>
<color name="colorSurfaceVariantDark">@color/material_dynamic_neutral_variant30</color>
<color name="colorOnSurfaceVariantLight">@color/material_dynamic_neutral_variant30</color>
<color name="colorOnSurfaceVariantDark">@color/material_dynamic_neutral_variant80</color>
<color name="colorOutlineLight">@color/material_dynamic_neutral_variant50</color>
<color name="colorOutlineDark">@color/material_dynamic_neutral_variant60</color>
<color name="colorErrorContainerLight">#FFF9DEDC</color>
<color name="colorErrorContainerDark">#FF8C1D18</color>
<color name="colorOnErrorContainerLight">#FF410E0B</color>
<color name="colorOnErrorContainerDark">#FFF9DEDC</color>
</resources>
+3
View File
@@ -0,0 +1,3 @@
<resources>
<string name="app_name">Lacerta</string>
</resources>
+9
View File
@@ -0,0 +1,9 @@
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="Base.Theme.Lacerta" parent="Theme.Material3.DayNight.NoActionBar">
<!-- Customize your light theme here. -->
<!-- <item name="colorPrimary">@color/my_light_primary</item> -->
</style>
<style name="Theme.Lacerta" parent="Base.Theme.Lacerta" />
</resources>
+13
View File
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?><!--
Sample backup rules file; uncomment and customize as necessary.
See https://developer.android.com/guide/topics/data/autobackup
for details.
Note: This file is ignored for devices older that API 31
See https://developer.android.com/about/versions/12/backup-restore
-->
<full-backup-content>
<!--
<include domain="sharedpref" path="."/>
<exclude domain="sharedpref" path="device.xml"/>
-->
</full-backup-content>
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?><!--
Sample data extraction rules file; uncomment and customize as necessary.
See https://developer.android.com/about/versions/12/backup-restore#xml-changes
for details.
-->
<data-extraction-rules>
<cloud-backup>
<!-- TODO: Use <include> and <exclude> to control what is backed up.
<include .../>
<exclude .../>
-->
</cloud-backup>
<!--
<device-transfer>
<include .../>
<exclude .../>
</device-transfer>
-->
</data-extraction-rules>
@@ -0,0 +1,17 @@
package one.nem.lacerta;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
}
+6
View File
@@ -0,0 +1,6 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id 'com.android.application' version '8.0.2' apply false
id 'com.google.dagger.hilt.android' version '2.44' apply false
id 'com.android.library' version '8.0.2' apply false
}
+1
View File
@@ -0,0 +1 @@
/build
+35
View File
@@ -0,0 +1,35 @@
plugins {
alias(libs.plugins.com.android.library)
}
android {
namespace 'one.nem.lacerta.component.common'
compileSdk 33
defaultConfig {
minSdk 26
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation libs.androidx.appcompat
implementation libs.com.google.android.material
testImplementation libs.junit
androidTestImplementation libs.androidx.test.ext.junit
androidTestImplementation libs.androidx.test.espresso.core
}
View File
Whitespace-only changes.
+21
View File
@@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
@@ -0,0 +1,26 @@
package one.nem.lacerta.component.common;
import android.content.Context;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
assertEquals("one.nem.lacerta.component.common.test", appContext.getPackageName());
}
}
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
</manifest>
@@ -0,0 +1,17 @@
package one.nem.lacerta.component.common;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
}
+1
View File
@@ -0,0 +1 @@
/build
+37
View File
@@ -0,0 +1,37 @@
plugins {
alias(libs.plugins.com.android.library)
}
android {
namespace 'one.nem.lacerta.component.scanner'
compileSdk 33
defaultConfig {
minSdk 26
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation libs.androidx.appcompat
implementation libs.com.google.android.material
testImplementation libs.junit
androidTestImplementation libs.androidx.test.ext.junit
androidTestImplementation libs.androidx.test.espresso.core
implementation 'com.websitebeaver:documentscanner:1.0.0'
}
Whitespace-only changes.
+21
View File
@@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
@@ -0,0 +1,26 @@
package one.nem.lacerta.component.scanner;
import android.content.Context;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
assertEquals("one.nem.lacerta.component.scanner.test", appContext.getPackageName());
}
}
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
</manifest>
@@ -0,0 +1,75 @@
package one.nem.lacerta.component.scanner;
import android.graphics.BitmapFactory;
import android.os.Bundle;
import androidx.constraintlayout.utils.widget.ImageFilterView;
import androidx.fragment.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.websitebeaver.documentscanner.DocumentScanner;
/**
* A simple {@link Fragment} subclass.
* Use the {@link ScannerScanFragment#newInstance} factory method to
* create an instance of this fragment.
*/
public class ScannerScanFragment extends Fragment {
// TODO: Rename parameter arguments, choose names that match
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
// private static final String MAX_SCAN_COUNT = "max_scan_count"; // 規定値
// TODO: Rename and change types of parameters
private String mParam1;
public ScannerScanFragment() {
// Required empty public constructor
}
public static ScannerScanFragment newInstance(String param1) {
ScannerScanFragment fragment = new ScannerScanFragment();
Bundle args = new Bundle();
// args.putString(MAX_SCAN_COUNT, param1);
fragment.setArguments(args);
return fragment;
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (getArguments() != null) {
// mParam1 = getArguments().getString(MAX_SCAN_COUNT);
// scan(Integer.parseInt(mParam1));
}
}
public DocumentScanner getDocumentScanner() {
return new DocumentScanner(
this,
(croppedImageResults) -> {
// display the first cropped image
croppedImageView.setImageBitmap(
BitmapFactory.decodeFile(croppedImageResults.get(0))
);
return null;
},
(errorMessage) -> {
// an error happened
return null;
},
() -> {
// user canceled document scan
return null;
},
null,
null,
null
);
}
}
@@ -0,0 +1,64 @@
package one.nem.lacerta.component.scanner;
import android.os.Bundle;
import androidx.fragment.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
/**
* A simple {@link Fragment} subclass.
* Use the {@link ScannerScanResultFragment#newInstance} factory method to
* create an instance of this fragment.
*/
public class ScannerScanResultFragment extends Fragment {
// TODO: Rename parameter arguments, choose names that match
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
private static final String ARG_PARAM1 = "param1";
private static final String ARG_PARAM2 = "param2";
// TODO: Rename and change types of parameters
private String mParam1;
private String mParam2;
public ScannerScanResultFragment() {
// Required empty public constructor
}
/**
* Use this factory method to create a new instance of
* this fragment using the provided parameters.
*
* @param param1 Parameter 1.
* @param param2 Parameter 2.
* @return A new instance of fragment ScannerScanResultFragment.
*/
// TODO: Rename and change types and number of parameters
public static ScannerScanResultFragment newInstance(String param1, String param2) {
ScannerScanResultFragment fragment = new ScannerScanResultFragment();
Bundle args = new Bundle();
args.putString(ARG_PARAM1, param1);
args.putString(ARG_PARAM2, param2);
fragment.setArguments(args);
return fragment;
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (getArguments() != null) {
mParam1 = getArguments().getString(ARG_PARAM1);
mParam2 = getArguments().getString(ARG_PARAM2);
}
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
return inflater.inflate(R.layout.fragment_scanner_scan_result, container, false);
}
}
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".ScannerScanFragment">
<!-- TODO: Update blank fragment layout -->
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/hello_blank_fragment" />
</FrameLayout>
@@ -0,0 +1,133 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".MainActivity">
<androidx.constraintlayout.utils.widget.ImageFilterView
android:id="@+id/cropped_image_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintBottom_toTopOf="@+id/linear_layout_buttons">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:layout_margin="12dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="0"
android:text="Saturation" />
<SeekBar
android:id="@+id/seekBar_saturation"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:max="200"
android:progress="100"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:layout_margin="12dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="0"
android:text="Contrast" />
<SeekBar
android:id="@+id/seekBar_contrast"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:max="200"
android:progress="100"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:layout_margin="12dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="0"
android:text="Brightness" />
<SeekBar
android:id="@+id/seekBar_brightness"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:max="200"
android:progress="100"
android:layout_weight="1"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:layout_margin="12dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="0"
android:text="Warmth" />
<SeekBar
android:id="@+id/seekBar_warmth"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:max="500"
android:progress="100"
android:layout_weight="1"/>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/linear_layout_buttons"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent">
<Button
android:id="@+id/button_save_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:insetLeft="12dp"
android:insetRight="12dp"
android:text="Save Image" />
<Button
android:id="@+id/button_kill_me"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:insetLeft="12dp"
android:insetRight="12dp"
android:text="Kill me" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
@@ -0,0 +1,4 @@
<resources>
<!-- TODO: Remove or change this placeholder text -->
<string name="hello_blank_fragment">Hello blank fragment</string>
</resources>
@@ -0,0 +1,17 @@
package one.nem.lacerta.component.scanner;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
}
+1
View File
@@ -0,0 +1 @@
/build
+35
View File
@@ -0,0 +1,35 @@
plugins {
alias(libs.plugins.com.android.library)
}
android {
namespace 'one.nem.lacerta.component.viewer'
compileSdk 33
defaultConfig {
minSdk 26
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation libs.androidx.appcompat
implementation libs.com.google.android.material
testImplementation libs.junit
androidTestImplementation libs.androidx.test.ext.junit
androidTestImplementation libs.androidx.test.espresso.core
}
View File
Whitespace-only changes.
+21
View File
@@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
@@ -0,0 +1,26 @@
package one.nem.lacerta.component.viewer;
import android.content.Context;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
assertEquals("one.nem.lacerta.component.viewer.test", appContext.getPackageName());
}
}
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
</manifest>
@@ -0,0 +1,17 @@
package one.nem.lacerta.component.viewer;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
}
+1
View File
@@ -0,0 +1 @@
/build
+43
View File
@@ -0,0 +1,43 @@
plugins {
alias(libs.plugins.com.android.library)
id 'com.google.dagger.hilt.android'
}
android {
namespace 'one.nem.lacerta.data'
compileSdk 34
defaultConfig {
minSdk 24
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation libs.androidx.appcompat
implementation libs.com.google.android.material
testImplementation libs.junit
androidTestImplementation libs.androidx.test.ext.junit
androidTestImplementation libs.androidx.test.espresso.core
// Hilt (DI)
implementation libs.com.google.dagger.hilt.android
annotationProcessor libs.com.google.dagger.hilt.compiler
// libsディレクトリにあるライブラリを追加
implementation fileTree(dir: 'libs', include: ['*.jar'])
}
View File
Whitespace-only changes.
Binary file not shown.
+21
View File
@@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
@@ -0,0 +1,26 @@
package one.nem.lacerta.data;
import android.content.Context;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
assertEquals("one.nem.lacerta.data.test", appContext.getPackageName());
}
}
+4
View File
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
</manifest>
@@ -0,0 +1,26 @@
package one.nem.lacerta.data.impl;
import android.os.Build;
import one.nem.lacerta.data.repository.DeviceMeta;
import one.nem.lacerta.data.model.DeviceMetaModel;
import javax.inject.Inject;
public class DeviceMetaImpl implements DeviceMeta{
@Inject
public DeviceMetaImpl() {
}
public DeviceMetaModel getDeviceMeta() {
DeviceMetaModel deviceMetaModel = new DeviceMetaModel(
Build.MANUFACTURER,
Build.MODEL,
Build.VERSION.RELEASE,
Build.VERSION.SDK_INT
);
return deviceMetaModel;
}
}
@@ -0,0 +1,24 @@
package one.nem.lacerta.data.impl;
import java.util.ArrayList;
import java.util.List;
import javax.inject.Inject;
import one.nem.lacerta.data.model.documents.DocumentMeta;
import one.nem.lacerta.data.repository.Documents;
public class DocumentsImpl implements Documents {
@Inject
public DocumentsImpl() {
}
public ArrayList<DocumentMeta> getRecentDocuments(int limit) {
return null; // TODO-rca:
}
public ArrayList<DocumentMeta> getStarredDocuments(int limit) {
return null; // TODO-rca:
}
}
@@ -0,0 +1,26 @@
package one.nem.lacerta.data.impl;
import android.content.Context;
import android.content.SharedPreferences;
import javax.inject.Inject;
import dagger.hilt.android.qualifiers.ApplicationContext;
import one.nem.lacerta.data.repository.SharedPref;
import one.nem.lacerta.data.model.shared_pref.enums.SharedPrefType;
public class SharedPrefImpl implements SharedPref{
private final Context applicationContext;
@Inject
public SharedPrefImpl(@ApplicationContext Context applicationContext) {
this.applicationContext = applicationContext;
}
@Override
public SharedPreferences getSharedPreferencesByTag(SharedPrefType sharedPrefType) {
return applicationContext.getSharedPreferences(sharedPrefType.getTag(), Context.MODE_PRIVATE);
}
}
@@ -0,0 +1,56 @@
package one.nem.lacerta.data.impl.stub;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import java.util.UUID;
import java.util.Date;
import javax.inject.Inject;
import one.nem.lacerta.data.model.documents.DocumentMeta;
import one.nem.lacerta.data.model.documents.enums.DocumentType;
import one.nem.lacerta.data.repository.Documents;
public class DocumentsImpl implements Documents {
@Inject
public DocumentsImpl() {
}
public ArrayList<DocumentMeta> getRecentDocuments(int limit) { // Generate dummy data
ArrayList<DocumentMeta> documentMetaList = new ArrayList<>();
for (int i = 0; i < limit; i++) {
DocumentMeta documentMeta = new DocumentMeta();
documentMeta.id = UUID.randomUUID().toString();
documentMeta.name = "Document " + i;
documentMeta.created = new Date();
documentMeta.type = new Random(i).nextInt()/2 == 0 ? DocumentType.OTHER : DocumentType.NOTEBOOK;
documentMeta.tags = new String[] {"tag1", "tag2", "tag3"};
documentMeta.categories = new String[] {"category1", "category2", "category3"};
documentMetaList.add(documentMeta);
}
return documentMetaList;
}
public ArrayList<DocumentMeta> getStarredDocuments(int limit) { // Generate dummy data
ArrayList<DocumentMeta> documentMetaList = new ArrayList<>();
for (int i = 0; i < limit; i++) {
DocumentMeta documentMeta = new DocumentMeta();
documentMeta.id = UUID.randomUUID().toString();
documentMeta.name = "Document " + i;
documentMeta.created = new Date();
documentMeta.type = new Random(i).nextInt()/2 == 0 ? DocumentType.OTHER : DocumentType.NOTEBOOK;
documentMeta.tags = new String[] {"tag1", "tag2", "tag3"};
documentMeta.categories = new String[] {"category1", "category2", "category3"};
documentMetaList.add(documentMeta);
}
return documentMetaList;
}
}
@@ -0,0 +1,34 @@
package one.nem.lacerta.data.model;
public class DeviceMetaModel {
private String DeviceManufacturer;
private String DeviceModel;
private String AndroidVersion;
private int AndroidApiLevel;
public DeviceMetaModel(String DeviceManufacturer, String DeviceModel, String AndroidVersion, int AndroidApiLevel) {
this.DeviceManufacturer = DeviceManufacturer;
this.DeviceModel = DeviceModel;
this.AndroidVersion = AndroidVersion;
this.AndroidApiLevel = AndroidApiLevel;
}
// Getters
// TODO-rca: ボイラープレートコードなので削減する
public String getDeviceManufacturer() {
return DeviceManufacturer;
}
public String getDeviceModel() {
return DeviceModel;
}
public String getAndroidVersion() {
return AndroidVersion;
}
public int getAndroidApiLevel() {
return AndroidApiLevel;
}
}
@@ -0,0 +1,8 @@
package one.nem.lacerta.data.model.documents;
public class DocumentDetail {
// ドキュメントの詳細情報
private DocumentMeta documentMeta;
// TODO-rca: ドキュメントの詳細情報を格納するフィールドを追加する
}
@@ -0,0 +1,107 @@
package one.nem.lacerta.data.model.documents;
import java.util.Date;
import one.nem.lacerta.data.model.documents.enums.DocumentType;
// TODO-rca: Dateをデバイスのロケールに合わせてStringに変換するメソッドを実装する?
public class DocumentMeta {
// ドキュメントのメタ情報
public String id; // ドキュメントの内部ID(UUIDv4?)
public String name; // ドキュメントの名前
public DocumentType type; // ドキュメントの種類
public Date created; // ドキュメントの作成日時
public String[] tags; // ドキュメントのタグ
public String[] categories; // ドキュメントのカテゴリ
public DocumentMeta(String id, String name, Date created, DocumentType type, String[] tags, String[] categories) {
this.id = id;
this.name = name;
this.created = created;
this.type = type;
this.tags = tags;
this.categories = categories;
}
public DocumentMeta() {
this.id = "";
this.name = "";
this.created = new Date();
this.type = DocumentType.OTHER;
this.tags = new String[0];
this.categories = new String[0];
}
// TODO-rca: ボイラープレートコードなので削減する
// Getter
public String getId() {
return id;
}
public String getName() {
return name;
}
public Date getCreated() {
return created;
}
public DocumentType getType() {
return type;
}
public String[] getTags() {
return tags;
}
public String[] getCategories() {
return categories;
}
// Setter
public void setId(String id) {
this.id = id;
}
public void setName(String name) {
if (name == null) {
this.name = "";
} else {
this.name = name;
}
}
public void setCreated(Date created) {
if (created == null) {
this.created = new Date();
} else {
this.created = created;
}
}
public void setType(DocumentType type) {
if (type == null) {
this.type = DocumentType.OTHER;
} else {
this.type = type;
}
}
public void setTags(String[] tags) {
if (tags == null) {
this.tags = new String[0];
} else {
this.tags = tags;
}
}
public void setCategories(String[] categories) {
if (categories == null) {
this.categories = new String[0];
} else {
this.categories = categories;
}
}
}
@@ -0,0 +1,21 @@
package one.nem.lacerta.data.model.documents.enums;
public enum DocumentType {
// ドキュメントの種類
// TODO: ユーザーがドキュメントの種類を追加できるようにする
// テキスト
TEXTBOOK,
// ノート
NOTEBOOK,
// ワークブック
WORKBOOK,
// レシート
RECEIPT,
// チケット
TICKET,
// メモ
MEMO,
// その他
OTHER
}
@@ -0,0 +1,17 @@
package one.nem.lacerta.data.model.shared_pref.enums;
public enum SharedPrefType {
COMMON("common"),
USERDATA("userdata");
private String tag;
SharedPrefType(String tag) {
this.tag = tag;
}
public String getTag() {
return tag;
}
}
@@ -0,0 +1,19 @@
package one.nem.lacerta.data.module;
import one.nem.lacerta.data.impl.DeviceMetaImpl;
import one.nem.lacerta.data.repository.DeviceMeta;
import dagger.Binds;
import dagger.Module;
import dagger.hilt.InstallIn;
// Singleton
import dagger.hilt.components.SingletonComponent;
@Module
@InstallIn(SingletonComponent.class)
abstract class DeviceMetaModule {
@Binds
public abstract DeviceMeta bindDeviceMeta(DeviceMetaImpl deviceMetaImpl);
}
@@ -0,0 +1,18 @@
package one.nem.lacerta.data.module;
import dagger.Binds;
import dagger.Module;
import dagger.hilt.InstallIn;
import dagger.hilt.components.SingletonComponent;
import one.nem.lacerta.data.repository.Documents;
import one.nem.lacerta.data.impl.DocumentsImpl;
@Module
@InstallIn(SingletonComponent.class)
abstract public class DocumentsModule {
@Binds
public abstract Documents bindDocuments(DocumentsImpl documentsImpl);
}
@@ -0,0 +1,19 @@
package one.nem.lacerta.data.module;
import android.content.Context;
import android.content.SharedPreferences;
import dagger.Binds;
import dagger.Module;
import dagger.hilt.InstallIn;
import dagger.hilt.components.SingletonComponent;
import one.nem.lacerta.data.impl.SharedPrefImpl;
import one.nem.lacerta.data.repository.SharedPref;
@Module
@InstallIn(SingletonComponent.class)
abstract public class SharedPrefModule {
@Binds
public abstract SharedPref bindSharedPref(SharedPrefImpl sharedPrefImpl);
}
@@ -0,0 +1,7 @@
package one.nem.lacerta.data.repository;
import one.nem.lacerta.data.model.DeviceMetaModel;
public interface DeviceMeta {
DeviceMetaModel getDeviceMeta();
}
@@ -0,0 +1,15 @@
package one.nem.lacerta.data.repository;
import java.util.ArrayList;
import java.util.List;
import one.nem.lacerta.data.model.documents.DocumentDetail;
import one.nem.lacerta.data.model.documents.DocumentMeta;
public interface Documents {
ArrayList<DocumentMeta> getRecentDocuments(int limit);
ArrayList<DocumentMeta> getStarredDocuments(int limit);
}
@@ -0,0 +1,11 @@
package one.nem.lacerta.data.repository;
import android.content.SharedPreferences;
import one.nem.lacerta.data.model.shared_pref.enums.SharedPrefType;
public interface SharedPref {
// タグのTypoを防ぐ為にEnumで管理して取得させるやつ
SharedPreferences getSharedPreferencesByTag(SharedPrefType sharedPrefType);
}
Whitespace-only changes.
Whitespace-only changes.
Whitespace-only changes.
Whitespace-only changes.
@@ -0,0 +1,60 @@
package one.nem.lacerta.source.pref.impl;
import android.content.Context;
import android.content.SharedPreferences;
import androidx.appcompat.app.AppCompatActivity;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
import javax.inject.Inject;
import dagger.hilt.android.AndroidEntryPoint;
import dagger.hilt.android.qualifiers.ApplicationContext;
import one.nem.lacerta.source.pref.repository.Common;
public class CommonImpl implements Common {
Context applicationContext;
@Inject
public CommonImpl(@ApplicationContext Context applicationContext) {
this.applicationContext = applicationContext;
}
public String getStringValue(String key) {
SharedPreferences pref = applicationContext.getSharedPreferences("common", Context.MODE_PRIVATE);
return pref.getString(key, "");
}
public void setStringValue(String key, String value) {
SharedPreferences pref = applicationContext.getSharedPreferences("common", Context.MODE_PRIVATE);
SharedPreferences.Editor editor = pref.edit();
editor.putString(key, value);
editor.apply();
}
public boolean isExist(String key) {
SharedPreferences pref = applicationContext.getSharedPreferences("common", Context.MODE_PRIVATE);
return pref.contains(key);
}
public void remove(String key) {
SharedPreferences pref = applicationContext.getSharedPreferences("common", Context.MODE_PRIVATE);
SharedPreferences.Editor editor = pref.edit();
editor.remove(key);
editor.apply();
}
public ArrayList<String> getExistKeys() {
SharedPreferences pref = applicationContext.getSharedPreferences("common", Context.MODE_PRIVATE);
// キーだけをArrayListに切り出す
return new ArrayList<>(pref.getAll().keySet());
}
}
Whitespace-only changes.
Whitespace-only changes.
@@ -0,0 +1,16 @@
package one.nem.lacerta.source.pref.module;
import dagger.Binds;
import dagger.Module;
import dagger.hilt.InstallIn;
import dagger.hilt.components.SingletonComponent;
import one.nem.lacerta.source.pref.impl.CommonImpl;
import one.nem.lacerta.source.pref.repository.Common;
@Module
@InstallIn(SingletonComponent.class)
abstract public class CommonModule {
@Binds
public abstract Common bindCommon(CommonImpl commonImpl);
}
Whitespace-only changes.
Loaded 100 of 164 files, more files were not shown because too many files have changed in this diff. Show more