how to create edit text in oncontextitemselected option like pop up

public boolean onContextItemSelected(MenuItem item) {
               //     ArrayList<String> names = s;


                    switch(item.getItemId()) {

                    case R.id.renameplaylist:

                        //here i click my player option rename playlist contextmenu means i want open one edittext after i edit and save it.

Answers


You can create a customDialog with an EditText with two buttons, if ok is clicked save the editText info on your player list.

You can follow the API for CustomDialogs

Or you can make a new activity for that purpose and set it as a dialog style...

<activity android:theme="@android:style/Theme.Dialog">

Or with a normal activity and startActivityForResult...


You have to create Custom Dialog for that. Good luck!


Need Your Help

Can not figure out how to print second dimension in three dimension List

c# list for-loop dimensions

I am making lists in three dimensions. If I run my code it shows the following strings: list5 + list3 + list1. Now this is in three dimensions, so each dimension adds a word. If you look to the code

Why does Jetty server hang when trying to debug Java Spring project in IDEA 12.1?

java spring intellij-idea jetty

I use IntelliJ IDEA 12.1, Jetty 9.0 server, Spring, Apache CXF in order to create and debug REST service.