I have below codes:
public class MainActivity extends ListActivity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceSt
yes it is possible and quite easy to achieve, simply you have to make the instance of the listview like
ListView lv = (ListView)findViewById(R.id.listview);
lv.setOnLongClickListener(new View.OnLongClickListener() {
@Override
public boolean onLongClick(View
// your code here
return true;
}
});)
in your case instead of extending ListActivity you can make a list view in xml and find the view in MainActivity and follow the above step.