mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-14 08:17:04 +05:30
android: try out integrating LobstersItem
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
parent
284dd8c67a
commit
7306cd3294
3 changed files with 29 additions and 2 deletions
|
@ -12,6 +12,7 @@ repositories { google() }
|
|||
|
||||
dependencies {
|
||||
implementation(projects.common)
|
||||
implementation("androidx.appcompat:appcompat:1.4.0-alpha02")
|
||||
implementation("androidx.activity:activity-compose:1.3.0-beta01")
|
||||
}
|
||||
|
||||
|
@ -25,4 +26,8 @@ android {
|
|||
versionName = "1.0"
|
||||
}
|
||||
buildTypes { getByName("release") { isMinifyEnabled = false } }
|
||||
compileOptions {
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="dev.msfjarvis.claw.android"
|
||||
>
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<application
|
||||
android:allowBackup="false"
|
||||
android:supportsRtl="true"
|
||||
|
|
|
@ -3,11 +3,32 @@ package dev.msfjarvis.claw.android
|
|||
import android.os.Bundle
|
||||
import androidx.activity.compose.setContent
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import dev.msfjarvis.claw.common.App
|
||||
import dev.msfjarvis.claw.common.posts.LobstersItem
|
||||
import dev.msfjarvis.lobsters.data.local.SavedPost
|
||||
|
||||
val TEST_POST =
|
||||
SavedPost(
|
||||
shortId = "zqyydb",
|
||||
title = "k2k20 hackathon report: Bob Beck on LibreSSL progress",
|
||||
url = "https://undeadly.org/cgi?action=article;sid=20200921105847",
|
||||
createdAt = "2020-09-21T07:11:14.000-05:00",
|
||||
commentsUrl = "https://lobste.rs/s/zqyydb/k2k20_hackathon_report_bob_beck_on",
|
||||
submitterName = "Vigdis",
|
||||
submitterAvatarUrl = "/404.html",
|
||||
tags = listOf("openbsd", "linux", "containers", "hack the planet", "no thanks"),
|
||||
)
|
||||
|
||||
class MainActivity : AppCompatActivity() {
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContent { App() }
|
||||
setContent {
|
||||
LobstersItem(
|
||||
post = TEST_POST,
|
||||
isSaved = false,
|
||||
{},
|
||||
{},
|
||||
{},
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue