Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
109 commits
Select commit Hold shift + click to select a range
3d77a02
feat: unified share
alperozturk96 Apr 20, 2026
51e7204
add api models
alperozturk96 Apr 21, 2026
11eb87e
adopt mock models to api models
alperozturk96 Apr 21, 2026
c704800
add translations, bind ui actions
alperozturk96 Apr 21, 2026
32ddfe1
add translations, bind ui actions
alperozturk96 Apr 21, 2026
12d261b
wip
alperozturk96 Apr 21, 2026
537a6f9
wip
alperozturk96 May 5, 2026
8b9a022
add test ocs call
alperozturk96 Apr 24, 2026
e1b6208
fix test call
alperozturk96 May 5, 2026
6770d5b
use client
alperozturk96 May 5, 2026
f63e5c6
wip
alperozturk96 May 5, 2026
f5a48c3
wip
alperozturk96 May 5, 2026
d1fac39
wip
alperozturk96 May 5, 2026
1314b03
wip
alperozturk96 May 6, 2026
3bac25d
wip
alperozturk96 May 6, 2026
c60ed66
wip
alperozturk96 May 27, 2026
662d1ec
wip
alperozturk96 May 27, 2026
4578a76
wip
alperozturk96 May 27, 2026
22c4d46
add empty view state
alperozturk96 May 27, 2026
ae73b20
wip
alperozturk96 May 27, 2026
97b69c3
wip
alperozturk96 May 28, 2026
91142d7
wip
alperozturk96 May 28, 2026
89c5a56
wip
alperozturk96 May 28, 2026
602ca65
wip
alperozturk96 May 29, 2026
4d889ec
wip
alperozturk96 May 29, 2026
77ec973
wip
alperozturk96 May 29, 2026
486f80e
wip
alperozturk96 May 29, 2026
ee4bd9b
wip
alperozturk96 May 29, 2026
b895b91
wip
alperozturk96 May 29, 2026
74a8e39
wip
alperozturk96 May 29, 2026
ee93bf7
wip
alperozturk96 Jun 1, 2026
8a3f652
wip
alperozturk96 Jun 1, 2026
e408cc9
wip
alperozturk96 Jun 1, 2026
1192e65
wip
alperozturk96 Jun 1, 2026
b1d646e
wip
alperozturk96 Jun 1, 2026
5e6a632
wip
alperozturk96 Jun 1, 2026
1910b8c
wip
alperozturk96 Jun 1, 2026
b30c659
wip
alperozturk96 Jun 1, 2026
9c0bc50
wip
alperozturk96 Jun 1, 2026
7d9adb2
wip
alperozturk96 Jun 1, 2026
5a36f32
wip
alperozturk96 Jun 9, 2026
fce4eb5
wip
alperozturk96 Jun 9, 2026
4119af7
wip
alperozturk96 Jun 9, 2026
8dd36dc
wip
alperozturk96 Jun 9, 2026
b9bac1b
wip
alperozturk96 Jun 9, 2026
50741ad
disable multi recipients
alperozturk96 Jun 10, 2026
a8be543
disable multi recipients
alperozturk96 Jun 10, 2026
c52367b
add secret and buttons
alperozturk96 Jun 10, 2026
1ee5a10
add secret and buttons
alperozturk96 Jun 10, 2026
ba055e1
fix enabled
alperozturk96 Jun 10, 2026
dc21f3e
use ISO8601
alperozturk96 Jun 10, 2026
b19241a
adopt latest open api
alperozturk96 Jun 10, 2026
d4b7eef
property updates
alperozturk96 Jun 10, 2026
6921410
add anyone recipient
alperozturk96 Jun 10, 2026
117172c
better error handling
alperozturk96 Jun 10, 2026
d1b442d
better error handling
alperozturk96 Jun 10, 2026
258bda4
fix issues
alperozturk96 Jun 10, 2026
fa31b57
fix issues
alperozturk96 Jun 10, 2026
a1937b7
wip
alperozturk96 Jun 22, 2026
eb603b5
wip
alperozturk96 Jul 2, 2026
f5873b6
wip
alperozturk96 Jul 2, 2026
506cd54
wip
alperozturk96 Jul 2, 2026
2392c5f
add PermissionPresetDropdown
alperozturk96 Jul 2, 2026
4f17838
remove unused strings
alperozturk96 Jul 2, 2026
0dc1b48
wip
alperozturk96 Jul 2, 2026
7f983ab
wip
alperozturk96 Jul 2, 2026
5533801
wip
alperozturk96 Jul 2, 2026
ffeed1b
wip
alperozturk96 Jul 2, 2026
9e7ac06
wip
alperozturk96 Jul 3, 2026
e822980
wip
alperozturk96 Jul 3, 2026
357298e
wip
alperozturk96 Jul 3, 2026
751b879
wip
alperozturk96 Jul 3, 2026
96fe9d2
wip
alperozturk96 Jul 3, 2026
1e0d4ae
wip
alperozturk96 Jul 3, 2026
c716a41
wip
alperozturk96 Jul 3, 2026
b94e251
wip
alperozturk96 Jul 3, 2026
dbd5771
wip
alperozturk96 Jul 3, 2026
83d6f00
wip
alperozturk96 Jul 3, 2026
f385c8d
wip
alperozturk96 Jul 3, 2026
a778785
wip
alperozturk96 Jul 3, 2026
eac29cf
wip
alperozturk96 Jul 3, 2026
77d8c02
wip
alperozturk96 Jul 3, 2026
571a8e7
wip
alperozturk96 Jul 3, 2026
dea0f8f
wip
alperozturk96 Jul 6, 2026
318a87f
wip
alperozturk96 Jul 6, 2026
1d5a528
wip
alperozturk96 Jul 6, 2026
6ab920d
wip
alperozturk96 Jul 6, 2026
69865e9
wip
alperozturk96 Jul 6, 2026
3ccb3bf
wip
alperozturk96 Jul 6, 2026
7f926dc
wip
alperozturk96 Jul 6, 2026
da51b83
wip
alperozturk96 Jul 6, 2026
381c94a
wip
alperozturk96 Jul 8, 2026
396d664
wip
alperozturk96 Jul 8, 2026
955d7aa
wip
alperozturk96 Jul 8, 2026
536ba3b
wip
alperozturk96 Jul 8, 2026
fb51144
wip
alperozturk96 Jul 9, 2026
31335f4
wip
alperozturk96 Jul 9, 2026
0312a96
wip
alperozturk96 Jul 9, 2026
81ead3e
wip
alperozturk96 Jul 9, 2026
04c169b
wip
alperozturk96 Jul 9, 2026
d7987ce
wip
alperozturk96 Jul 9, 2026
9e988f5
wip
alperozturk96 Jul 13, 2026
0f421a2
wip
alperozturk96 Jul 13, 2026
7623179
wip
alperozturk96 Jul 13, 2026
e3aa8b8
wip
alperozturk96 Jul 14, 2026
bbcccc4
wip
alperozturk96 Jul 14, 2026
847ccef
wip
alperozturk96 Jul 14, 2026
88da330
wip
alperozturk96 Jul 14, 2026
e0afc6b
wip
alperozturk96 Jul 14, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions gradle/verification-metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
<trusting group="androidx.customview" name="customview" version="1.2.0"/>
<trusting group="androidx.databinding"/>
<trusting group="androidx.dynamicanimation" name="dynamicanimation" version="1.1.0"/>
<trusting group="androidx.exifinterface" name="exifinterface" version="1.4.2"/>
<trusting group="androidx.lifecycle"/>
<trusting group="androidx.savedstate"/>
<trusting group="androidx.swiperefreshlayout" name="swiperefreshlayout" version="1.2.0"/>
Expand All @@ -98,13 +99,19 @@
<trusted-key id="19BEAB2D799C020F17C69126B16698A4ADF4D638" group="org.checkerframework"/>
<trusted-key id="1A55F091AD28C07F831FA44D7905DE25C78AD456" group="com.google.protobuf"/>
<trusted-key id="1D0A8B5E77C678A7C724445ABF984B4145EA13F7" group="com.squareup" name="javapoet" version="1.13.0"/>
<trusted-key id="1D217F8475EEE9F19AB8DD6B793FD5751A0F0780" group="^com[.]squareup($|([.].*))" regex="true"/>
<trusted-key id="1D2C7EF8ADA0F794B58C7C63436902AF59EDF60E">
<trusting group="dev.equo.ide" name="solstice" version="1.7.5"/>
<trusting group="dev.equo.ide" name="solstice" version="1.8.0"/>
<trusting group="dev.equo.ide" name="solstice" version="1.8.1"/>
<trusting group="dev.equo.ide" name="solstice" version="1.8.2"/>
</trusted-key>
<trusted-key id="1D85469D8559C2E1DF5F925131D2D79DF7E85DD3" group="org.jcommander" name="jcommander" version="1.85"/>
<trusted-key id="20723A6399BC060154283B37CFAE163B64AC9189">
<trusting group="org.jetbrains.androidx.lifecycle"/>
<trusting group="org.jetbrains.androidx.savedstate"/>
<trusting group="^org[.]jetbrains[.]compose($|([.].*))" regex="true"/>
</trusted-key>
<trusted-key id="24D04176586361FDA94EE0315F7786DF73E61F56">
<trusting group="com.google.devtools.ksp" name="symbol-processing-api" version="1.9.20-1.0.14"/>
<trusting group="com.google.devtools.ksp" name="symbol-processing-api" version="1.9.24-1.0.20"/>
Expand Down Expand Up @@ -174,6 +181,7 @@
<trusting group="org.slf4j"/>
</trusted-key>
<trusted-key id="635EE627345F3C1DD422B2E207D3516820BCF6B1" group="com.github.ben-manes.caffeine" name="caffeine" version="2.9.3"/>
<trusted-key id="64B9B09F164AA0BF88742EB61188B69F6D6259CA" group="com.google.accompanist" name="accompanist-drawablepainter" version="0.37.3"/>
<trusted-key id="694621A7227D8D5289699830ABE9F3126BB741C1" group="^com[.]google($|([.].*))" regex="true"/>
<trusted-key id="696B6199A2A9D8C29CE78CC0D041CAD2E452550F" group="com.google.protobuf"/>
<trusted-key id="6DD3B8C64EF75253BEB2C53AD908A43FB7EC07AC">
Expand Down Expand Up @@ -245,6 +253,7 @@
<trusting group="androidx.graphics" name="graphics-path" version="1.0.1"/>
<trusting group="androidx.lifecycle"/>
<trusting group="androidx.profileinstaller"/>
<trusting group="androidx.startup" name="startup-runtime" version="1.2.0"/>
<trusting group="androidx.transition" name="transition" version="1.5.0"/>
<trusting group="androidx.webkit"/>
<trusting group="^androidx[.]compose($|([.].*))" regex="true"/>
Expand Down Expand Up @@ -281,6 +290,7 @@
<trusted-key id="D6F1BC78607808EC8E9F69437A8860944FAD5F62" group="org.apache.commons" name="commons-parent"/>
<trusted-key id="DB0597E3144342256BC81E3EC727D053C4481CF5" group="org.tensorflow" name="tensorflow-lite-metadata" version="0.1.0-rc2"/>
<trusted-key id="DBD744ACE7ADE6AA50DD591F66B50994442D2D40" group="^com[.]squareup($|([.].*))" regex="true"/>
<trusted-key id="DF25D3C4868FEC177182FAD64D176DC503FB4267" group="io.coil-kt.coil3"/>
<trusted-key id="E52F07877A5805F9AF4AB0ACD46C5610D06E7001" group="com.ibm.icu" name="icu4j" version="77.1"/>
<trusted-key id="E77417AC194160A3FABD04969A259C7EE636C5ED" group="^com[.]google($|([.].*))" regex="true"/>
<trusted-key id="E7DC75FC24FB3C8DFE8086AD3D5839A2262CBBFB" group="org.jetbrains.kotlinx"/>
Expand All @@ -296,6 +306,7 @@
<trusting group="org.apache" name="apache" version="13"/>
<trusting group="org.codehaus.mojo"/>
</trusted-key>
<trusted-key id="F3BD845679DD6A30F3F50F91597852B0B140F0BC" group="com.caverock" name="androidsvg-aar" version="1.4"/>
<trusted-key id="F4DD59C90148BDC52BEB90A4530AA5F25C25011F" group="commons-codec"/>
<trusted-key id="FA77DCFEF2EE6EB2DEBEDD2C012579464D01C06A" group="org.apache" name="apache"/>
<trusted-key id="FA7929F83AD44C4590F6CC6815C71C0A4E0B8EDD" group="net.java.dev.jna"/>
Expand Down Expand Up @@ -335,6 +346,11 @@
<sha256 value="c8923871e556cd5467addabac6773e778f3a4d3da19bfc8153bbaee0d145298f" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="androidx.activity" name="activity-compose" version="1.7.0">
<artifact name="activity-compose-1.7.0.module">
<sha256 value="f7a29bcba338575dcf89a553cff9cfad3f140340eaf2b56fd0193244da602c0a" origin="Generated by Gradle" reason="Artifact is not signed"/>
</artifact>
</component>
<component group="androidx.activity" name="activity-compose" version="1.8.2">
<artifact name="activity-compose-1.8.2.aar">
<sha256 value="5a67e984f14ed2afc585aa3a23edff1c1791c80caa2bf68a0f799c1b11a39038" origin="Generated by Gradle"/>
Expand Down Expand Up @@ -19369,6 +19385,11 @@
<sha256 value="2a4f7b44a3d0ac7aec7dbf5b1aa88db938bf542f7351561fb1d3b5cf81b60d05" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.jetbrains.kotlin" name="kotlin-gradle-plugins-bom" version="2.4.0">
<artifact name="kotlin-gradle-plugins-bom-2.4.0.pom">
<sha256 value="8067da597f6e705c0edc50dc4f00293f326ba1b085d7b6a18871c569b1e8ec3e" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.jetbrains.kotlin" name="kotlin-klib-abi-reader" version="2.3.0">
<artifact name="kotlin-klib-abi-reader-2.3.0.jar">
<sha256 value="41e31422eb5eb224b9a475fe80eb8d06eb21ad34fb7d0a408d2c972a7abb8cbb" origin="Generated by Gradle"/>
Expand Down Expand Up @@ -20864,6 +20885,11 @@
<sha256 value="1446749f7236252d12ab350a19488aad1368fbf4f2d390386956c62ffbb76ddd" origin="Generated by Gradle" reason="Artifact is not signed"/>
</artifact>
</component>
<component group="org.jetbrains.kotlin.plugin.serialization" name="org.jetbrains.kotlin.plugin.serialization.gradle.plugin" version="2.4.0">
<artifact name="org.jetbrains.kotlin.plugin.serialization.gradle.plugin-2.4.0.pom">
<sha256 value="847f5a5c9691e67117fa8cd211e4da9ec088647f4c9b7ca2bb4b83362d63cbfb" origin="Generated by Gradle" reason="Artifact is not signed"/>
</artifact>
</component>
<component group="org.jetbrains.kotlinx" name="atomicfu" version="0.17.3">
<artifact name="atomicfu-0.17.3.module">
<sha256 value="854a75a9ebf30cb588e8ceda7da1b7089d4272a12324d3cffcaf5b62902738bd" origin="Generated by Gradle"/>
Expand Down
1 change: 1 addition & 0 deletions material-color-utilities/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

