edittext

Android source code to show a popup dialog with a text field

I am working on a way to rapidly mock up Android applications using Android Studio, i.e., to rapidly prototype Android applications on the fly, and little snippets of code help to make this happen. For instance, this snippet of code shows how to show a popup dialog to prompt a user to enter information into a text field:

Android fragments - How to get an Activity widget

Android Fragments FAQ: How do I access an Activity widget from an Android Fragment?

All you have to do in your Fragment code is use the getActivity method to get a reference to your Activity, and then the usual findViewById method to get a reference to your widget: