Konvertieren Sie den Java -Code in Kotlin Online Converter
Select the src/main/java folder in the project and choose
Code->"Convert Java File to Kotlin File”
VasteMonde
Select the src/main/java folder in the project and choose
Code->"Convert Java File to Kotlin File”
private fun openImagePicker() {
ImagePickerView.Builder()
.setup {
name { RESULT_NAME }
max { 5 }
title { "Image Picker" }
single { false }
}
.start(this)
}
private fun setupSmoothBottomMenu() {
val popupMenu = PopupMenu(this, null)
popupMenu.inflate(R.menu.menu_bottom)
val menu = popupMenu.menu
binding.bottomBar.setupWithNavController(menu, navController)
}
import android.os.Parcelable
import kotlinx.android.parcel.Parcelize
@Parcelize
data class Product (
var id : Int? = null,
var name : String? = null,
var price : Int? = null,
var image : String? = null,
var selectedQuantity : Int? = null
) : Parcelable
import ch.qos.logback.access.tomcat.LogbackValve
import org.springframework.boot.web.embedded.tomcat.TomcatContextCustomizer
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
import java.nio.file.Files
@Configuration
open class AccessLogConfiguration {
@Bean
fun addLogbackAccessValve() = TomcatContextCustomizer { context ->
javaClass.getResourceAsStream("/logback-access.xml").use {
Files.createDirectories((context.catalinaBase.toPath()
.resolve(LogbackValve.DEFAULT_CONFIG_FILE)).parent)
Files.copy(it, context.catalinaBase.toPath()
.resolve(LogbackValve.DEFAULT_CONFIG_FILE))
}
LogbackValve().let {
it.isQuiet = true
context.pipeline.addValve(it)
}
}
}
Tools -> Kotlin -> Show Kotlin Bytecode