skip to Main Content

Android Studio – how to get text from a TextInputEditText?

I have this for the TextInputEditText: <com.google.android.material.textfield.TextInputEditText android:id="@+id/textInputEditText" android:layout_width="335dp" android:layout_height="255dp" android:background="@color/white" android:hint="@string/tells_us_your_behave" android:minWidth="4dp" android:minHeight="48dp" android:textColor="@color/black" android:textColorHint="#757575" android:visibility="visible" app:layout_constraintBottom_toTopOf="@+id/textView2" app:layout_constraintTop_toBottomOf="@+id/textView" tools:ignore="MissingConstraints" tools:layout_editor_absoluteX="37dp" tools:visibility="visible" /> This is for the "Submit" button: <Button android:id="@+id/button5" android:layout_width="321dp" android:layout_height="75dp" android:layout_marginTop="10dp" android:layout_marginBottom="32dp" android:text="@string/submit" android:textSize="20sp" android:onClick="text" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent"…

VIEW QUESTION

Android Studio – Defining a button in Kotlin

I'm a Kotlin newbie, I'm trying to call a button BTN_test but I can't MainActivity.kt package com.example.testapp import androidx.appcompat.app.AppCompatActivity import android.os.Bundle import android.view.Gravity import android.widget.Toast class MainActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) var btn =…

VIEW QUESTION

Android Studio – BottomNavigationView's menu not selected after navigating to other fragment, switching to other menu, and switching back to initial menu

I'm building an android application with 3 menus using bottom navigation. I created new project in Android Studio using Bottom Navigation Activity. I renamed the fragment to: InfoFragment.kt DetectFragment.kt AboutFragment.kt Renamed the layout in src/main/res/layout to: fragment_info.xml fragment_detect.xml fragment_about.xml Renamed…

VIEW QUESTION
Back To Top
Search