diff --git a/README.md b/README.md new file mode 100644 index 0000000..1a3c504 --- /dev/null +++ b/README.md @@ -0,0 +1,8 @@ +# Практическая работа. Манифест + +В данном практическом задании предлагается дополнить существующий проект-заготовку Android приложения. +Дополните манифест, чтобы приложение обладало следующими особенностями: + +1. Две активности: *GeneratedListActivity* и *MainActivity* (стартовая) +2. Название приложения соответствует значению ресурса `@string/app_name` +3. Тема берётся из `themes.xml` \ No newline at end of file diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 9ee5c40..acfd233 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -3,14 +3,7 @@ xmlns:tools="http://schemas.android.com/tools"> + + \ No newline at end of file diff --git a/app/src/main/java/ru/myitschool/work/GeneratedListActivity.java b/app/src/main/java/ru/myitschool/work/GeneratedListActivity.java new file mode 100644 index 0000000..d0f0090 --- /dev/null +++ b/app/src/main/java/ru/myitschool/work/GeneratedListActivity.java @@ -0,0 +1,20 @@ +package ru.myitschool.work; + +import android.os.Bundle; + +import androidx.annotation.Nullable; +import androidx.appcompat.app.AppCompatActivity; + +import ru.myitschool.work.databinding.ActivityGeneratedListBinding; + +public class GeneratedListActivity extends AppCompatActivity { + + private ActivityGeneratedListBinding binding; + + @Override + protected void onCreate(@Nullable Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + binding = ActivityGeneratedListBinding.inflate(getLayoutInflater()); + setContentView(binding.getRoot()); + } +} \ No newline at end of file diff --git a/app/src/main/java/ru/myitschool/work/MainActivity.java b/app/src/main/java/ru/myitschool/work/MainActivity.java new file mode 100644 index 0000000..44782b1 --- /dev/null +++ b/app/src/main/java/ru/myitschool/work/MainActivity.java @@ -0,0 +1,20 @@ +package ru.myitschool.work; + +import android.os.Bundle; + +import androidx.annotation.Nullable; +import androidx.appcompat.app.AppCompatActivity; + +import ru.myitschool.work.databinding.ActivityMainBinding; + +public class MainActivity extends AppCompatActivity { + + private ActivityMainBinding binding; + + @Override + protected void onCreate(@Nullable Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + binding = ActivityMainBinding.inflate(getLayoutInflater()); + setContentView(binding.getRoot()); + } +} \ No newline at end of file diff --git a/app/src/main/res/layout/activity_generated_list.xml b/app/src/main/res/layout/activity_generated_list.xml new file mode 100644 index 0000000..ad22831 --- /dev/null +++ b/app/src/main/res/layout/activity_generated_list.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml new file mode 100644 index 0000000..3d5ff9f --- /dev/null +++ b/app/src/main/res/layout/activity_main.xml @@ -0,0 +1,23 @@ + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml new file mode 100644 index 0000000..dedd54b --- /dev/null +++ b/app/src/main/res/values/dimens.xml @@ -0,0 +1,3 @@ + + 16dp + \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 96034ac..0ca8987 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1,3 +1,4 @@ Work + add \ No newline at end of file