merged with old project
This commit is contained in:
		
							
								
								
									
										8
									
								
								README.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								README.md
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,8 @@ | |||||||
|  | # Практическая работа. Манифест | ||||||
|  |  | ||||||
|  | В данном практическом задании предлагается дополнить существующий проект-заготовку Android приложения. | ||||||
|  | Дополните манифест, чтобы приложение обладало следующими особенностями: | ||||||
|  |  | ||||||
|  | 1. Две активности: *GeneratedListActivity* и *MainActivity* (стартовая) | ||||||
|  | 2. Название приложения соответствует значению ресурса `@string/app_name` | ||||||
|  | 3. Тема берётся из `themes.xml` | ||||||
| @@ -3,14 +3,7 @@ | |||||||
|     xmlns:tools="http://schemas.android.com/tools"> |     xmlns:tools="http://schemas.android.com/tools"> | ||||||
|  |  | ||||||
|     <application |     <application | ||||||
|         android:allowBackup="true" |  | ||||||
|         android:dataExtractionRules="@xml/data_extraction_rules" |     </application> | ||||||
|         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" /> |  | ||||||
|  |  | ||||||
| </manifest> | </manifest> | ||||||
| @@ -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()); | ||||||
|  |     } | ||||||
|  | } | ||||||
							
								
								
									
										20
									
								
								app/src/main/java/ru/myitschool/work/MainActivity.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								app/src/main/java/ru/myitschool/work/MainActivity.java
									
									
									
									
									
										Normal 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()); | ||||||
|  |     } | ||||||
|  | } | ||||||
							
								
								
									
										11
									
								
								app/src/main/res/layout/activity_generated_list.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								app/src/main/res/layout/activity_generated_list.xml
									
									
									
									
									
										Normal 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> | ||||||
							
								
								
									
										23
									
								
								app/src/main/res/layout/activity_main.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								app/src/main/res/layout/activity_main.xml
									
									
									
									
									
										Normal 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> | ||||||
							
								
								
									
										3
									
								
								app/src/main/res/values/dimens.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								app/src/main/res/values/dimens.xml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,3 @@ | |||||||
|  | <resources> | ||||||
|  |     <dimen name="main_padding">16dp</dimen> | ||||||
|  | </resources> | ||||||
| @@ -1,3 +1,4 @@ | |||||||
| <resources> | <resources> | ||||||
|     <string name="app_name">Work</string> |     <string name="app_name">Work</string> | ||||||
|  |     <string name="add_fab">add</string> | ||||||
| </resources> | </resources> | ||||||
		Reference in New Issue
	
	Block a user