Split support for Android API 21 and 23
This commit is contained in:
@@ -5,7 +5,6 @@ import androidx.compose.animation.core.animateDpAsState
|
||||
import androidx.compose.animation.core.spring
|
||||
import androidx.compose.animation.core.tween
|
||||
import androidx.compose.foundation.BorderStroke
|
||||
import androidx.compose.foundation.ExperimentalFoundationApi
|
||||
import androidx.compose.foundation.gestures.Orientation
|
||||
import androidx.compose.foundation.gestures.draggable
|
||||
import androidx.compose.foundation.gestures.rememberDraggableState
|
||||
@@ -28,6 +27,7 @@ import androidx.compose.foundation.shape.RoundedCornerShape
|
||||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.filled.DragHandle
|
||||
import androidx.compose.material.icons.filled.RestartAlt
|
||||
import io.nekohasekai.sfa.compat.animateItemCompat
|
||||
import androidx.compose.material.icons.outlined.BugReport
|
||||
import androidx.compose.material.icons.outlined.Cable
|
||||
import androidx.compose.material.icons.outlined.Download
|
||||
@@ -67,7 +67,7 @@ import androidx.compose.ui.zIndex
|
||||
import io.nekohasekai.sfa.BuildConfig
|
||||
import io.nekohasekai.sfa.R
|
||||
|
||||
@OptIn(ExperimentalMaterial3Api::class, ExperimentalFoundationApi::class)
|
||||
@OptIn(ExperimentalMaterial3Api::class)
|
||||
@Composable
|
||||
fun DashboardSettingsBottomSheet(
|
||||
sheetState: SheetState,
|
||||
@@ -282,8 +282,8 @@ fun DashboardSettingsBottomSheet(
|
||||
dragOffset = 0f
|
||||
},
|
||||
modifier =
|
||||
Modifier.animateItemPlacement(
|
||||
animationSpec =
|
||||
animateItemCompat(
|
||||
placementSpec =
|
||||
spring(
|
||||
dampingRatio = Spring.DampingRatioMediumBouncy,
|
||||
stiffness = Spring.StiffnessLow,
|
||||
|
||||
@@ -6,7 +6,7 @@ import android.graphics.Bitmap
|
||||
import android.graphics.Color
|
||||
import androidx.core.content.FileProvider
|
||||
import androidx.fragment.app.FragmentActivity
|
||||
import com.google.android.material.R
|
||||
import androidx.appcompat.R as AppCompatR
|
||||
import com.google.zxing.BarcodeFormat
|
||||
import com.google.zxing.qrcode.QRCodeWriter
|
||||
import io.nekohasekai.libbox.Libbox
|
||||
@@ -46,7 +46,7 @@ suspend fun Context.shareProfile(profile: Profile) {
|
||||
Intent(Intent.ACTION_SEND).setType("application/octet-stream")
|
||||
.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)
|
||||
.putExtra(Intent.EXTRA_STREAM, uri),
|
||||
getString(R.string.abc_shareactionprovider_share_with),
|
||||
getString(AppCompatR.string.abc_shareactionprovider_share_with),
|
||||
),
|
||||
)
|
||||
}
|
||||
@@ -59,7 +59,7 @@ fun FragmentActivity.shareProfileURL(profile: Profile) {
|
||||
profile.typed.remoteURL,
|
||||
)
|
||||
val imageSize = dp2px(256)
|
||||
val color = getAttrColor(com.google.android.material.R.attr.colorPrimary)
|
||||
val color = getAttrColor(androidx.appcompat.R.attr.colorPrimary)
|
||||
val image = QRCodeWriter().encode(link, BarcodeFormat.QR_CODE, imageSize, imageSize, null)
|
||||
val imageWidth = image.width
|
||||
val imageHeight = image.height
|
||||
|
||||
Reference in New Issue
Block a user