diff --git a/.idea/deploymentTargetSelector.xml b/.idea/deploymentTargetSelector.xml
index b268ef3..9644eca 100644
--- a/.idea/deploymentTargetSelector.xml
+++ b/.idea/deploymentTargetSelector.xml
@@ -4,6 +4,14 @@
+
+
+
+
+
+
+
+
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index e218c4a..fd39c5e 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -6,6 +6,7 @@
> = withContext(Dispatchers.IO) {
try {
val response = apiService.getAlbums()
+ photoCache.saveAlbums(response)
Result.success(response)
} catch (e: Exception) {
- Result.failure(e)
+ val cachedAlbums = photoCache.getAlbums()
+ if (cachedAlbums != null) {
+ Result.success(cachedAlbums)
+ } else {
+ Result.failure(e)
+ }
}
}
suspend fun getAlbumDetails(albumId: Int): Result = withContext(Dispatchers.IO) {
try {
val response = apiService.getAlbumDetails(albumId)
+ photoCache.saveAlbumDetails(response)
Result.success(response)
} catch (e: Exception) {
- Result.failure(e)
+ val cachedAlbum = photoCache.getAlbumDetails(albumId)
+ if (cachedAlbum != null) {
+ Result.success(cachedAlbum)
+ } else {
+ Result.failure(e)
+ }
}
}
-}
\ No newline at end of file
+}
diff --git a/app/src/main/java/com/example/gallery/repository/PhotoCache.kt b/app/src/main/java/com/example/gallery/repository/PhotoCache.kt
new file mode 100644
index 0000000..a032ab0
--- /dev/null
+++ b/app/src/main/java/com/example/gallery/repository/PhotoCache.kt
@@ -0,0 +1,45 @@
+package com.example.gallery.repository
+
+import android.content.Context
+import com.example.gallery.App
+import com.example.gallery.models.Album
+import com.google.gson.Gson
+import com.google.gson.reflect.TypeToken
+
+class PhotoCache {
+ companion object {
+ private const val ALBUMS_CACHE_KEY = "albums_cache"
+ private const val ALBUM_DETAILS_CACHE_KEY = "album_details_cache_"
+ }
+
+ private val sharedPreferences = App.instance.getSharedPreferences("photo_cache", Context.MODE_PRIVATE)
+
+ fun saveAlbums(albums: List) {
+ val json = Gson().toJson(albums)
+ sharedPreferences.edit().putString(ALBUMS_CACHE_KEY, json).apply()
+ }
+
+ fun getAlbums(): List? {
+ val json = sharedPreferences.getString(ALBUMS_CACHE_KEY, null) ?: return null
+ val type = object : TypeToken>() {}.type
+ return try {
+ Gson().fromJson(json, type)
+ } catch (e: Exception) {
+ null
+ }
+ }
+
+ fun saveAlbumDetails(album: Album) {
+ val json = Gson().toJson(album)
+ sharedPreferences.edit().putString(ALBUM_DETAILS_CACHE_KEY + album.id, json).apply()
+ }
+
+ fun getAlbumDetails(albumId: Int): Album? {
+ val json = sharedPreferences.getString(ALBUM_DETAILS_CACHE_KEY + albumId, null) ?: return null
+ return try {
+ Gson().fromJson(json, Album::class.java)
+ } catch (e: Exception) {
+ null
+ }
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/gallery/ui/albums/AlbumsFragment.kt b/app/src/main/java/com/example/gallery/ui/albums/AlbumsFragment.kt
index 579648a..09e3062 100644
--- a/app/src/main/java/com/example/gallery/ui/albums/AlbumsFragment.kt
+++ b/app/src/main/java/com/example/gallery/ui/albums/AlbumsFragment.kt
@@ -80,6 +80,12 @@ class AlbumsFragment : Fragment() {
.show()
}
}
+
+ viewModel.isFromCache.observe(viewLifecycleOwner) { isFromCache ->
+ if (isFromCache) {
+ Snackbar.make(binding.root, "Данные загружены из кэша. Нет подключения к интернету.", Snackbar.LENGTH_LONG).show()
+ }
+ }
}
override fun onDestroyView() {
diff --git a/app/src/main/java/com/example/gallery/ui/albums/AlbumsViewModel.kt b/app/src/main/java/com/example/gallery/ui/albums/AlbumsViewModel.kt
index c8e0cb2..154b626 100644
--- a/app/src/main/java/com/example/gallery/ui/albums/AlbumsViewModel.kt
+++ b/app/src/main/java/com/example/gallery/ui/albums/AlbumsViewModel.kt
@@ -1,9 +1,13 @@
package com.example.gallery.ui.albums
+import android.content.Context
+import android.net.ConnectivityManager
+import android.net.NetworkCapabilities
import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
+import com.example.gallery.App
import com.example.gallery.models.Album
import com.example.gallery.repository.GalleryRepository
import kotlinx.coroutines.launch
@@ -20,6 +24,9 @@ class AlbumsViewModel : ViewModel() {
private val _error = MutableLiveData()
val error: LiveData = _error
+ private val _isFromCache = MutableLiveData()
+ val isFromCache: LiveData = _isFromCache
+
init {
loadAlbums()
}
@@ -28,11 +35,16 @@ class AlbumsViewModel : ViewModel() {
viewModelScope.launch {
_isLoading.value = true
_error.value = null
+ _isFromCache.value = false
repository.getAlbums().fold(
onSuccess = { albumsList ->
_albums.value = albumsList
_isLoading.value = false
+
+ if (albumsList.isNotEmpty() && !isInternetAvailable()) {
+ _isFromCache.value = true
+ }
},
onFailure = { e ->
_error.value = e.message ?: "Неизвестная ошибка"
@@ -45,4 +57,11 @@ class AlbumsViewModel : ViewModel() {
fun refreshAlbums() {
loadAlbums()
}
+
+ private fun isInternetAvailable(): Boolean {
+ val connectivityManager = App.instance.getSystemService(Context.CONNECTIVITY_SERVICE) as ConnectivityManager
+ val network = connectivityManager.activeNetwork ?: return false
+ val networkCapabilities = connectivityManager.getNetworkCapabilities(network) ?: return false
+ return networkCapabilities.hasCapability(NetworkCapabilities.NET_CAPABILITY_INTERNET)
+ }
}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/gallery/ui/photos/PhotoAdapter.kt b/app/src/main/java/com/example/gallery/ui/photos/PhotoAdapter.kt
new file mode 100644
index 0000000..ccc336d
--- /dev/null
+++ b/app/src/main/java/com/example/gallery/ui/photos/PhotoAdapter.kt
@@ -0,0 +1,56 @@
+package com.example.gallery.ui.photos
+
+import android.view.LayoutInflater
+import android.view.ViewGroup
+import androidx.recyclerview.widget.DiffUtil
+import androidx.recyclerview.widget.ListAdapter
+import androidx.recyclerview.widget.RecyclerView
+import com.example.gallery.databinding.ItemPhotoBinding
+import com.example.gallery.models.Photo
+import com.example.gallery.ui.ImageLoader
+
+class PhotoAdapter(private val onPhotoClick: (Photo) -> Unit) :
+ ListAdapter(PhotoDiffCallback()) {
+
+ override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): PhotoViewHolder {
+ val binding = ItemPhotoBinding.inflate(
+ LayoutInflater.from(parent.context),
+ parent,
+ false
+ )
+ return PhotoViewHolder(binding)
+ }
+
+ override fun onBindViewHolder(holder: PhotoViewHolder, position: Int) {
+ holder.bind(getItem(position))
+ }
+
+ inner class PhotoViewHolder(private val binding: ItemPhotoBinding) :
+ RecyclerView.ViewHolder(binding.root) {
+
+ init {
+ binding.root.setOnClickListener {
+ val position = bindingAdapterPosition
+ if (position != RecyclerView.NO_POSITION) {
+ onPhotoClick(getItem(position))
+ }
+ }
+ }
+
+ fun bind(photo: Photo) {
+ binding.photoTitle.text = photo.title
+ binding.photoDescription.text = photo.description
+ ImageLoader.loadImage(binding.photoImage, photo.imageUrl)
+ }
+ }
+
+ private class PhotoDiffCallback : DiffUtil.ItemCallback() {
+ override fun areItemsTheSame(oldItem: Photo, newItem: Photo): Boolean {
+ return oldItem.id == newItem.id
+ }
+
+ override fun areContentsTheSame(oldItem: Photo, newItem: Photo): Boolean {
+ return oldItem == newItem
+ }
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/gallery/ui/photos/PhotoDetailFragment.kt b/app/src/main/java/com/example/gallery/ui/photos/PhotoDetailFragment.kt
new file mode 100644
index 0000000..d7993b7
--- /dev/null
+++ b/app/src/main/java/com/example/gallery/ui/photos/PhotoDetailFragment.kt
@@ -0,0 +1,45 @@
+package com.example.gallery.ui.photos
+
+import android.os.Bundle
+import android.view.LayoutInflater
+import android.view.View
+import android.view.ViewGroup
+import androidx.fragment.app.Fragment
+import androidx.navigation.fragment.navArgs
+import com.example.gallery.databinding.FragmentPhotoDetailBinding
+import com.example.gallery.ui.ImageLoader
+
+class PhotoDetailFragment : Fragment() {
+ private var _binding: FragmentPhotoDetailBinding? = null
+ private val binding get() = _binding!!
+
+ private val args: PhotoDetailFragmentArgs by navArgs()
+
+ override fun onCreateView(
+ inflater: LayoutInflater,
+ container: ViewGroup?,
+ savedInstanceState: Bundle?
+ ): View {
+ _binding = FragmentPhotoDetailBinding.inflate(inflater, container, false)
+ return binding.root
+ }
+
+ override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
+ super.onViewCreated(view, savedInstanceState)
+
+ val photo = args.photo
+
+ binding.apply {
+ photoTitle.text = photo.title
+ photoDescription.text = photo.description
+ ImageLoader.loadImage(photoImage, photo.imageUrl)
+ }
+
+ requireActivity().title = photo.title
+ }
+
+ override fun onDestroyView() {
+ super.onDestroyView()
+ _binding = null
+ }
+}
diff --git a/app/src/main/java/com/example/gallery/ui/photos/PhotosFragment.kt b/app/src/main/java/com/example/gallery/ui/photos/PhotosFragment.kt
new file mode 100644
index 0000000..72f6950
--- /dev/null
+++ b/app/src/main/java/com/example/gallery/ui/photos/PhotosFragment.kt
@@ -0,0 +1,104 @@
+package com.example.gallery.ui.photos
+
+import android.os.Bundle
+import android.view.LayoutInflater
+import android.view.View
+import android.view.ViewGroup
+import androidx.core.view.isVisible
+import androidx.fragment.app.Fragment
+import androidx.fragment.app.viewModels
+import androidx.navigation.fragment.findNavController
+import androidx.navigation.fragment.navArgs
+import androidx.recyclerview.widget.StaggeredGridLayoutManager
+import com.example.gallery.databinding.FragmentPhotosBinding
+import com.google.android.material.snackbar.Snackbar
+
+class PhotosFragment : Fragment() {
+ private var _binding: FragmentPhotosBinding? = null
+ private val binding get() = _binding!!
+
+ private val viewModel: PhotosViewModel by viewModels()
+ private lateinit var photoAdapter: PhotoAdapter
+ private val args: PhotosFragmentArgs by navArgs()
+
+ override fun onCreateView(
+ inflater: LayoutInflater,
+ container: ViewGroup?,
+ savedInstanceState: Bundle?
+ ): View {
+ _binding = FragmentPhotosBinding.inflate(inflater, container, false)
+ return binding.root
+ }
+
+ override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
+ super.onViewCreated(view, savedInstanceState)
+
+ setupRecyclerView()
+ setupSwipeRefresh()
+ observeViewModel()
+
+ viewModel.loadPhotos(args.album)
+ }
+
+ private fun setupRecyclerView() {
+ photoAdapter = PhotoAdapter { photo ->
+ val action = PhotosFragmentDirections.actionPhotosFragmentToPhotoDetailFragment(photo)
+ findNavController().navigate(action)
+ }
+
+ binding.recyclerView.apply {
+ adapter = photoAdapter
+ layoutManager = StaggeredGridLayoutManager(2, StaggeredGridLayoutManager.VERTICAL)
+ setHasFixedSize(true)
+ }
+ }
+
+ private fun setupSwipeRefresh() {
+ binding.swipeRefreshLayout.setOnRefreshListener {
+ viewModel.refreshPhotos(args.album.id)
+ }
+ }
+
+ private fun observeViewModel() {
+ viewModel.photos.observe(viewLifecycleOwner) { photos ->
+ photoAdapter.submitList(photos)
+ binding.emptyView.isVisible = photos.isEmpty()
+ }
+
+ viewModel.isLoading.observe(viewLifecycleOwner) { isLoading ->
+ binding.swipeRefreshLayout.isRefreshing = isLoading
+ binding.shimmerLayout.isVisible = isLoading && photoAdapter.itemCount == 0
+
+ if (isLoading) {
+ binding.shimmerLayout.startShimmer()
+ } else {
+ binding.shimmerLayout.stopShimmer()
+ }
+ }
+
+ viewModel.error.observe(viewLifecycleOwner) { errorMessage ->
+ if (!errorMessage.isNullOrEmpty()) {
+ Snackbar.make(binding.root, errorMessage, Snackbar.LENGTH_LONG)
+ .setAction("Повторить") {
+ viewModel.refreshPhotos(args.album.id)
+ }
+ .show()
+ }
+ }
+
+ viewModel.isFromCache.observe(viewLifecycleOwner) { isFromCache ->
+ if (isFromCache) {
+ Snackbar.make(binding.root, "Данные загружены из кэша. Нет подключения к интернету.", Snackbar.LENGTH_LONG).show()
+ }
+ }
+
+ viewModel.albumTitle.observe(viewLifecycleOwner) { title ->
+ requireActivity().title = title
+ }
+ }
+
+ override fun onDestroyView() {
+ super.onDestroyView()
+ _binding = null
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/gallery/ui/photos/PhotosViewModel.kt b/app/src/main/java/com/example/gallery/ui/photos/PhotosViewModel.kt
new file mode 100644
index 0000000..4cf12dd
--- /dev/null
+++ b/app/src/main/java/com/example/gallery/ui/photos/PhotosViewModel.kt
@@ -0,0 +1,94 @@
+package com.example.gallery.ui.photos
+
+import android.content.Context
+import android.net.ConnectivityManager
+import android.net.NetworkCapabilities
+import androidx.lifecycle.LiveData
+import androidx.lifecycle.MutableLiveData
+import androidx.lifecycle.ViewModel
+import androidx.lifecycle.viewModelScope
+import com.example.gallery.App
+import com.example.gallery.models.Album
+import com.example.gallery.models.Photo
+import com.example.gallery.repository.GalleryRepository
+import kotlinx.coroutines.launch
+
+class PhotosViewModel : ViewModel() {
+ private val repository = GalleryRepository()
+
+ private val _photos = MutableLiveData>()
+ val photos: LiveData> = _photos
+
+ private val _isLoading = MutableLiveData()
+ val isLoading: LiveData = _isLoading
+
+ private val _error = MutableLiveData()
+ val error: LiveData = _error
+
+ private val _albumTitle = MutableLiveData()
+ val albumTitle: LiveData = _albumTitle
+
+ private val _isFromCache = MutableLiveData()
+ val isFromCache: LiveData = _isFromCache
+
+ fun loadPhotos(album: Album) {
+ _albumTitle.value = album.title
+ _isFromCache.value = false
+
+ album.photos?.let {
+ _photos.value = it
+ return
+ }
+
+ viewModelScope.launch {
+ _isLoading.value = true
+ _error.value = null
+
+ repository.getAlbumDetails(album.id).fold(
+ onSuccess = { albumDetails ->
+ _photos.value = albumDetails.photos ?: emptyList()
+ _isLoading.value = false
+
+ if ((albumDetails.photos?.isNotEmpty() == true) && !isInternetAvailable()) {
+ _isFromCache.value = true
+ }
+ },
+ onFailure = { e ->
+ _error.value = e.message ?: "Неизвестная ошибка"
+ _isLoading.value = false
+ }
+ )
+ }
+ }
+
+ fun refreshPhotos(albumId: Int) {
+ viewModelScope.launch {
+ _isLoading.value = true
+ _error.value = null
+ _isFromCache.value = false
+
+ repository.getAlbumDetails(albumId).fold(
+ onSuccess = { albumDetails ->
+ _photos.value = albumDetails.photos ?: emptyList()
+ _isLoading.value = false
+
+ if ((albumDetails.photos?.isNotEmpty() == true) && !isInternetAvailable()) {
+ _isFromCache.value = true
+ }
+ },
+ onFailure = { e ->
+ _error.value = e.message ?: "Неизвестная ошибка"
+ _isLoading.value = false
+ }
+ )
+ }
+ }
+
+ // Проверка доступности интернета
+ private fun isInternetAvailable(): Boolean {
+ val connectivityManager = App.instance.getSystemService(Context.CONNECTIVITY_SERVICE) as ConnectivityManager
+ val network = connectivityManager.activeNetwork ?: return false
+ val networkCapabilities = connectivityManager.getNetworkCapabilities(network) ?: return false
+ return networkCapabilities.hasCapability(NetworkCapabilities.NET_CAPABILITY_INTERNET)
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/res/drawable/ic_gallery_logo.xml b/app/src/main/res/drawable/ic_gallery_logo.xml
new file mode 100644
index 0000000..1ffd762
--- /dev/null
+++ b/app/src/main/res/drawable/ic_gallery_logo.xml
@@ -0,0 +1,9 @@
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/ic_launcher_background.xml b/app/src/main/res/drawable/ic_launcher_background.xml
index 07d5da9..ca3826a 100644
--- a/app/src/main/res/drawable/ic_launcher_background.xml
+++ b/app/src/main/res/drawable/ic_launcher_background.xml
@@ -1,170 +1,74 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ xmlns:android="http://schemas.android.com/apk/res/android">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/drawable/splash_background.xml b/app/src/main/res/drawable/splash_background.xml
new file mode 100644
index 0000000..b9b758a
--- /dev/null
+++ b/app/src/main/res/drawable/splash_background.xml
@@ -0,0 +1,9 @@
+
+
+
+ -
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_photo_detail.xml b/app/src/main/res/layout/fragment_photo_detail.xml
new file mode 100644
index 0000000..91408cb
--- /dev/null
+++ b/app/src/main/res/layout/fragment_photo_detail.xml
@@ -0,0 +1,69 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_photos.xml b/app/src/main/res/layout/fragment_photos.xml
new file mode 100644
index 0000000..603b3c2
--- /dev/null
+++ b/app/src/main/res/layout/fragment_photos.xml
@@ -0,0 +1,61 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/item_photo.xml b/app/src/main/res/layout/item_photo.xml
new file mode 100644
index 0000000..20b100e
--- /dev/null
+++ b/app/src/main/res/layout/item_photo.xml
@@ -0,0 +1,63 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/shimmer_photo_item.xml b/app/src/main/res/layout/shimmer_photo_item.xml
new file mode 100644
index 0000000..b4de878
--- /dev/null
+++ b/app/src/main/res/layout/shimmer_photo_item.xml
@@ -0,0 +1,51 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
index 6f3b755..c4a603d 100644
--- a/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
+++ b/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
@@ -1,6 +1,5 @@
-
-
-
+
+
\ No newline at end of file
diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
index 6f3b755..c4a603d 100644
--- a/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
+++ b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
@@ -1,6 +1,5 @@
-
-
-
+
+
\ No newline at end of file
diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher.webp b/app/src/main/res/mipmap-hdpi/ic_launcher.webp
index c209e78..0814e32 100644
Binary files a/app/src/main/res/mipmap-hdpi/ic_launcher.webp and b/app/src/main/res/mipmap-hdpi/ic_launcher.webp differ
diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp b/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp
new file mode 100644
index 0000000..11319cc
Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp differ
diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp
index b2dfe3d..43b435b 100644
Binary files a/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp and b/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp differ
diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher.webp b/app/src/main/res/mipmap-mdpi/ic_launcher.webp
index 4f0f1d6..82511bc 100644
Binary files a/app/src/main/res/mipmap-mdpi/ic_launcher.webp and b/app/src/main/res/mipmap-mdpi/ic_launcher.webp differ
diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp b/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp
new file mode 100644
index 0000000..b4e219a
Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp differ
diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
index 62b611d..8826597 100644
Binary files a/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp and b/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp differ
diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher.webp b/app/src/main/res/mipmap-xhdpi/ic_launcher.webp
index 948a307..c81f65a 100644
Binary files a/app/src/main/res/mipmap-xhdpi/ic_launcher.webp and b/app/src/main/res/mipmap-xhdpi/ic_launcher.webp differ
diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp b/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp
new file mode 100644
index 0000000..be901a1
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp differ
diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
index 1b9a695..5ef42b3 100644
Binary files a/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp and b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp differ
diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp b/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
index 28d4b77..b3ae9a8 100644
Binary files a/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp and b/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp differ
diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp b/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp
new file mode 100644
index 0000000..b603157
Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp differ
diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
index 9287f50..54c80c9 100644
Binary files a/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp and b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp differ
diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
index aa7d642..a951a6a 100644
Binary files a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp differ
diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp
new file mode 100644
index 0000000..630218c
Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp differ
diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
index 9126ae3..b030b52 100644
Binary files a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp differ
diff --git a/app/src/main/res/navigation/nav_graph.xml b/app/src/main/res/navigation/nav_graph.xml
index 0bb098e..0198264 100644
--- a/app/src/main/res/navigation/nav_graph.xml
+++ b/app/src/main/res/navigation/nav_graph.xml
@@ -22,7 +22,7 @@
tools:layout="@layout/fragment_photos">
+ app:argType="com.example.gallery.models.Album" />
@@ -30,11 +30,11 @@
+ app:argType="com.example.gallery.models.Photo" />
\ No newline at end of file
diff --git a/app/src/main/res/values-night/themes.xml b/app/src/main/res/values-night/themes.xml
index a87477d..46417fc 100644
--- a/app/src/main/res/values-night/themes.xml
+++ b/app/src/main/res/values-night/themes.xml
@@ -1,7 +1,13 @@
-
-
-
\ No newline at end of file
diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml
index c8524cd..723e09d 100644
--- a/app/src/main/res/values/colors.xml
+++ b/app/src/main/res/values/colors.xml
@@ -1,5 +1,10 @@
- #FF000000
- #FFFFFFFF
+ #3F51B5
+ #303F9F
+ #FF4081
+
+ #FFFFFF
+ #000000
+ #F5F5F5
\ No newline at end of file
diff --git a/app/src/main/res/values/themes.xml b/app/src/main/res/values/themes.xml
index b116c17..df798b1 100644
--- a/app/src/main/res/values/themes.xml
+++ b/app/src/main/res/values/themes.xml
@@ -1,9 +1,17 @@
-
-
-
-
+
\ No newline at end of file