skip to Main Content

Android Studio – How to get input from EditText in android java fragment

I am trying to get user input using EditText from fragment after pressing a button. For some reason the button is clickable but no data from EditText. <EditText android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/txtUserInput"/> <androidx.appcompat.widget.AppCompatButton android:id="@+id/btnTest" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_marginTop="24dp"/> public class MainActivity extends…

VIEW QUESTION

Android Studio – How can I change the fragment in current fragment?

I am developing a mobile application using with java in android studio.I am new to this environment.I have bottom navigation bar with 3 menu item (Home,Add article,Profile). <menu xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:android="http://schemas.android.com/apk/res/android"> <item android:id="@+id/home" android:icon="@drawable/ic_baseline_home_24" android:title="Home" /> <item android:id="@+id/article" android:icon="@drawable/ic_baseline_post_add_24" android:title="Article" />…

VIEW QUESTION
Back To Top
Search