完成版
15
.gitignore
vendored
Normal 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
|
||||||
1
app/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
/build
|
||||||
BIN
app/ARDrawingGallery.jks
Normal file
62
app/build.gradle.kts
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
import java.text.SimpleDateFormat
|
||||||
|
import java.util.Date
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
alias(libs.plugins.android.application)
|
||||||
|
}
|
||||||
|
val timestamp: String = SimpleDateFormat("MM_dd_HH_mm").format(Date())
|
||||||
|
android {
|
||||||
|
namespace = "com.ardraw.ardrawinggallery"
|
||||||
|
compileSdk = 35
|
||||||
|
|
||||||
|
defaultConfig {
|
||||||
|
applicationId = "com.ardraw.ardrawinggallery"
|
||||||
|
minSdk = 23
|
||||||
|
targetSdk = 35
|
||||||
|
versionCode = 1
|
||||||
|
versionName = "1.0.0"
|
||||||
|
setProperty("archivesBaseName", "AR Drawing Gallery_V " + versionName + "(${versionCode})_$timestamp")
|
||||||
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||||
|
}
|
||||||
|
|
||||||
|
buildFeatures {
|
||||||
|
viewBinding = true
|
||||||
|
}
|
||||||
|
|
||||||
|
buildTypes {
|
||||||
|
release {
|
||||||
|
isMinifyEnabled = true
|
||||||
|
proguardFiles(
|
||||||
|
getDefaultProguardFile("proguard-android-optimize.txt"),
|
||||||
|
"proguard-rules.pro"
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
compileOptions {
|
||||||
|
sourceCompatibility = JavaVersion.VERSION_11
|
||||||
|
targetCompatibility = JavaVersion.VERSION_11
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
|
||||||
|
implementation(libs.appcompat)
|
||||||
|
implementation(libs.material)
|
||||||
|
implementation(libs.activity)
|
||||||
|
implementation(libs.constraintlayout)
|
||||||
|
testImplementation(libs.junit)
|
||||||
|
androidTestImplementation(libs.ext.junit)
|
||||||
|
androidTestImplementation(libs.espresso.core)
|
||||||
|
|
||||||
|
implementation("com.github.bumptech.glide:glide:4.16.0")
|
||||||
|
annotationProcessor("com.github.bumptech.glide:compiler:4.16.0")
|
||||||
|
|
||||||
|
implementation ("androidx.room:room-runtime:2.6.1")
|
||||||
|
annotationProcessor ("androidx.room:room-compiler:2.6.1")
|
||||||
|
|
||||||
|
implementation ("androidx.camera:camera-core:1.4.1")
|
||||||
|
implementation ("androidx.camera:camera-lifecycle:1.4.1")
|
||||||
|
implementation ("androidx.camera:camera-view:1.4.1")
|
||||||
|
implementation ("androidx.camera:camera-extensions:1.4.1")
|
||||||
|
implementation ("androidx.camera:camera-camera2:1.4.1")
|
||||||
|
}
|
||||||
34
app/proguard-rules.pro
vendored
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
# 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
|
||||||
|
|
||||||
|
-keepclassmembers class com.ardraw.ardrawinggallery.util.DatabaseUtil {
|
||||||
|
public static final java.lang.String DATABASE_NAME;
|
||||||
|
public static final int DATABASE_VERSION;
|
||||||
|
}
|
||||||
|
|
||||||
|
-keepclassmembers class * {
|
||||||
|
@androidx.room.Query <methods>;
|
||||||
|
}
|
||||||
|
|
||||||
|
-keep class com.ardraw.ardrawinggallery.room.AppDatabase { *; }
|
||||||
|
-keep class com.ardraw.ardrawinggallery.room.ArData { *; }
|
||||||
|
-keep class com.ardraw.ardrawinggallery.room.ArDataDao { *; }
|
||||||
@ -0,0 +1,26 @@
|
|||||||
|
package com.ardraw.ardrawinggallery;
|
||||||
|
|
||||||
|
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("com.ardraw.ardrawinggallery", appContext.getPackageName());
|
||||||
|
}
|
||||||
|
}
|
||||||
50
app/src/main/AndroidManifest.xml
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
|
<uses-permission android:name="android.permission.CAMERA" />
|
||||||
|
<uses-permission android:name="android.permission.FLASHLIGHT" />
|
||||||
|
|
||||||
|
<uses-feature android:name="android.hardware.camera" />
|
||||||
|
|
||||||
|
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
|
||||||
|
<uses-permission
|
||||||
|
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
|
||||||
|
android:maxSdkVersion="32"
|
||||||
|
tools:ignore="ScopedStorage" />
|
||||||
|
<uses-permission
|
||||||
|
android:name="android.permission.READ_EXTERNAL_STORAGE"
|
||||||
|
android:maxSdkVersion="32" />
|
||||||
|
|
||||||
|
<application
|
||||||
|
android:name=".MyApplication"
|
||||||
|
android:allowBackup="true"
|
||||||
|
android:dataExtractionRules="@xml/data_extraction_rules"
|
||||||
|
android:fullBackupContent="@xml/backup_rules"
|
||||||
|
android:icon="@mipmap/ic_launcher"
|
||||||
|
android:label="@string/app_name"
|
||||||
|
android:roundIcon="@mipmap/ic_launcher_round"
|
||||||
|
android:supportsRtl="true"
|
||||||
|
android:theme="@style/Theme.ARDrawingGallery"
|
||||||
|
tools:targetApi="31">
|
||||||
|
<activity
|
||||||
|
android:name=".activity.MainActivity"
|
||||||
|
android:exported="false" />
|
||||||
|
<activity
|
||||||
|
android:name=".activity.PaintActivity"
|
||||||
|
android:exported="false" />
|
||||||
|
<activity
|
||||||
|
android:name=".activity.SubActivity"
|
||||||
|
android:exported="false" />
|
||||||
|
<activity
|
||||||
|
android:name=".activity.LaunchActivity"
|
||||||
|
android:exported="true">
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.intent.action.MAIN" />
|
||||||
|
|
||||||
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
|
</intent-filter>
|
||||||
|
</activity>
|
||||||
|
</application>
|
||||||
|
|
||||||
|
</manifest>
|
||||||
BIN
app/src/main/assets/png_Animals/1.jpg
Normal file
|
After Width: | Height: | Size: 89 KiB |
BIN
app/src/main/assets/png_Animals/10.jpg
Normal file
|
After Width: | Height: | Size: 29 KiB |
BIN
app/src/main/assets/png_Animals/11.jpg
Normal file
|
After Width: | Height: | Size: 55 KiB |
BIN
app/src/main/assets/png_Animals/12.jpg
Normal file
|
After Width: | Height: | Size: 44 KiB |
BIN
app/src/main/assets/png_Animals/13.jpg
Normal file
|
After Width: | Height: | Size: 37 KiB |
BIN
app/src/main/assets/png_Animals/14.jpg
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
app/src/main/assets/png_Animals/15.jpg
Normal file
|
After Width: | Height: | Size: 87 KiB |
BIN
app/src/main/assets/png_Animals/16.jpg
Normal file
|
After Width: | Height: | Size: 21 KiB |
BIN
app/src/main/assets/png_Animals/17.jpg
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
app/src/main/assets/png_Animals/18.jpg
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
app/src/main/assets/png_Animals/19.jpg
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
app/src/main/assets/png_Animals/2.jpg
Normal file
|
After Width: | Height: | Size: 108 KiB |
BIN
app/src/main/assets/png_Animals/20.jpg
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
app/src/main/assets/png_Animals/21.jpg
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
app/src/main/assets/png_Animals/22.jpg
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
app/src/main/assets/png_Animals/23.jpg
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
app/src/main/assets/png_Animals/24.jpg
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
app/src/main/assets/png_Animals/25.jpg
Normal file
|
After Width: | Height: | Size: 9.0 KiB |
BIN
app/src/main/assets/png_Animals/26.jpg
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
app/src/main/assets/png_Animals/27.jpg
Normal file
|
After Width: | Height: | Size: 21 KiB |
BIN
app/src/main/assets/png_Animals/28.jpg
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
app/src/main/assets/png_Animals/29.jpg
Normal file
|
After Width: | Height: | Size: 29 KiB |
BIN
app/src/main/assets/png_Animals/3.jpg
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
app/src/main/assets/png_Animals/30.jpg
Normal file
|
After Width: | Height: | Size: 33 KiB |
BIN
app/src/main/assets/png_Animals/31.jpg
Normal file
|
After Width: | Height: | Size: 36 KiB |
BIN
app/src/main/assets/png_Animals/4.jpg
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
app/src/main/assets/png_Animals/5.jpg
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
app/src/main/assets/png_Animals/6.jpg
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
app/src/main/assets/png_Animals/7.jpg
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
app/src/main/assets/png_Animals/8.jpg
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
app/src/main/assets/png_Animals/9.jpg
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
app/src/main/assets/png_Birds/1.jpg
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
app/src/main/assets/png_Birds/10.jpg
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
app/src/main/assets/png_Birds/11.jpg
Normal file
|
After Width: | Height: | Size: 21 KiB |
BIN
app/src/main/assets/png_Birds/12.jpg
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
app/src/main/assets/png_Birds/13.jpg
Normal file
|
After Width: | Height: | Size: 21 KiB |
BIN
app/src/main/assets/png_Birds/14.jpg
Normal file
|
After Width: | Height: | Size: 41 KiB |
BIN
app/src/main/assets/png_Birds/15.jpg
Normal file
|
After Width: | Height: | Size: 21 KiB |
BIN
app/src/main/assets/png_Birds/16.jpg
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
app/src/main/assets/png_Birds/17.jpg
Normal file
|
After Width: | Height: | Size: 33 KiB |
BIN
app/src/main/assets/png_Birds/18.jpg
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
app/src/main/assets/png_Birds/19.jpg
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
app/src/main/assets/png_Birds/2.jpg
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
app/src/main/assets/png_Birds/3.jpg
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
app/src/main/assets/png_Birds/4.jpg
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
app/src/main/assets/png_Birds/5.jpg
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
app/src/main/assets/png_Birds/6.jpg
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
app/src/main/assets/png_Birds/7.jpg
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
app/src/main/assets/png_Birds/8.jpg
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
app/src/main/assets/png_Birds/9.jpg
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
app/src/main/assets/png_Butterfly/1.jpg
Normal file
|
After Width: | Height: | Size: 44 KiB |
BIN
app/src/main/assets/png_Butterfly/10.jpg
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
app/src/main/assets/png_Butterfly/11.jpg
Normal file
|
After Width: | Height: | Size: 46 KiB |
BIN
app/src/main/assets/png_Butterfly/12.jpg
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
app/src/main/assets/png_Butterfly/13.jpg
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
app/src/main/assets/png_Butterfly/14.jpg
Normal file
|
After Width: | Height: | Size: 37 KiB |
BIN
app/src/main/assets/png_Butterfly/15.jpg
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
app/src/main/assets/png_Butterfly/16.jpg
Normal file
|
After Width: | Height: | Size: 39 KiB |
BIN
app/src/main/assets/png_Butterfly/17.jpg
Normal file
|
After Width: | Height: | Size: 37 KiB |
BIN
app/src/main/assets/png_Butterfly/18.jpg
Normal file
|
After Width: | Height: | Size: 59 KiB |
BIN
app/src/main/assets/png_Butterfly/19.jpg
Normal file
|
After Width: | Height: | Size: 41 KiB |
BIN
app/src/main/assets/png_Butterfly/2.jpg
Normal file
|
After Width: | Height: | Size: 53 KiB |
BIN
app/src/main/assets/png_Butterfly/20.jpg
Normal file
|
After Width: | Height: | Size: 63 KiB |
BIN
app/src/main/assets/png_Butterfly/21.jpg
Normal file
|
After Width: | Height: | Size: 33 KiB |
BIN
app/src/main/assets/png_Butterfly/3.jpg
Normal file
|
After Width: | Height: | Size: 30 KiB |
BIN
app/src/main/assets/png_Butterfly/4.jpg
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
app/src/main/assets/png_Butterfly/5.jpg
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
app/src/main/assets/png_Butterfly/6.jpg
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
app/src/main/assets/png_Butterfly/7.jpg
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
app/src/main/assets/png_Butterfly/8.jpg
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
app/src/main/assets/png_Butterfly/9.jpg
Normal file
|
After Width: | Height: | Size: 23 KiB |
BIN
app/src/main/assets/png_Cafe/1.jpg
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
app/src/main/assets/png_Cafe/10.jpg
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
app/src/main/assets/png_Cafe/11.jpg
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
app/src/main/assets/png_Cafe/12.jpg
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
app/src/main/assets/png_Cafe/13.jpg
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
app/src/main/assets/png_Cafe/14.jpg
Normal file
|
After Width: | Height: | Size: 25 KiB |
BIN
app/src/main/assets/png_Cafe/15.jpg
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
app/src/main/assets/png_Cafe/16.jpg
Normal file
|
After Width: | Height: | Size: 23 KiB |
BIN
app/src/main/assets/png_Cafe/17.jpg
Normal file
|
After Width: | Height: | Size: 21 KiB |
BIN
app/src/main/assets/png_Cafe/18.jpg
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
app/src/main/assets/png_Cafe/19.jpg
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
app/src/main/assets/png_Cafe/2.jpg
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
app/src/main/assets/png_Cafe/20.jpg
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
app/src/main/assets/png_Cafe/21.jpg
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
app/src/main/assets/png_Cafe/22.jpg
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
app/src/main/assets/png_Cafe/23.jpg
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
app/src/main/assets/png_Cafe/24.jpg
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
app/src/main/assets/png_Cafe/25.jpg
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
app/src/main/assets/png_Cafe/26.jpg
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
app/src/main/assets/png_Cafe/27.jpg
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
app/src/main/assets/png_Cafe/28.jpg
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
app/src/main/assets/png_Cafe/29.jpg
Normal file
|
After Width: | Height: | Size: 16 KiB |