From 62634964e9a0f67e132c748189bf247b1b88d3fc Mon Sep 17 00:00:00 2001 From: Kacper Dudzic Date: Thu, 14 Nov 2019 17:45:49 +0100 Subject: [PATCH] Dodaj projekt Lookify w Android Studio --- Lookify/.gitignore | 14 ++ Lookify/.idea/codeStyles/Project.xml | 116 ++++++++++++ Lookify/.idea/gradle.xml | 16 ++ Lookify/.idea/misc.xml | 9 + Lookify/.idea/runConfigurations.xml | 12 ++ Lookify/.idea/vcs.xml | 6 + Lookify/app/.gitignore | 1 + Lookify/app/build.gradle | 29 +++ Lookify/app/proguard-rules.pro | 21 +++ .../lookify/ExampleInstrumentedTest.java | 27 +++ Lookify/app/src/main/AndroidManifest.xml | 29 +++ .../lookify/DisplayMessageActivity.java | 24 +++ .../com/example/lookify/MainActivity.java | 28 +++ .../drawable-v24/ic_launcher_foreground.xml | 34 ++++ .../res/drawable/ic_launcher_background.xml | 170 +++++++++++++++++ .../res/layout/activity_display_message.xml | 18 ++ .../app/src/main/res/layout/activity_main.xml | 39 ++++ .../res/mipmap-anydpi-v26/ic_launcher.xml | 5 + .../mipmap-anydpi-v26/ic_launcher_round.xml | 5 + .../src/main/res/mipmap-hdpi/ic_launcher.png | Bin 0 -> 2963 bytes .../res/mipmap-hdpi/ic_launcher_round.png | Bin 0 -> 4905 bytes .../src/main/res/mipmap-mdpi/ic_launcher.png | Bin 0 -> 2060 bytes .../res/mipmap-mdpi/ic_launcher_round.png | Bin 0 -> 2783 bytes .../src/main/res/mipmap-xhdpi/ic_launcher.png | Bin 0 -> 4490 bytes .../res/mipmap-xhdpi/ic_launcher_round.png | Bin 0 -> 6895 bytes .../main/res/mipmap-xxhdpi/ic_launcher.png | Bin 0 -> 6387 bytes .../res/mipmap-xxhdpi/ic_launcher_round.png | Bin 0 -> 10413 bytes .../main/res/mipmap-xxxhdpi/ic_launcher.png | Bin 0 -> 9128 bytes .../res/mipmap-xxxhdpi/ic_launcher_round.png | Bin 0 -> 15132 bytes Lookify/app/src/main/res/values/colors.xml | 6 + Lookify/app/src/main/res/values/strings.xml | 5 + Lookify/app/src/main/res/values/styles.xml | 11 ++ .../com/example/lookify/ExampleUnitTest.java | 17 ++ Lookify/build.gradle | 27 +++ Lookify/gradle.properties | 20 ++ Lookify/gradle/wrapper/gradle-wrapper.jar | Bin 0 -> 54329 bytes .../gradle/wrapper/gradle-wrapper.properties | 6 + Lookify/gradlew | 172 ++++++++++++++++++ Lookify/gradlew.bat | 84 +++++++++ Lookify/settings.gradle | 2 + 40 files changed, 953 insertions(+) create mode 100644 Lookify/.gitignore create mode 100644 Lookify/.idea/codeStyles/Project.xml create mode 100644 Lookify/.idea/gradle.xml create mode 100644 Lookify/.idea/misc.xml create mode 100644 Lookify/.idea/runConfigurations.xml create mode 100644 Lookify/.idea/vcs.xml create mode 100644 Lookify/app/.gitignore create mode 100644 Lookify/app/build.gradle create mode 100644 Lookify/app/proguard-rules.pro create mode 100644 Lookify/app/src/androidTest/java/com/example/lookify/ExampleInstrumentedTest.java create mode 100644 Lookify/app/src/main/AndroidManifest.xml create mode 100644 Lookify/app/src/main/java/com/example/lookify/DisplayMessageActivity.java create mode 100644 Lookify/app/src/main/java/com/example/lookify/MainActivity.java create mode 100644 Lookify/app/src/main/res/drawable-v24/ic_launcher_foreground.xml create mode 100644 Lookify/app/src/main/res/drawable/ic_launcher_background.xml create mode 100644 Lookify/app/src/main/res/layout/activity_display_message.xml create mode 100644 Lookify/app/src/main/res/layout/activity_main.xml create mode 100644 Lookify/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml create mode 100644 Lookify/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml create mode 100644 Lookify/app/src/main/res/mipmap-hdpi/ic_launcher.png create mode 100644 Lookify/app/src/main/res/mipmap-hdpi/ic_launcher_round.png create mode 100644 Lookify/app/src/main/res/mipmap-mdpi/ic_launcher.png create mode 100644 Lookify/app/src/main/res/mipmap-mdpi/ic_launcher_round.png create mode 100644 Lookify/app/src/main/res/mipmap-xhdpi/ic_launcher.png create mode 100644 Lookify/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png create mode 100644 Lookify/app/src/main/res/mipmap-xxhdpi/ic_launcher.png create mode 100644 Lookify/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png create mode 100644 Lookify/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png create mode 100644 Lookify/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png create mode 100644 Lookify/app/src/main/res/values/colors.xml create mode 100644 Lookify/app/src/main/res/values/strings.xml create mode 100644 Lookify/app/src/main/res/values/styles.xml create mode 100644 Lookify/app/src/test/java/com/example/lookify/ExampleUnitTest.java create mode 100644 Lookify/build.gradle create mode 100644 Lookify/gradle.properties create mode 100644 Lookify/gradle/wrapper/gradle-wrapper.jar create mode 100644 Lookify/gradle/wrapper/gradle-wrapper.properties create mode 100644 Lookify/gradlew create mode 100644 Lookify/gradlew.bat create mode 100644 Lookify/settings.gradle diff --git a/Lookify/.gitignore b/Lookify/.gitignore new file mode 100644 index 0000000..603b140 --- /dev/null +++ b/Lookify/.gitignore @@ -0,0 +1,14 @@ +*.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 diff --git a/Lookify/.idea/codeStyles/Project.xml b/Lookify/.idea/codeStyles/Project.xml new file mode 100644 index 0000000..681f41a --- /dev/null +++ b/Lookify/.idea/codeStyles/Project.xml @@ -0,0 +1,116 @@ + + + + + + + +
+ + + + xmlns:android + + ^$ + + + +
+
+ + + + xmlns:.* + + ^$ + + + BY_NAME + +
+
+ + + + .*:id + + http://schemas.android.com/apk/res/android + + + +
+
+ + + + .*:name + + http://schemas.android.com/apk/res/android + + + +
+
+ + + + name + + ^$ + + + +
+
+ + + + style + + ^$ + + + +
+
+ + + + .* + + ^$ + + + BY_NAME + +
+
+ + + + .* + + http://schemas.android.com/apk/res/android + + + ANDROID_ATTRIBUTE_ORDER + +
+
+ + + + .* + + .* + + + BY_NAME + +
+
+
+
+
+
\ No newline at end of file diff --git a/Lookify/.idea/gradle.xml b/Lookify/.idea/gradle.xml new file mode 100644 index 0000000..d291b3d --- /dev/null +++ b/Lookify/.idea/gradle.xml @@ -0,0 +1,16 @@ + + + + + + \ No newline at end of file diff --git a/Lookify/.idea/misc.xml b/Lookify/.idea/misc.xml new file mode 100644 index 0000000..37a7509 --- /dev/null +++ b/Lookify/.idea/misc.xml @@ -0,0 +1,9 @@ + + + + + + + + \ No newline at end of file diff --git a/Lookify/.idea/runConfigurations.xml b/Lookify/.idea/runConfigurations.xml new file mode 100644 index 0000000..7f68460 --- /dev/null +++ b/Lookify/.idea/runConfigurations.xml @@ -0,0 +1,12 @@ + + + + + + \ No newline at end of file diff --git a/Lookify/.idea/vcs.xml b/Lookify/.idea/vcs.xml new file mode 100644 index 0000000..6c0b863 --- /dev/null +++ b/Lookify/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Lookify/app/.gitignore b/Lookify/app/.gitignore new file mode 100644 index 0000000..796b96d --- /dev/null +++ b/Lookify/app/.gitignore @@ -0,0 +1 @@ +/build diff --git a/Lookify/app/build.gradle b/Lookify/app/build.gradle new file mode 100644 index 0000000..84df13d --- /dev/null +++ b/Lookify/app/build.gradle @@ -0,0 +1,29 @@ +apply plugin: 'com.android.application' + +android { + compileSdkVersion 29 + buildToolsVersion "29.0.2" + defaultConfig { + applicationId "com.example.lookify" + minSdkVersion 15 + targetSdkVersion 29 + versionCode 1 + versionName "1.0" + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + } + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + } + } +} + +dependencies { + implementation fileTree(dir: 'libs', include: ['*.jar']) + implementation 'androidx.appcompat:appcompat:1.0.2' + implementation 'androidx.constraintlayout:constraintlayout:1.1.3' + testImplementation 'junit:junit:4.12' + androidTestImplementation 'androidx.test.ext:junit:1.1.0' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1' +} diff --git a/Lookify/app/proguard-rules.pro b/Lookify/app/proguard-rules.pro new file mode 100644 index 0000000..f1b4245 --- /dev/null +++ b/Lookify/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 diff --git a/Lookify/app/src/androidTest/java/com/example/lookify/ExampleInstrumentedTest.java b/Lookify/app/src/androidTest/java/com/example/lookify/ExampleInstrumentedTest.java new file mode 100644 index 0000000..edacef5 --- /dev/null +++ b/Lookify/app/src/androidTest/java/com/example/lookify/ExampleInstrumentedTest.java @@ -0,0 +1,27 @@ +package com.example.lookify; + +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("com.example.lookify", appContext.getPackageName()); + } +} diff --git a/Lookify/app/src/main/AndroidManifest.xml b/Lookify/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..c1723a1 --- /dev/null +++ b/Lookify/app/src/main/AndroidManifest.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Lookify/app/src/main/java/com/example/lookify/DisplayMessageActivity.java b/Lookify/app/src/main/java/com/example/lookify/DisplayMessageActivity.java new file mode 100644 index 0000000..4876d48 --- /dev/null +++ b/Lookify/app/src/main/java/com/example/lookify/DisplayMessageActivity.java @@ -0,0 +1,24 @@ +package com.example.lookify; + +import androidx.appcompat.app.AppCompatActivity; + +import android.content.Intent; +import android.os.Bundle; +import android.widget.TextView; + +public class DisplayMessageActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_display_message); + // Get the Intent that started this activity and extract the string + Intent intent = getIntent(); + String message = intent.getStringExtra(MainActivity.EXTRA_MESSAGE); + + // Capture the layout's TextView and set the string as its text + TextView textView = findViewById(R.id.textView); + textView.setText(message); + } + +} diff --git a/Lookify/app/src/main/java/com/example/lookify/MainActivity.java b/Lookify/app/src/main/java/com/example/lookify/MainActivity.java new file mode 100644 index 0000000..439e67b --- /dev/null +++ b/Lookify/app/src/main/java/com/example/lookify/MainActivity.java @@ -0,0 +1,28 @@ +package com.example.lookify; + +import androidx.appcompat.app.AppCompatActivity; + +import android.content.Intent; +import android.os.Bundle; +import android.view.View; +import android.widget.EditText; + +public class MainActivity extends AppCompatActivity { + public static final String EXTRA_MESSAGE = "com.example.myfirstapp.MESSAGE"; + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + } + + /** Called when the user taps the Send button */ + public void sendMessage(View view) { + // Do something in response to button + Intent intent = new Intent(this, DisplayMessageActivity.class); + EditText editText = (EditText) findViewById(R.id.editText); + String message = editText.getText().toString(); + intent.putExtra(EXTRA_MESSAGE, message); + startActivity(intent); + } +} + diff --git a/Lookify/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/Lookify/app/src/main/res/drawable-v24/ic_launcher_foreground.xml new file mode 100644 index 0000000..1f6bb29 --- /dev/null +++ b/Lookify/app/src/main/res/drawable-v24/ic_launcher_foreground.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + diff --git a/Lookify/app/src/main/res/drawable/ic_launcher_background.xml b/Lookify/app/src/main/res/drawable/ic_launcher_background.xml new file mode 100644 index 0000000..0d025f9 --- /dev/null +++ b/Lookify/app/src/main/res/drawable/ic_launcher_background.xml @@ -0,0 +1,170 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Lookify/app/src/main/res/layout/activity_display_message.xml b/Lookify/app/src/main/res/layout/activity_display_message.xml new file mode 100644 index 0000000..66da458 --- /dev/null +++ b/Lookify/app/src/main/res/layout/activity_display_message.xml @@ -0,0 +1,18 @@ + + + + + \ No newline at end of file diff --git a/Lookify/app/src/main/res/layout/activity_main.xml b/Lookify/app/src/main/res/layout/activity_main.xml new file mode 100644 index 0000000..f5ab6f3 --- /dev/null +++ b/Lookify/app/src/main/res/layout/activity_main.xml @@ -0,0 +1,39 @@ + + + + + +