skip to Main Content

Android Studio – Can't change editText input from string to float

package com.example.tipcalculator import androidx.appcompat.app.AppCompatActivity import android.os.Bundle import android.widget.Button import android.widget.EditText import android.widget.TextView import kotlin.text.toFloat as kotlinTextToFloat class MainActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) supportActionBar?.hide() val tenPerTip: Button = findViewById(R.id.tenPerTipButton) val fifteenPerTip: Button = findViewById(R.id.fifteenPerTipButton) val…

VIEW QUESTION

Using bottom navigation – Android Studio

I was following this tutorial. Which was about using the bottom navigation bar. This below part is the code from the MainActivity file: import androidx.appcompat.app.AppCompatActivity import android.os.Bundle import androidx.fragment.app.Fragment import kotlinx.android.synthetic.main.activity_main.* class MainActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?)…

VIEW QUESTION
Back To Top
Search