Yes, you can add something to the list of items in LongClick of EditText.
To put you in the right direction, I post code snippets.
In main.xml do something like
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" > <EditText android:id="@+id/textt" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/hello" /> </LinearLayout>
After that, do something like
public class edit extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); EditText text = (EditText)this.findViewById(R.id.textt); text.setOnLongClickListener(new OnLongClickListener() { @Override public boolean onLongClick(View v) {
Hope this helps
Shahab hameed
source share