diff --git a/program1/.idea/migrations.xml b/program1/.idea/migrations.xml new file mode 100644 index 0000000..f8051a6 --- /dev/null +++ b/program1/.idea/migrations.xml @@ -0,0 +1,10 @@ + + + + + + \ No newline at end of file diff --git a/program1/.idea/misc.xml b/program1/.idea/misc.xml new file mode 100644 index 0000000..b2c751a --- /dev/null +++ b/program1/.idea/misc.xml @@ -0,0 +1,9 @@ + + + + + + + + \ No newline at end of file diff --git a/program1/.idea/runConfigurations.xml b/program1/.idea/runConfigurations.xml new file mode 100644 index 0000000..931b96c --- /dev/null +++ b/program1/.idea/runConfigurations.xml @@ -0,0 +1,13 @@ + + + + + + \ No newline at end of file diff --git a/program1/app/.gitignore b/program1/app/.gitignore new file mode 100644 index 0000000..42afabf --- /dev/null +++ b/program1/app/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/program1/app/build.gradle.kts b/program1/app/build.gradle.kts new file mode 100644 index 0000000..46952c6 --- /dev/null +++ b/program1/app/build.gradle.kts @@ -0,0 +1,62 @@ +plugins { + alias(libs.plugins.android.application) +} + +android { + namespace = "net.micode.notes" + compileSdk = 34 + + defaultConfig { + applicationId = "net.micode.notes" + minSdk = 24 + targetSdk = 34 + versionCode = 1 + versionName = "1.0" + + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + packaging { + resources.excludes.add("META-INF/DEPENDENCIES"); + resources.excludes.add("META-INF/NOTICE"); + resources.excludes.add("META-INF/LICENSE"); + resources.excludes.add("META-INF/LICENSE.txt"); + resources.excludes.add("META-INF/NOTICE.txt"); + } + } + + buildTypes { + release { + isMinifyEnabled = false + proguardFiles( + getDefaultProguardFile("proguard-android-optimize.txt"), + "proguard-rules.pro" + ) + } + } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + } +} + +dependencies { + + implementation(libs.appcompat) + implementation(libs.material) + implementation(libs.activity) + implementation(libs.constraintlayout) + //implementation(fileTree(mapOf( + // "dir" to "D:\\android\\Notesmaster\\httpcomponents-client-4.5.14-bin\\lib", + // "include" to listOf("*.aar", "*.jar"), + // "exclude" to listOf("") + // ))) + implementation(fileTree(mapOf( + "dir" to "D:\\android\\Notesmaster\\httpcomponents-client-4.5.14-bin\\lib", + "include" to listOf("*.aar", "*.jar"), + "exclude" to listOf("commons-codec-1.11.jar","httpclient-4.5.14.jar","httpclient-cache-4.5.14.jar", + "fluent-hc-4.5.14.jar","httpmime-4.5.14.jar") + ))) + + testImplementation(libs.junit) + androidTestImplementation(libs.ext.junit) + androidTestImplementation(libs.espresso.core) +} \ No newline at end of file diff --git a/program1/app/proguard-rules.pro b/program1/app/proguard-rules.pro new file mode 100644 index 0000000..481bb43 --- /dev/null +++ b/program1/app/proguard-rules.pro @@ -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 \ No newline at end of file diff --git a/program1/app/src/androidTest/java/net/micode/notes/ExampleInstrumentedTest.java b/program1/app/src/androidTest/java/net/micode/notes/ExampleInstrumentedTest.java new file mode 100644 index 0000000..a889a75 --- /dev/null +++ b/program1/app/src/androidTest/java/net/micode/notes/ExampleInstrumentedTest.java @@ -0,0 +1,26 @@ +package net.micode.notes; + +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 Testing documentation + */ +@RunWith(AndroidJUnit4.class) +public class ExampleInstrumentedTest { + @Test + public void useAppContext() { + // Context of the app under test. + Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); + assertEquals("net.micode.notes", appContext.getPackageName()); + } +} \ No newline at end of file diff --git a/program1/app/src/main/AndroidManifest.xml b/program1/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..e061ed5 --- /dev/null +++ b/program1/app/src/main/AndroidManifest.xml @@ -0,0 +1,156 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/program1/app/src/main/java/net/micode/notes/MainActivity.java b/program1/app/src/main/java/net/micode/notes/MainActivity.java new file mode 100644 index 0000000..8091753 --- /dev/null +++ b/program1/app/src/main/java/net/micode/notes/MainActivity.java @@ -0,0 +1,24 @@ +package net.micode.notes; + +import android.os.Bundle; + +import androidx.activity.EdgeToEdge; +import androidx.appcompat.app.AppCompatActivity; +import androidx.core.graphics.Insets; +import androidx.core.view.ViewCompat; +import androidx.core.view.WindowInsetsCompat; + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + EdgeToEdge.enable(this); + setContentView(R.layout.activity_main); + ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main), (v, insets) -> { + Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars()); + v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom); + return insets; + }); + } +} \ No newline at end of file