Skip to content

Commit e6accfe

Browse files
committed
fix empty screen
Signed-off-by: alperozturk <[email protected]>
1 parent a359de1 commit e6accfe

File tree

1 file changed

+17
-10
lines changed

1 file changed

+17
-10
lines changed

app/src/main/java/com/nextcloud/ui/ClientIntegrationScreen.kt

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,17 @@ package com.nextcloud.ui
99

1010
import android.app.Activity
1111
import androidx.compose.foundation.layout.Arrangement
12-
import androidx.compose.foundation.layout.Column
1312
import androidx.compose.foundation.layout.Row
13+
import androidx.compose.foundation.layout.fillMaxSize
1414
import androidx.compose.foundation.layout.fillMaxWidth
1515
import androidx.compose.foundation.lazy.LazyColumn
1616
import androidx.compose.foundation.lazy.LazyRow
1717
import androidx.compose.foundation.lazy.items
18-
import androidx.compose.material3.Button
18+
import androidx.compose.material.icons.Icons
19+
import androidx.compose.material.icons.filled.Close
20+
import androidx.compose.material3.Icon
21+
import androidx.compose.material3.IconButton
22+
import androidx.compose.material3.Scaffold
1923
import androidx.compose.material3.TextButton
2024
import androidx.compose.runtime.Composable
2125
import androidx.compose.ui.Modifier
@@ -36,13 +40,16 @@ import com.owncloud.android.utils.DisplayUtils
3640
fun ClientIntegrationScreen(clientIntegrationUI: ClientIntegrationUI, baseUrl: String) {
3741
val activity = LocalContext.current.getActivity()
3842

39-
Column {
43+
Scaffold(topBar = {
4044
Row(Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.End) {
41-
TextButton(onClick = { activity?.finish() }) {
42-
Text("X")
45+
IconButton(onClick = { activity?.finish() }) {
46+
Icon(
47+
imageVector = Icons.Filled.Close,
48+
contentDescription = "Close"
49+
)
4350
}
4451
}
45-
52+
}, modifier = Modifier.fillMaxSize()) {
4653
when (clientIntegrationUI.root.orientation) {
4754
Orientation.VERTICAL -> {
4855
LazyColumn {
@@ -73,15 +80,15 @@ fun ClientIntegrationScreen(clientIntegrationUI: ClientIntegrationUI, baseUrl: S
7380
@Composable
7481
private fun DisplayElement(element: Element, baseUrl: String, activity: Activity?) {
7582
when (element) {
76-
is Button -> Button(onClick = { }) {
77-
Text(element.label)
83+
is Button -> androidx.compose.material3.Button(onClick = { }) {
84+
androidx.compose.material3.Text(element.label)
7885
}
7986

8087
is URL -> TextButton({
8188
openLink(activity, baseUrl, element.url)
82-
}) { Text(element.text) }
89+
}) { androidx.compose.material3.Text(element.text) }
8390

84-
is Text -> Text(element.text)
91+
is Text -> androidx.compose.material3.Text(element.text)
8592
}
8693
}
8794

0 commit comments

Comments
 (0)