I want to make a dialogue with EditText and a button, when I click a button, I can take text from et, like this

snapshot

I tried using AlertDialog, I did not find how to insert EditText. How can this be realized?

    2 answers 2

    Well, that Dialog does not fit? Attribute your Dialout to Dialog :

     <TableLayout android:layout_height="fill_parent" android:layout_width="fill_parent" android:stretchColumns="*" > <TableRow> <EditText android:id="@+id/editText" android:minWidth="100dp" android:scrollHorizontally="true"/> </TableRow> <TableRow android:gravity="center_horizontal"> <Button android:id="@+id/search" android:text="Искать" android:layout_width="0dp"/> </TableRow> </TableLayout> 

    and go!

      Maybe late, but someone may come in handy))

      http://androprog.blogspot.ru/2013/03/android_10.html