Modern Apps git

← Modern-Apps.git

photos: create photos app

Commit
7888f90b61d844f8d1fe03bd5499aab8f244a2e1
Author
Vayun <[email protected]>
When
2026-01-19 20:02 UTC (10 months ago)
Parents
714820b

Diff

.idea/deploymentTargetSelector.xml
diff --git a/.idea/deploymentTargetSelector.xml b/.idea/deploymentTargetSelector.xmlindex 437d3dd81f..53ae483f96 100644--- a/.idea/deploymentTargetSelector.xml+++ b/.idea/deploymentTargetSelector.xml@@ -40,6 +40,9 @@       <SelectionState runConfigName="files">         <option name="selectionMode" value="DROPDOWN" />       </SelectionState>+      <SelectionState runConfigName="photos">+        <option name="selectionMode" value="DROPDOWN" />+      </SelectionState>     </selectionStates>   </component> </project>\ No newline at end of file
.idea/gradle.xml
diff --git a/.idea/gradle.xml b/.idea/gradle.xmlindex 1f7e8ba5e8..c931fe972e 100644--- a/.idea/gradle.xml+++ b/.idea/gradle.xml@@ -20,6 +20,7 @@             <option value="$PROJECT_DIR$/openassistant" />             <option value="$PROJECT_DIR$/passwords" />             <option value="$PROJECT_DIR$/pdf" />+            <option value="$PROJECT_DIR$/photos" />           </set>         </option>       </GradleProjectSettings>
gradle/libs.versions.toml
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.tomlindex 25621682f9..cd3909e8de 100644--- a/gradle/libs.versions.toml+++ b/gradle/libs.versions.toml@@ -1,6 +1,7 @@ [versions] # Tooling & Plugins agp = "9.0.0-beta05"+coilCompose = "2.7.0" kotlin = "2.3.0"  # Core AndroidX & Lifecycle@@ -41,6 +42,7 @@ pdfViewer = "1.0.0-alpha12"  [libraries] # Core AndroidX+coil-compose = { module = "io.coil-kt:coil-compose", version.ref = "coilCompose" } compose-markdown = { group = "com.github.jeziellago", name = "compose-markdown", version.ref = "composeMarkdown" }  androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
photos/.gitignore
diff --git a/photos/.gitignore b/photos/.gitignorenew file mode 100644index 0000000000..42afabfd2a--- /dev/null+++ b/photos/.gitignore@@ -0,0 +1 @@+/build\ No newline at end of file
photos/build.gradle.kts
diff --git a/photos/build.gradle.kts b/photos/build.gradle.ktsnew file mode 100644index 0000000000..a403b3ce2d--- /dev/null+++ b/photos/build.gradle.kts@@ -0,0 +1,21 @@+plugins {+    alias(libs.plugins.ksp)+}++android {+    defaultConfig {+        applicationId = "com.vayunmathur.photos"+        versionCode = 22+        versionName = "v2.0.0"+    }+}++dependencies {+    implementation(libs.androidx.navigation3.runtime)++    implementation(libs.coil.compose)++    implementation(libs.androidx.room.runtime)+    implementation(libs.androidx.room.ktx)+    ksp(libs.androidx.room.compiler)+}\ No newline at end of file
photos/src/androidTest/java/com/vayunmathur/photos/ExampleInstrumentedTest.kt
diff --git a/photos/src/androidTest/java/com/vayunmathur/photos/ExampleInstrumentedTest.kt b/photos/src/androidTest/java/com/vayunmathur/photos/ExampleInstrumentedTest.ktnew file mode 100644index 0000000000..e4ff27d798--- /dev/null+++ b/photos/src/androidTest/java/com/vayunmathur/photos/ExampleInstrumentedTest.kt@@ -0,0 +1,24 @@+package com.vayunmathur.photos++import androidx.test.platform.app.InstrumentationRegistry+import androidx.test.ext.junit.runners.AndroidJUnit4++import org.junit.Test+import org.junit.runner.RunWith++import org.junit.Assert.*++/**+ * Instrumented test, which will execute on an Android device.+ *+ * See [testing documentation](http://d.android.com/tools/testing).+ */+@RunWith(AndroidJUnit4::class)+class ExampleInstrumentedTest {+    @Test+    fun useAppContext() {+        // Context of the app under test.+        val appContext = InstrumentationRegistry.getInstrumentation().targetContext+        assertEquals("com.vayunmathur.photos", appContext.packageName)+    }+}\ No newline at end of file
photos/src/main/AndroidManifest.xml
diff --git a/photos/src/main/AndroidManifest.xml b/photos/src/main/AndroidManifest.xmlnew file mode 100644index 0000000000..00cd50c060--- /dev/null+++ b/photos/src/main/AndroidManifest.xml@@ -0,0 +1,25 @@+<?xml version="1.0" encoding="utf-8"?>+<manifest xmlns:android="http://schemas.android.com/apk/res/android">++    <uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />+    <uses-permission android:name="android.permission.READ_MEDIA_VIDEO" />++    <application+        android:icon="@mipmap/ic_launcher"+        android:label="@string/app_name"+        android:roundIcon="@mipmap/ic_launcher_round"+        android:supportsRtl="true"+        android:theme="@style/Theme.General">+        <activity+            android:name=".MainActivity"+            android:exported="true"+            android:theme="@style/Theme.General">+            <intent-filter>+                <action android:name="android.intent.action.MAIN" />++                <category android:name="android.intent.category.LAUNCHER" />+            </intent-filter>+        </activity>+    </application>++</manifest>\ No newline at end of file
photos/src/main/ic_launcher-playstore.png
diff --git a/photos/src/main/ic_launcher-playstore.png b/photos/src/main/ic_launcher-playstore.pngnew file mode 100644index 0000000000..b33a91d993Binary files /dev/null and b/photos/src/main/ic_launcher-playstore.png differ
photos/src/main/java/com/vayunmathur/photos/MainActivity.kt
diff --git a/photos/src/main/java/com/vayunmathur/photos/MainActivity.kt b/photos/src/main/java/com/vayunmathur/photos/MainActivity.ktnew file mode 100644index 0000000000..e67acaf406--- /dev/null+++ b/photos/src/main/java/com/vayunmathur/photos/MainActivity.kt@@ -0,0 +1,57 @@+package com.vayunmathur.photos++import android.os.Bundle+import androidx.activity.ComponentActivity+import androidx.activity.compose.setContent+import androidx.activity.enableEdgeToEdge+import androidx.compose.runtime.Composable+import androidx.compose.runtime.LaunchedEffect+import androidx.navigation3.runtime.NavKey+import com.vayunmathur.library.ui.DynamicTheme+import com.vayunmathur.library.util.DatabaseViewModel+import com.vayunmathur.library.util.MainNavigation+import com.vayunmathur.library.util.buildDatabase+import com.vayunmathur.library.util.rememberNavBackStack+import com.vayunmathur.photos.data.Photo+import com.vayunmathur.photos.data.PhotoDatabase+import com.vayunmathur.photos.ui.GalleryPage+import com.vayunmathur.photos.ui.PhotoPage+import kotlinx.coroutines.delay+import kotlinx.serialization.Serializable++class MainActivity : ComponentActivity() {+    override fun onCreate(savedInstanceState: Bundle?) {+        super.onCreate(savedInstanceState)+        enableEdgeToEdge()+        val db = buildDatabase<PhotoDatabase>()+        val viewModel = DatabaseViewModel(Photo::class to db.noteDao())+        setContent {+            DynamicTheme {+                Navigation(viewModel)+            }+        }+    }+}++@Serializable+sealed interface Route: NavKey {+    @Serializable+    data object Gallery: Route++    @Serializable+    data class Photo(val id: Long): Route+}++@Composable+fun Navigation(viewModel: DatabaseViewModel) {+    val backStack = rememberNavBackStack<Route>(Route.Gallery)+    MainNavigation(backStack) {+        entry<Route.Gallery>() {+            GalleryPage(backStack, viewModel)+        }++        entry<Route.Photo>() {+            PhotoPage(backStack, viewModel, it.id)+        }+    }+}\ No newline at end of file
photos/src/main/java/com/vayunmathur/photos/data/Photo.kt
diff --git a/photos/src/main/java/com/vayunmathur/photos/data/Photo.kt b/photos/src/main/java/com/vayunmathur/photos/data/Photo.ktnew file mode 100644index 0000000000..b7b726febc--- /dev/null+++ b/photos/src/main/java/com/vayunmathur/photos/data/Photo.kt@@ -0,0 +1,21 @@+package com.vayunmathur.photos.data++import androidx.room.Entity+import androidx.room.PrimaryKey+import com.vayunmathur.library.util.DatabaseItem+import kotlinx.serialization.Serializable++@Serializable+@Entity+data class Photo(+    @PrimaryKey(autoGenerate = true) override val id: Long = 0,+    val name: String,+    val uri: String,+    val date: Long,+    val width: Int,+    val height: Int,+    val country: String? = null,+    override val position: Double = 0.0+) : DatabaseItem<Photo>() {+    override fun withPosition(position: Double): Photo = copy(position = position)+}\ No newline at end of file
photos/src/main/java/com/vayunmathur/photos/data/PhotoDao.kt
diff --git a/photos/src/main/java/com/vayunmathur/photos/data/PhotoDao.kt b/photos/src/main/java/com/vayunmathur/photos/data/PhotoDao.ktnew file mode 100644index 0000000000..80f03130eb--- /dev/null+++ b/photos/src/main/java/com/vayunmathur/photos/data/PhotoDao.kt@@ -0,0 +1,12 @@+package com.vayunmathur.photos.data++import androidx.room.Dao+import androidx.room.Query+import com.vayunmathur.library.util.TrueDao+import kotlinx.coroutines.flow.Flow++@Dao+interface PhotoDao: TrueDao<Photo> {+    @Query("SELECT * FROM Photo ORDER BY position")+    override fun getAll(): Flow<List<Photo>>+}\ No newline at end of file
photos/src/main/java/com/vayunmathur/photos/data/PhotoDatabase.kt
diff --git a/photos/src/main/java/com/vayunmathur/photos/data/PhotoDatabase.kt b/photos/src/main/java/com/vayunmathur/photos/data/PhotoDatabase.ktnew file mode 100644index 0000000000..080e537a13--- /dev/null+++ b/photos/src/main/java/com/vayunmathur/photos/data/PhotoDatabase.kt@@ -0,0 +1,9 @@+package com.vayunmathur.photos.data++import androidx.room.Database+import androidx.room.RoomDatabase++@Database(entities = [Photo::class], version = 1)+abstract class PhotoDatabase : RoomDatabase() {+    abstract fun noteDao(): PhotoDao+}\ No newline at end of file
photos/src/main/java/com/vayunmathur/photos/ui/GalleryPage.kt
diff --git a/photos/src/main/java/com/vayunmathur/photos/ui/GalleryPage.kt b/photos/src/main/java/com/vayunmathur/photos/ui/GalleryPage.ktnew file mode 100644index 0000000000..18d4b8e330--- /dev/null+++ b/photos/src/main/java/com/vayunmathur/photos/ui/GalleryPage.kt@@ -0,0 +1,182 @@+package com.vayunmathur.photos.ui++import android.content.ContentUris+import android.content.Context+import android.graphics.Bitmap+import android.media.ExifInterface+import android.provider.MediaStore+import android.util.Size+import androidx.compose.foundation.Image+import androidx.compose.foundation.background+import androidx.compose.foundation.clickable+import androidx.compose.foundation.interaction.MutableInteractionSource+import androidx.compose.foundation.layout.Arrangement+import androidx.compose.foundation.layout.Box+import androidx.compose.foundation.layout.aspectRatio+import androidx.compose.foundation.layout.fillMaxSize+import androidx.compose.foundation.layout.fillMaxWidth+import androidx.compose.foundation.layout.padding+import androidx.compose.foundation.layout.size+import androidx.compose.foundation.lazy.grid.GridCells+import androidx.compose.foundation.lazy.grid.GridItemSpan+import androidx.compose.foundation.lazy.grid.LazyVerticalGrid+import androidx.compose.foundation.lazy.grid.items+import androidx.compose.foundation.shape.RoundedCornerShape+import androidx.compose.material3.MaterialTheme+import androidx.compose.material3.Scaffold+import androidx.compose.material3.Text+import androidx.compose.runtime.Composable+import androidx.compose.runtime.LaunchedEffect+import androidx.compose.runtime.collectAsState+import androidx.compose.runtime.derivedStateOf+import androidx.compose.runtime.getValue+import androidx.compose.runtime.mutableStateOf+import androidx.compose.runtime.remember+import androidx.compose.runtime.setValue+import androidx.compose.ui.Modifier+import androidx.compose.ui.draw.clip+import androidx.compose.ui.graphics.Color+import androidx.compose.ui.graphics.asImageBitmap+import androidx.compose.ui.layout.ContentScale+import androidx.compose.ui.platform.LocalContext+import androidx.compose.ui.unit.dp+import androidx.core.net.toUri+import androidx.navigation3.runtime.NavBackStack+import coil.ImageLoader+import coil.compose.AsyncImage+import coil.disk.DiskCache+import coil.memory.MemoryCache+import coil.request.ImageRequest+import com.vayunmathur.library.util.DatabaseViewModel+import com.vayunmathur.photos.Route+import com.vayunmathur.photos.data.Photo+import kotlinx.coroutines.Dispatchers+import kotlinx.coroutines.delay+import kotlinx.coroutines.withContext+import kotlinx.datetime.LocalDate+import kotlinx.datetime.TimeZone+import kotlinx.datetime.format.MonthNames+import kotlinx.datetime.number+import kotlinx.datetime.toLocalDateTime+import kotlin.time.Instant++@Composable+fun GalleryPage(backStack: NavBackStack<Route>, viewModel: DatabaseViewModel) {+    val photos by viewModel.data<Photo>().collectAsState()+    val context = LocalContext.current+    val imageLoader = remember { ImageLoader.Builder(context)+        .memoryCache {+            MemoryCache.Builder(context)+                .maxSizePercent(0.25) // Use 25% of available RAM+                .build()+        }+        .diskCache {+            DiskCache.Builder()+                .directory(context.cacheDir.resolve("image_cache"))+                .maxSizePercent(0.05) // Use 5% of disk space (or a fixed size like 512MB)+                .build()+        }+        .respectCacheHeaders(false) // Important for local files/mediastore+        .build() }+    LaunchedEffect(Unit) {+        println(photos.size)+        delay(100)+        if(photos.isEmpty()) {+            addAllPhotos(context, viewModel)+        }+    }+    val photosGroupedByMonth by remember {+        derivedStateOf {+            photos.groupBy {+                val date = Instant.fromEpochMilliseconds(it.date).toLocalDateTime(TimeZone.currentSystemDefault())+                LocalDate(date.year, date.month, 1)+            }.toSortedMap(Comparator<LocalDate>(LocalDate::compareTo).reversed()).mapKeys {+                MonthNames.ENGLISH_ABBREVIATED.names[it.key.month.ordinal] + " " + it.key.year+            }+        }+    }+    Scaffold() { paddingValues ->+        LazyVerticalGrid(+            GridCells.Adaptive(40.dp),+            Modifier.padding(paddingValues),+            horizontalArrangement = Arrangement.spacedBy(4.dp),+            verticalArrangement = Arrangement.spacedBy(4.dp)+        ) {+            photosGroupedByMonth.forEach { (month, photos) ->+                item(span = {+                    GridItemSpan(maxLineSpan)+                }) {+                    Text(+                        month,+                        Modifier.padding(top = 16.dp, bottom = 8.dp),+                        style = MaterialTheme.typography.titleLarge+                    )+                }+                items(photos, { it.id }, contentType = { "photo_thumbnail" }) {+                    PhotoItem(it, imageLoader, backStack)+                }+            }+        }+    }+}++@Composable+fun PhotoItem(photo: Photo, imageLoader: ImageLoader, backStack: NavBackStack<Route>) {+    AsyncImage(+        model = ImageRequest.Builder(LocalContext.current)+            .data(photo.uri.toUri())+            .diskCacheKey(photo.id.toString())+            .memoryCacheKey(photo.id.toString())+            .crossfade(true)+            .size(128) // Coil will handle the downsampling for you+            .build(),+        imageLoader = imageLoader,+        contentDescription = null,+        contentScale = ContentScale.Crop,+        modifier = Modifier+            .fillMaxWidth()+            .aspectRatio(1f)+            .clip(RoundedCornerShape(8.dp))+            .clickable(interactionSource = remember { MutableInteractionSource() }, indication = null) {+                backStack.add(Route.Photo(photo.id))+            }+            .background(Color.LightGray) // Placeholder while loading+    )+}++fun addAllPhotos(context: Context, viewModel: DatabaseViewModel) {+    val projection = arrayOf(+        MediaStore.Images.Media._ID,+        MediaStore.Images.Media.DISPLAY_NAME,+        MediaStore.Images.Media.INFERRED_DATE,+        MediaStore.Images.Media.WIDTH,+        MediaStore.Images.Media.HEIGHT+    )+    val query = context.contentResolver.query(+        MediaStore.Images.Media.EXTERNAL_CONTENT_URI,+        projection,+        null, null, null+    )++    val photos = mutableListOf<Photo>()++    query?.use { cursor ->+        val idColumn = cursor.getColumnIndexOrThrow(MediaStore.Images.Media._ID)+        val nameColumn = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DISPLAY_NAME)+        val dateColumn = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.INFERRED_DATE)+        val widthColumn = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.WIDTH)+        val heightColumn = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.HEIGHT)+++        while (cursor.moveToNext()) {+            val id = cursor.getLong(idColumn)+            val contentUri = ContentUris.withAppendedId(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, id)+            val name = cursor.getString(nameColumn)+            val date = cursor.getLong(dateColumn)+            val width = cursor.getInt(widthColumn)+            val height = cursor.getInt(heightColumn)+            photos += Photo(id, name, contentUri.toString(), date, width, height)+        }+    }+    viewModel.upsertAll(photos.sortedByDescending { it.date })+}\ No newline at end of file
photos/src/main/java/com/vayunmathur/photos/ui/PhotoPage.kt
diff --git a/photos/src/main/java/com/vayunmathur/photos/ui/PhotoPage.kt b/photos/src/main/java/com/vayunmathur/photos/ui/PhotoPage.ktnew file mode 100644index 0000000000..b861a51d43--- /dev/null+++ b/photos/src/main/java/com/vayunmathur/photos/ui/PhotoPage.kt@@ -0,0 +1,78 @@+package com.vayunmathur.photos.ui++import androidx.compose.foundation.background+import androidx.compose.foundation.layout.Box+import androidx.compose.foundation.layout.Column+import androidx.compose.foundation.layout.fillMaxSize+import androidx.compose.foundation.layout.fillMaxWidth+import androidx.compose.foundation.layout.padding+import androidx.compose.material3.MaterialTheme+import androidx.compose.material3.Scaffold+import androidx.compose.material3.Text+import androidx.compose.runtime.Composable+import androidx.compose.runtime.collectAsState+import androidx.compose.runtime.getValue+import androidx.compose.runtime.remember+import androidx.compose.ui.Alignment+import androidx.compose.ui.Modifier+import androidx.compose.ui.graphics.Color+import androidx.compose.ui.layout.ContentScale+import androidx.compose.ui.platform.LocalContext+import androidx.compose.ui.unit.dp+import androidx.core.net.toUri+import androidx.navigation3.runtime.NavBackStack+import coil.compose.AsyncImage+import coil.request.ImageRequest+import com.vayunmathur.library.util.DatabaseViewModel+import com.vayunmathur.photos.Route+import com.vayunmathur.photos.data.Photo+import kotlinx.datetime.LocalDateTime+import kotlinx.datetime.TimeZone+import kotlinx.datetime.toLocalDateTime+import kotlin.time.Instant++@Composable+fun PhotoPage(backStack: NavBackStack<Route>, viewModel: DatabaseViewModel, id: Long) {+    val photo by viewModel.get<Photo>(id)+    val context = LocalContext.current++    Scaffold(+        containerColor = Color.Black // Better for viewing photos+    ) { paddingValues ->+        Box(modifier = Modifier.fillMaxSize().padding(paddingValues)) {+            // 1. Full Screen Image+            AsyncImage(+                model = ImageRequest.Builder(context)+                    .data(photo.uri.toUri())+                    .crossfade(true)+                    .build(),+                contentDescription = photo.name,+                modifier = Modifier.fillMaxSize(),+                contentScale = ContentScale.Fit // Shows the whole photo without cropping+            )++            // 2. Metadata Overlay (Bottom)+            Column(+                modifier = Modifier+                    .align(Alignment.BottomStart)+                    .fillMaxWidth()+                    .background(Color.Black.copy(alpha = 0.6f))+                    .padding(16.dp)+            ) {+                Text(text = photo.name, color = Color.White, style = MaterialTheme.typography.titleLarge)++                val dateFormatted = remember(photo.date) {+                    Instant.fromEpochMilliseconds(photo.date)+                        .toLocalDateTime(TimeZone.currentSystemDefault())+                        .let { "${it.day} ${it.month} ${it.year}" }+                }++                Text(text = "Taken on: $dateFormatted", color = Color.LightGray)++                // Location and Resolution (assuming they are properties of your Photo class)+                Text(text = "Location: ${photo.country ?: "Unknown"}", color = Color.LightGray)+                Text(text = "Resolution: ${photo.width} x ${photo.height}", color = Color.LightGray)+            }+        }+    }+}\ No newline at end of file
photos/src/main/res/drawable/ic_launcher_foreground.xml
diff --git a/photos/src/main/res/drawable/ic_launcher_foreground.xml b/photos/src/main/res/drawable/ic_launcher_foreground.xmlnew file mode 100644index 0000000000..1b84657192--- /dev/null+++ b/photos/src/main/res/drawable/ic_launcher_foreground.xml@@ -0,0 +1,15 @@+<vector xmlns:android="http://schemas.android.com/apk/res/android"+    android:width="108dp"+    android:height="108dp"+    android:viewportWidth="960"+    android:viewportHeight="960"+    android:tint="#000000">+  <group android:scaleX="0.58"+      android:scaleY="0.58"+      android:translateX="201.6"+      android:translateY="201.6">+    <path+        android:fillColor="@android:color/white"+        android:pathData="M360,560L760,560L622,380L530,500L468,420L360,560ZM320,720Q287,720 263.5,696.5Q240,673 240,640L240,160Q240,127 263.5,103.5Q287,80 320,80L800,80Q833,80 856.5,103.5Q880,127 880,160L880,640Q880,673 856.5,696.5Q833,720 800,720L320,720ZM320,640L800,640Q800,640 800,640Q800,640 800,640L800,160Q800,160 800,160Q800,160 800,160L320,160Q320,160 320,160Q320,160 320,160L320,640Q320,640 320,640Q320,640 320,640ZM160,880Q127,880 103.5,856.5Q80,833 80,800L80,240L160,240L160,800Q160,800 160,800Q160,800 160,800L720,800L720,880L160,880ZM320,160L320,160Q320,160 320,160Q320,160 320,160L320,640Q320,640 320,640Q320,640 320,640L320,640Q320,640 320,640Q320,640 320,640L320,160Q320,160 320,160Q320,160 320,160Z"/>+  </group>+</vector>
photos/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
diff --git a/photos/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/photos/src/main/res/mipmap-anydpi-v26/ic_launcher.xmlnew file mode 100644index 0000000000..ef49c99170--- /dev/null+++ b/photos/src/main/res/mipmap-anydpi-v26/ic_launcher.xml@@ -0,0 +1,6 @@+<?xml version="1.0" encoding="utf-8"?>+<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">+    <background android:drawable="@color/ic_launcher_background"/>+    <foreground android:drawable="@drawable/ic_launcher_foreground"/>+    <monochrome android:drawable="@drawable/ic_launcher_foreground"/>+</adaptive-icon>\ No newline at end of file
photos/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
diff --git a/photos/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/photos/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xmlnew file mode 100644index 0000000000..ef49c99170--- /dev/null+++ b/photos/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml@@ -0,0 +1,6 @@+<?xml version="1.0" encoding="utf-8"?>+<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">+    <background android:drawable="@color/ic_launcher_background"/>+    <foreground android:drawable="@drawable/ic_launcher_foreground"/>+    <monochrome android:drawable="@drawable/ic_launcher_foreground"/>+</adaptive-icon>\ No newline at end of file
photos/src/main/res/mipmap-hdpi/ic_launcher.webp
diff --git a/photos/src/main/res/mipmap-hdpi/ic_launcher.webp b/photos/src/main/res/mipmap-hdpi/ic_launcher.webpnew file mode 100644index 0000000000..16456940b1Binary files /dev/null and b/photos/src/main/res/mipmap-hdpi/ic_launcher.webp differ
photos/src/main/res/mipmap-hdpi/ic_launcher_round.webp
diff --git a/photos/src/main/res/mipmap-hdpi/ic_launcher_round.webp b/photos/src/main/res/mipmap-hdpi/ic_launcher_round.webpnew file mode 100644index 0000000000..03b1b8fa81Binary files /dev/null and b/photos/src/main/res/mipmap-hdpi/ic_launcher_round.webp differ
photos/src/main/res/mipmap-mdpi/ic_launcher.webp
diff --git a/photos/src/main/res/mipmap-mdpi/ic_launcher.webp b/photos/src/main/res/mipmap-mdpi/ic_launcher.webpnew file mode 100644index 0000000000..6727fec3d6Binary files /dev/null and b/photos/src/main/res/mipmap-mdpi/ic_launcher.webp differ
photos/src/main/res/mipmap-mdpi/ic_launcher_round.webp
diff --git a/photos/src/main/res/mipmap-mdpi/ic_launcher_round.webp b/photos/src/main/res/mipmap-mdpi/ic_launcher_round.webpnew file mode 100644index 0000000000..057190f62bBinary files /dev/null and b/photos/src/main/res/mipmap-mdpi/ic_launcher_round.webp differ
photos/src/main/res/mipmap-xhdpi/ic_launcher.webp
diff --git a/photos/src/main/res/mipmap-xhdpi/ic_launcher.webp b/photos/src/main/res/mipmap-xhdpi/ic_launcher.webpnew file mode 100644index 0000000000..e3698c0c67Binary files /dev/null and b/photos/src/main/res/mipmap-xhdpi/ic_launcher.webp differ
photos/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
diff --git a/photos/src/main/res/mipmap-xhdpi/ic_launcher_round.webp b/photos/src/main/res/mipmap-xhdpi/ic_launcher_round.webpnew file mode 100644index 0000000000..4e5d6b2d7cBinary files /dev/null and b/photos/src/main/res/mipmap-xhdpi/ic_launcher_round.webp differ
photos/src/main/res/mipmap-xxhdpi/ic_launcher.webp
diff --git a/photos/src/main/res/mipmap-xxhdpi/ic_launcher.webp b/photos/src/main/res/mipmap-xxhdpi/ic_launcher.webpnew file mode 100644index 0000000000..26090c98d2Binary files /dev/null and b/photos/src/main/res/mipmap-xxhdpi/ic_launcher.webp differ
photos/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
diff --git a/photos/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp b/photos/src/main/res/mipmap-xxhdpi/ic_launcher_round.webpnew file mode 100644index 0000000000..cb38373900Binary files /dev/null and b/photos/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp differ
photos/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
diff --git a/photos/src/main/res/mipmap-xxxhdpi/ic_launcher.webp b/photos/src/main/res/mipmap-xxxhdpi/ic_launcher.webpnew file mode 100644index 0000000000..297e3e04a5Binary files /dev/null and b/photos/src/main/res/mipmap-xxxhdpi/ic_launcher.webp differ
photos/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
diff --git a/photos/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp b/photos/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webpnew file mode 100644index 0000000000..3b0f5fffa4Binary files /dev/null and b/photos/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp differ
photos/src/main/res/values/strings.xml
diff --git a/photos/src/main/res/values/strings.xml b/photos/src/main/res/values/strings.xmlnew file mode 100644index 0000000000..34e208b8ee--- /dev/null+++ b/photos/src/main/res/values/strings.xml@@ -0,0 +1,3 @@+<resources>+    <string name="app_name">Photos</string>+</resources>\ No newline at end of file
photos/src/test/java/com/vayunmathur/photos/ExampleUnitTest.kt
diff --git a/photos/src/test/java/com/vayunmathur/photos/ExampleUnitTest.kt b/photos/src/test/java/com/vayunmathur/photos/ExampleUnitTest.ktnew file mode 100644index 0000000000..27210477f1--- /dev/null+++ b/photos/src/test/java/com/vayunmathur/photos/ExampleUnitTest.kt@@ -0,0 +1,17 @@+package com.vayunmathur.photos++import org.junit.Test++import org.junit.Assert.*++/**+ * Example local unit test, which will execute on the development machine (host).+ *+ * See [testing documentation](http://d.android.com/tools/testing).+ */+class ExampleUnitTest {+    @Test+    fun addition_isCorrect() {+        assertEquals(4, 2 + 2)+    }+}\ No newline at end of file
settings.gradle.kts
diff --git a/settings.gradle.kts b/settings.gradle.ktsindex 977ce30f86..46fd9eed14 100644--- a/settings.gradle.kts+++ b/settings.gradle.kts@@ -31,3 +31,4 @@ include(":chess") include(":passwords") include(":notes") include(":files")+include(":photos")