I am trying to make an image blurring app, but can t figure it out.

I tried to implement a seekbar, by following a tutorial from 2020 but it is not working

the code is down below, since 2020 they modified android studio, so it is not working

package com.example.blurringapp

import android.os.Bundle
import android.widget.SeekBar
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Surface
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.tooling.preview.Preview
import com.example.blurringapp.ui.theme.BLURRINGAPPTheme


class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
    super.onCreate(savedInstanceState)
    setContent {
        var seekBar: SeekBar

            BLURRINGAPPTheme {
            // A surface container using the 'background' color from the theme
            Surface(
                modifier = Modifier.fillMaxSize(),
                color = MaterialTheme.colorScheme.background

            ) {
                Greeting("Android")
            }
        }
    }
}
}

@Composable
fun Greeting(name: String, modifier: Modifier = Modifier) {
Text(
    text = "Hello $name!",
    modifier = modifier
)
}

@Preview(showBackground = true)
@Composable
fun GreetingPreview() {
BLURRINGAPPTheme {
    Greeting("Android")
}
}

Where and how can I implement a seekbar?

Also how shoul I implement the image blurring?

0

There are 0 answers