/*
* Nextcloud Android Common Library
*
Expand Down
1 change: 1 addition & 0 deletions sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ dependencies {
implementation 'androidx.constraintlayout:constraintlayout:2.2.1'
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.11.0'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.11.0'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.9.0'
implementation project(path: ':ui')
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.3.0'
Expand Down
1 change: 1 addition & 0 deletions sample/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:usesCleartextTraffic="true"
android:theme="@style/Theme.Androidcommon">
<activity
android:name=".MainActivity"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,17 @@ class MainActivity : AppCompatActivity() {
material.colorMaterialButtonPrimaryBorderless(negativeButton)
}

binding.testApiBtn.setOnClickListener {
val baseUrl = binding.baseUrl.text?.toString().orEmpty()
val username = binding.username.text?.toString().orEmpty()
val token = binding.token.text?.toString().orEmpty()
mainViewModel.testPredefinedStatuses(baseUrl, username, token)
}

mainViewModel.apiTestResult.observe(this) { result ->
Toast.makeText(this, result, Toast.LENGTH_LONG).show()
}

setSupportActionBar(binding.toolbar)
supportActionBar?.setDisplayHomeAsUpEnabled(true)
mainViewModel.color.observe(this) { applyTheme(it) }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,41 @@ package com.nextcloud.android.common.sample

import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import com.nextcloud.android.common.ui.network.auth.ServerCredentials
import com.nextcloud.android.common.ui.network.model.NetworkResult
import com.nextcloud.android.common.ui.network.http.NextcloudHttpClient
import com.nextcloud.android.common.ui.network.UserStatusRepository
import kotlinx.coroutines.launch

class MainViewModel : ViewModel() {
val color = MutableLiveData<Int>()
val apiTestResult = MutableLiveData<String>()

fun testPredefinedStatuses(
baseUrl: String,
username: String,
token: String
) {
viewModelScope.launch {
val credentials = ServerCredentials(baseUrl, username, token)
val client = NextcloudHttpClient.create(credentials)
val service = UserStatusRepository(client)

when (val result = service.fetchPredefinedStatuses()) {
is NetworkResult.Success ->
apiTestResult.value =
"✅ Success (${result.data.size} statuses):\n" +
result.data.joinToString("\n") { "${it.icon} ${it.message}" }

is NetworkResult.ServerError ->
apiTestResult.value =
"❌ Error ${result.response.ocs.meta.statusCode}: ${result.response.ocs.meta.message}"

is NetworkResult.NetworkException ->
apiTestResult.value =
"❌ Exception: ${result.throwable.message}"
}
}
}
}
61 changes: 61 additions & 0 deletions sample/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,67 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/circular_progress_bar" />

<com.google.android.material.textfield.TextInputLayout
android:id="@+id/baseUrlTil"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:hint="@string/hint_base_url"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/dialogBtn">

<com.google.android.material.textfield.TextInputEditText
android:id="@+id/baseUrl"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textUri"
android:text="https://cloud.example.com" />

</com.google.android.material.textfield.TextInputLayout>

<com.google.android.material.textfield.TextInputLayout
android:id="@+id/usernameTil"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:hint="@string/hint_username"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/baseUrlTil">

<com.google.android.material.textfield.TextInputEditText
android:id="@+id/username"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="text" />

</com.google.android.material.textfield.TextInputLayout>

<com.google.android.material.textfield.TextInputLayout
android:id="@+id/tokenTil"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:hint="@string/hint_token"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/usernameTil">

<com.google.android.material.textfield.TextInputEditText
android:id="@+id/token"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textPassword" />

</com.google.android.material.textfield.TextInputLayout>

<com.google.android.material.button.MaterialButton
android:id="@+id/testApiBtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="@string/test_user_status_api"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tokenTil" />

</androidx.constraintlayout.widget.ConstraintLayout>
</FrameLayout>

Expand Down
4 changes: 4 additions & 0 deletions sample/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@
<string name="suggestion_chip">Suggestion Chip</string>
<string name="filter_chip">Filter Chip</string>
<string name="hint_color">Color</string>
<string name="hint_base_url">Base URL</string>
<string name="hint_username">Username</string>
<string name="hint_token">App token</string>
<string name="test_user_status_api">Test User Status API</string>
<string name="headline_theming">Theming</string>
<string name="headline_ui_module">UI Module</string>
</resources>
21 changes: 20 additions & 1 deletion ui/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

plugins {
id 'org.jetbrains.kotlin.plugin.compose'
id 'org.jetbrains.kotlin.plugin.serialization' version "$kotlinVersion"
id 'com.android.library'
id 'com.android.built-in-kotlin'
id 'com.android.legacy-kapt'
Expand All @@ -15,14 +16,15 @@ plugins {

android {
defaultConfig {
minSdk = 21
minSdk = 26
compileSdk = 37

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

buildFeatures {
compose = true
buildConfig = true
}

compileOptions {
Expand All @@ -45,12 +47,21 @@ android {
}

dependencies {
// region Jetpack Compose
implementation 'androidx.compose.ui:ui-tooling-preview:1.11.4'
debugImplementation 'androidx.compose.ui:ui-tooling:1.11.4'
kapt "org.jetbrains.kotlin:kotlin-metadata-jvm:${kotlinVersion}"

implementation(platform("androidx.compose:compose-bom:2026.06.01"))
implementation("androidx.compose.ui:ui")
implementation("androidx.compose.ui:ui-graphics")
implementation("androidx.compose.material3:material3")
implementation("androidx.compose.material:material-icons-core")
// endregion

implementation("io.coil-kt.coil3:coil-compose:3.5.0")
implementation("io.coil-kt.coil3:coil-network-okhttp:3.5.0")
implementation("io.coil-kt.coil3:coil-svg:3.5.0")

implementation("com.vanniktech:ui:0.10.0")

Expand All @@ -60,6 +71,14 @@ dependencies {
androidTestImplementation 'androidx.test.ext:junit:1.3.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.7.0'

// region okhttp
implementation(platform("com.squareup.okhttp3:okhttp-bom:5.4.0"))
implementation("com.squareup.okhttp3:okhttp")
implementation("com.squareup.okhttp3:logging-interceptor")
// endregion

implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.11.0")

implementation project(':core')
api project(':material-color-utilities')

Expand Down
2 changes: 1 addition & 1 deletion ui/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
~ SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
~ SPDX-License-Identifier: MIT
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<manifest>

</manifest>
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
/*
* Nextcloud Android Common Library
*
* SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: MIT
*/

package com.nextcloud.android.common.ui.component

import androidx.compose.foundation.Image
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.dp

@Composable
fun ContentUnavailableView(title: String, description: String? = null, iconId: Int? = null) {
Column(
modifier = Modifier
.fillMaxSize()
.padding(16.dp),
verticalArrangement = Arrangement.Center,
horizontalAlignment = Alignment.CenterHorizontally
) {
iconId?.let {
Image(
painter = painterResource(iconId),
modifier = Modifier.size(48.dp),
contentDescription = "",
)
}

Spacer(modifier = Modifier.height(16.dp))

Text(
text = title,
style = MaterialTheme.typography.headlineMedium,
textAlign = TextAlign.Center
)

description?.let {
Spacer(modifier = Modifier.height(8.dp))

Text(
text = description,
style = MaterialTheme.typography.headlineSmall,
textAlign = TextAlign.Center
)
}

Spacer(modifier = Modifier.height(32.dp))
}
}
Loading
Loading