diff --git a/.idea/gradle.xml b/.idea/gradle.xml
index ac6b0ae..04a509e 100644
--- a/.idea/gradle.xml
+++ b/.idea/gradle.xml
@@ -12,6 +12,7 @@
+
diff --git a/homework6/.gitignore b/homework6/.gitignore
new file mode 100644
index 0000000..42afabf
--- /dev/null
+++ b/homework6/.gitignore
@@ -0,0 +1 @@
+/build
\ No newline at end of file
diff --git a/homework6/build.gradle b/homework6/build.gradle
new file mode 100644
index 0000000..7b3e87b
--- /dev/null
+++ b/homework6/build.gradle
@@ -0,0 +1,33 @@
+apply plugin: 'com.android.application'
+
+android {
+ compileSdkVersion 30
+ buildToolsVersion "30.0.2"
+
+ defaultConfig {
+ applicationId "com.example.homework6"
+ minSdkVersion 21
+ targetSdkVersion 30
+ 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.2.0'
+ implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
+ testImplementation 'junit:junit:4.12'
+ androidTestImplementation 'androidx.test.ext:junit:1.1.2'
+ androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
+
+}
diff --git a/homework6/proguard-rules.pro b/homework6/proguard-rules.pro
new file mode 100644
index 0000000..481bb43
--- /dev/null
+++ b/homework6/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/homework6/src/androidTest/java/com/example/homework6/ExampleInstrumentedTest.java b/homework6/src/androidTest/java/com/example/homework6/ExampleInstrumentedTest.java
new file mode 100644
index 0000000..2bd8818
--- /dev/null
+++ b/homework6/src/androidTest/java/com/example/homework6/ExampleInstrumentedTest.java
@@ -0,0 +1,26 @@
+package com.example.homework6;
+
+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.homework6", appContext.getPackageName());
+ }
+}
\ No newline at end of file
diff --git a/homework6/src/main/AndroidManifest.xml b/homework6/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..cffc8a2
--- /dev/null
+++ b/homework6/src/main/AndroidManifest.xml
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/homework6/src/main/java/com/example/homework6/CheckActivity.java b/homework6/src/main/java/com/example/homework6/CheckActivity.java
new file mode 100644
index 0000000..a249f34
--- /dev/null
+++ b/homework6/src/main/java/com/example/homework6/CheckActivity.java
@@ -0,0 +1,32 @@
+package com.example.homework6;
+
+import android.app.Activity;
+import android.content.Intent;
+import android.os.Bundle;
+import android.view.View;
+import android.widget.CheckBox;
+
+import androidx.appcompat.app.AppCompatActivity;
+
+public class CheckActivity extends AppCompatActivity {
+ private CheckBox checkStorage;
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_check);
+
+ checkStorage = findViewById(R.id.checkStorage);
+
+ findViewById(R.id.backButton).setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ Intent backIntent = new Intent();
+ backIntent.putExtra("ISCHEKED", checkStorage.isChecked());
+ setResult(Activity.RESULT_OK, backIntent);
+ finish();
+ }
+ });
+ checkStorage.isChecked();
+ }
+}
\ No newline at end of file
diff --git a/homework6/src/main/java/com/example/homework6/EditItem.java b/homework6/src/main/java/com/example/homework6/EditItem.java
new file mode 100644
index 0000000..fc75849
--- /dev/null
+++ b/homework6/src/main/java/com/example/homework6/EditItem.java
@@ -0,0 +1,40 @@
+package com.example.homework6;
+
+import androidx.appcompat.app.AppCompatActivity;
+
+import android.app.Activity;
+import android.content.Intent;
+import android.os.Bundle;
+import android.view.View;
+import android.widget.Button;
+import android.widget.EditText;
+
+public class EditItem extends AppCompatActivity {
+EditText fileName;
+EditText fileText;
+int position;
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_edit_item);
+
+ Intent intent = getIntent();
+ fileName = findViewById(R.id.fileName);
+ fileText = findViewById(R.id.fileText);
+ fileName.setText(intent.getStringExtra("NAME"));
+ fileText.setText(intent.getStringExtra("TEXT"));
+ position = intent.getIntExtra("POSITION", 0);
+
+ findViewById(R.id.btnSave2).setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ Intent resultIntent = new Intent();
+ resultIntent.putExtra("NAMESAVE", fileName.getText().toString());
+ resultIntent.putExtra("TEXTSAVE", fileText.getText().toString());
+ resultIntent.putExtra("POSITIONSAVE", position);
+ setResult(Activity.RESULT_OK, resultIntent);
+ finish();
+ }
+ });
+ }
+}
\ No newline at end of file
diff --git a/homework6/src/main/java/com/example/homework6/MainActivity.java b/homework6/src/main/java/com/example/homework6/MainActivity.java
new file mode 100644
index 0000000..2ae298a
--- /dev/null
+++ b/homework6/src/main/java/com/example/homework6/MainActivity.java
@@ -0,0 +1,99 @@
+package com.example.homework6;
+
+import android.app.Activity;
+import android.content.Intent;
+import android.content.SharedPreferences;
+import android.os.Bundle;
+import android.os.Environment;
+import android.view.View;
+import android.widget.Button;
+import android.widget.EditText;
+import android.widget.TextView;
+import android.widget.Toast;
+
+import androidx.annotation.Nullable;
+import androidx.appcompat.app.AppCompatActivity;
+
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.OutputStreamWriter;
+import java.util.ArrayList;
+
+public class MainActivity extends AppCompatActivity {
+ private EditText etText;
+ private EditText writeFileName;
+ private Button btnSave;
+ private ArrayList fileArray;
+ private Button toSecondActivity;
+ private boolean isCheked;
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_main);
+
+ etText = (EditText) findViewById(R.id.etText);
+ writeFileName = findViewById(R.id.writeFileName);
+ btnSave = (Button) findViewById(R.id.btnSave);
+ fileArray = new ArrayList<>();
+ toSecondActivity = findViewById(R.id.toSecondActivity);
+
+
+ btnSave.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ if (isCheked == false) {
+ try {
+ BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(
+ openFileOutput(writeFileName.getText().toString(), MODE_PRIVATE)));
+ bw.write(etText.getText().toString());
+ Toast.makeText(MainActivity.this, "Файл \"" +
+ writeFileName.getText().toString() + "\" успешно сохранен во внутреннюю память", Toast.LENGTH_SHORT).show();
+ fileArray.add(new File(writeFileName.getText().toString()));
+ bw.close();
+
+ } catch (FileNotFoundException e) {
+ e.printStackTrace();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ } else if (isCheked == true) {
+ File externalPath = new File(Environment.getExternalStorageDirectory().getAbsolutePath(), "MyFiles");
+ externalPath.mkdir();
+ File externalFile = new File(externalPath, writeFileName.getText().toString());
+ try {
+ BufferedWriter bw = new BufferedWriter(new FileWriter(externalFile));
+ bw.write(etText.getText().toString());
+ Toast.makeText(MainActivity.this, "Файл \"" +
+ writeFileName.getText().toString() + "\" успешно сохранен во внешнюю память", Toast.LENGTH_SHORT).show();
+ fileArray.add(new File(writeFileName.getText().toString()));
+ bw.close();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+ });
+
+ toSecondActivity.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ Intent intent = new Intent(MainActivity.this, SecondActivity.class);
+ intent.putExtra(ArrayList.class.getSimpleName(), fileArray);
+ startActivityForResult(intent, 2000);
+ }
+ });
+ }
+
+ @Override
+ protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
+ if (requestCode == 2000 && resultCode == Activity.RESULT_OK && data != null) {
+ this.fileArray = (ArrayList) data.getExtras().getSerializable(ArrayList.class.getSimpleName());
+ this.isCheked = data.getBooleanExtra("ISCHEKED", false);
+ }
+ super.onActivityResult(requestCode, resultCode, data);
+ }
+}
\ No newline at end of file
diff --git a/homework6/src/main/java/com/example/homework6/SecondActivity.java b/homework6/src/main/java/com/example/homework6/SecondActivity.java
new file mode 100644
index 0000000..3d1e8ae
--- /dev/null
+++ b/homework6/src/main/java/com/example/homework6/SecondActivity.java
@@ -0,0 +1,128 @@
+package com.example.homework6;
+
+import android.annotation.SuppressLint;
+import android.app.Activity;
+import android.content.Intent;
+import android.os.Bundle;
+import android.os.Environment;
+import android.view.View;
+import android.widget.AdapterView;
+import android.widget.ArrayAdapter;
+import android.widget.Button;
+import android.widget.ListView;
+import android.widget.Toast;
+
+import androidx.annotation.Nullable;
+import androidx.appcompat.app.AppCompatActivity;
+
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.OutputStreamWriter;
+import java.util.ArrayList;
+
+public class SecondActivity extends AppCompatActivity {
+
+ private ArrayAdapter mAdapter;
+ private ArrayList fileArray;
+ private String text;
+ private ListView lvMain;
+ private boolean isCheked;
+
+ @SuppressLint("ResourceType")
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_second);
+
+ fileArray = (ArrayList) getIntent().getExtras().getSerializable(ArrayList.class.getSimpleName());
+ mAdapter = new ArrayAdapter(this, android.R.layout.simple_list_item_1, fileArray);
+ lvMain = (ListView) findViewById(R.id.lvMain);
+ lvMain.setAdapter(mAdapter);
+
+ lvMain.setOnItemClickListener(new AdapterView.OnItemClickListener() {
+ @Override
+ public void onItemClick(AdapterView> parent, View view, int position, long id) {
+ Intent intent = new Intent(SecondActivity.this, EditItem.class);
+ intent.putExtra("NAME", fileArray.get(position).toString());
+ intent.putExtra("POSITION", position);
+
+ try {
+ BufferedReader br = new BufferedReader(new InputStreamReader(openFileInput(fileArray.get(position).toString())));
+ text = br.readLine();
+ } catch (FileNotFoundException e) {
+ e.printStackTrace();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ intent.putExtra("TEXT", text);
+ startActivityForResult(intent, 1000);
+ }
+ });
+
+ findViewById(R.id.toMainActivity).setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ Intent toMainIntent = new Intent();
+ toMainIntent.putExtra(ArrayList.class.getSimpleName(), fileArray);
+ toMainIntent.putExtra("ISCHEKED", isCheked);
+ setResult(Activity.RESULT_OK, toMainIntent);
+ finish();
+ }
+ });
+
+ findViewById(R.id.settingsButton).setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ Intent toSettingsIntent = new Intent(SecondActivity.this, CheckActivity.class);
+ startActivityForResult(toSettingsIntent, 3000);
+ }
+ });
+ }
+
+ @Override
+ protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
+
+ if (requestCode == 1000 && resultCode == Activity.RESULT_OK && data != null) {
+ if (isCheked == false) {
+ try {
+ BufferedWriter bw = new BufferedWriter(new OutputStreamWriter
+ (openFileOutput(data.getStringExtra("NAMESAVE"), MODE_PRIVATE)));
+ bw.write(data.getStringExtra("TEXTSAVE"));
+ Toast.makeText(SecondActivity.this, "Файл \"" +
+ data.getStringExtra("NAMESAVE") + "\" успешно изменен", Toast.LENGTH_SHORT).show();
+ fileArray.set(data.getIntExtra("POSITIONSAVE", 0), new File(data.getStringExtra("NAMESAVE")));
+ bw.close();
+ } catch (FileNotFoundException e) {
+ e.printStackTrace();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ } else if (isCheked == true) {
+ File externalPath = new File(Environment.getExternalStorageDirectory().getAbsolutePath(), "MyFiles");
+ externalPath.mkdir();
+ File externalFile = new File(externalPath, data.getStringExtra("NAMESAVE"));
+ try {
+ BufferedWriter bw = new BufferedWriter(new FileWriter(externalFile));
+ bw.write(data.getStringExtra("TEXTSAVE"));
+ Toast.makeText(SecondActivity.this, "Файл \"" +
+ data.getStringExtra("NAMESAVE") + "\" успешно изменен", Toast.LENGTH_SHORT).show();
+ fileArray.set(data.getIntExtra("POSITIONSAVE", 0), new File(data.getStringExtra("NAMESAVE")));
+ bw.close();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+ } else if (requestCode == 3000 && resultCode == Activity.RESULT_OK && data != null) {
+ isCheked = data.getBooleanExtra("ISCHEKED", false);
+ }
+ lvMain = (ListView) findViewById(R.id.lvMain);
+ lvMain.setAdapter(mAdapter);
+ super.onActivityResult(requestCode, resultCode, data);
+ }
+
+}
diff --git a/homework6/src/main/res/drawable-v24/ic_launcher_foreground.xml b/homework6/src/main/res/drawable-v24/ic_launcher_foreground.xml
new file mode 100644
index 0000000..2b068d1
--- /dev/null
+++ b/homework6/src/main/res/drawable-v24/ic_launcher_foreground.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/homework6/src/main/res/drawable/ic_launcher_background.xml b/homework6/src/main/res/drawable/ic_launcher_background.xml
new file mode 100644
index 0000000..07d5da9
--- /dev/null
+++ b/homework6/src/main/res/drawable/ic_launcher_background.xml
@@ -0,0 +1,170 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/homework6/src/main/res/layout/activity_check.xml b/homework6/src/main/res/layout/activity_check.xml
new file mode 100644
index 0000000..c0a21c3
--- /dev/null
+++ b/homework6/src/main/res/layout/activity_check.xml
@@ -0,0 +1,43 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/homework6/src/main/res/layout/activity_edit_item.xml b/homework6/src/main/res/layout/activity_edit_item.xml
new file mode 100644
index 0000000..ab8cb9a
--- /dev/null
+++ b/homework6/src/main/res/layout/activity_edit_item.xml
@@ -0,0 +1,49 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/homework6/src/main/res/layout/activity_main.xml b/homework6/src/main/res/layout/activity_main.xml
new file mode 100644
index 0000000..21cef95
--- /dev/null
+++ b/homework6/src/main/res/layout/activity_main.xml
@@ -0,0 +1,59 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/homework6/src/main/res/layout/activity_second.xml b/homework6/src/main/res/layout/activity_second.xml
new file mode 100644
index 0000000..c0d312b
--- /dev/null
+++ b/homework6/src/main/res/layout/activity_second.xml
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/homework6/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/homework6/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
new file mode 100644
index 0000000..eca70cf
--- /dev/null
+++ b/homework6/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/homework6/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/homework6/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
new file mode 100644
index 0000000..eca70cf
--- /dev/null
+++ b/homework6/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/homework6/src/main/res/mipmap-hdpi/ic_launcher.png b/homework6/src/main/res/mipmap-hdpi/ic_launcher.png
new file mode 100644
index 0000000..a571e60
Binary files /dev/null and b/homework6/src/main/res/mipmap-hdpi/ic_launcher.png differ
diff --git a/homework6/src/main/res/mipmap-hdpi/ic_launcher_round.png b/homework6/src/main/res/mipmap-hdpi/ic_launcher_round.png
new file mode 100644
index 0000000..61da551
Binary files /dev/null and b/homework6/src/main/res/mipmap-hdpi/ic_launcher_round.png differ
diff --git a/homework6/src/main/res/mipmap-mdpi/ic_launcher.png b/homework6/src/main/res/mipmap-mdpi/ic_launcher.png
new file mode 100644
index 0000000..c41dd28
Binary files /dev/null and b/homework6/src/main/res/mipmap-mdpi/ic_launcher.png differ
diff --git a/homework6/src/main/res/mipmap-mdpi/ic_launcher_round.png b/homework6/src/main/res/mipmap-mdpi/ic_launcher_round.png
new file mode 100644
index 0000000..db5080a
Binary files /dev/null and b/homework6/src/main/res/mipmap-mdpi/ic_launcher_round.png differ
diff --git a/homework6/src/main/res/mipmap-xhdpi/ic_launcher.png b/homework6/src/main/res/mipmap-xhdpi/ic_launcher.png
new file mode 100644
index 0000000..6dba46d
Binary files /dev/null and b/homework6/src/main/res/mipmap-xhdpi/ic_launcher.png differ
diff --git a/homework6/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/homework6/src/main/res/mipmap-xhdpi/ic_launcher_round.png
new file mode 100644
index 0000000..da31a87
Binary files /dev/null and b/homework6/src/main/res/mipmap-xhdpi/ic_launcher_round.png differ
diff --git a/homework6/src/main/res/mipmap-xxhdpi/ic_launcher.png b/homework6/src/main/res/mipmap-xxhdpi/ic_launcher.png
new file mode 100644
index 0000000..15ac681
Binary files /dev/null and b/homework6/src/main/res/mipmap-xxhdpi/ic_launcher.png differ
diff --git a/homework6/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/homework6/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
new file mode 100644
index 0000000..b216f2d
Binary files /dev/null and b/homework6/src/main/res/mipmap-xxhdpi/ic_launcher_round.png differ
diff --git a/homework6/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/homework6/src/main/res/mipmap-xxxhdpi/ic_launcher.png
new file mode 100644
index 0000000..f25a419
Binary files /dev/null and b/homework6/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ
diff --git a/homework6/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/homework6/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
new file mode 100644
index 0000000..e96783c
Binary files /dev/null and b/homework6/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png differ
diff --git a/homework6/src/main/res/values/colors.xml b/homework6/src/main/res/values/colors.xml
new file mode 100644
index 0000000..4faecfa
--- /dev/null
+++ b/homework6/src/main/res/values/colors.xml
@@ -0,0 +1,6 @@
+
+
+ #6200EE
+ #3700B3
+ #03DAC5
+
\ No newline at end of file
diff --git a/homework6/src/main/res/values/strings.xml b/homework6/src/main/res/values/strings.xml
new file mode 100644
index 0000000..3de1a39
--- /dev/null
+++ b/homework6/src/main/res/values/strings.xml
@@ -0,0 +1,3 @@
+
+ My Application
+
\ No newline at end of file
diff --git a/homework6/src/main/res/values/styles.xml b/homework6/src/main/res/values/styles.xml
new file mode 100644
index 0000000..fac9291
--- /dev/null
+++ b/homework6/src/main/res/values/styles.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/homework6/src/test/java/com/example/homework6/ExampleUnitTest.java b/homework6/src/test/java/com/example/homework6/ExampleUnitTest.java
new file mode 100644
index 0000000..f071265
--- /dev/null
+++ b/homework6/src/test/java/com/example/homework6/ExampleUnitTest.java
@@ -0,0 +1,17 @@
+package com.example.homework6;
+
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+/**
+ * Example local unit test, which will execute on the development machine (host).
+ *
+ * @see Testing documentation
+ */
+public class ExampleUnitTest {
+ @Test
+ public void addition_isCorrect() {
+ assertEquals(4, 2 + 2);
+ }
+}
\ No newline at end of file
diff --git a/settings.gradle b/settings.gradle
index 34d9e71..b867b8a 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -1,2 +1,3 @@
+include ':homework6'
include ':app'
rootProject.name = "HomeworkProject"
\ No newline at end of file