Warning, /network/kdeconnect-android/src/org/kde/kdeconnect/UserInterface/compose/TopAppBars.kt is written in an unsupported language. File is not indexed.
0001 /* 0002 * SPDX-FileCopyrightText: 2023 Dmitry Yudin <dgyudin@gmail.com> 0003 * 0004 * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 0005 */ 0006 0007 package org.kde.kdeconnect.UserInterface.compose 0008 0009 import androidx.compose.foundation.layout.RowScope 0010 import androidx.compose.material.icons.Icons 0011 import androidx.compose.material.icons.filled.ArrowBack 0012 import androidx.compose.material3.* 0013 import androidx.compose.runtime.Composable 0014 import androidx.compose.ui.graphics.vector.ImageVector 0015 import androidx.compose.ui.res.stringResource 0016 import org.kde.kdeconnect_tp.R 0017 0018 @OptIn(ExperimentalMaterial3Api::class) 0019 @Composable 0020 fun KdeTopAppBar( 0021 title: String = stringResource(R.string.kde_connect), 0022 navIcon: ImageVector = Icons.Default.ArrowBack, 0023 navIconOnClick: () -> Unit, // = { onBackPressedDispatcher.onBackPressed() } 0024 actions: @Composable (RowScope.() -> Unit) = {}, 0025 ) { 0026 TopAppBar( 0027 navigationIcon = { 0028 IconButton(onClick = navIconOnClick, content = { Icon(navIcon, null) }) 0029 }, 0030 title = { Text(title) }, 0031 actions = actions 0032 ) 0033 }