2
0

merged with old project

This commit is contained in:
Skripkin Andrei 2024-05-21 13:32:54 +03:00
parent 3e6fe310e0
commit c4038dae2c
8 changed files with 88 additions and 9 deletions

8
README.md Normal file
View File

@ -0,0 +1,8 @@
# Практическая работа. Манифест
В данном практическом задании предлагается дополнить существующий проект-заготовку Android приложения.
Дополните манифест, чтобы приложение обладало следующими особенностями:
1. Две активности: *GeneratedListActivity* и *MainActivity* (стартовая)
2. Название приложения соответствует значению ресурса `@string/app_name`
3. Тема берётся из `themes.xml`

View File

@ -3,14 +3,7 @@
xmlns:tools="http://schemas.android.com/tools">
<application
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.Default"
tools:targetApi="31" />
</application>
</manifest>

View File

@ -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());
}
}

View File

@ -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());
}
}

View File

@ -0,0 +1,11 @@
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".MainActivity">
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_margin="@dimen/main_padding"
android:contentDescription="@string/add_fab"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:srcCompat="@android:drawable/ic_input_add" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -0,0 +1,3 @@
<resources>
<dimen name="main_padding">16dp</dimen>
</resources>

View File

@ -1,3 +1,4 @@
<resources>
<string name="app_name">Work</string>
<string name="add_fab">add</string>
</resources>