Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/226.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android LongClick上的选项列表_Android_Android Listview - Fatal编程技术网

Android LongClick上的选项列表

Android LongClick上的选项列表,android,android-listview,Android,Android Listview,我有一个可扩展的列表视图,其中包含用户选择的一系列成分 exp = (ExpandableListView) findViewById(R.id.expandableListView); ing_cat = DataProvider.getInfo(); ing_list = new ArrayList<String>(ing_cat.keySet()); indicator = (ImageView) findViewById(R

我有一个可扩展的列表视图,其中包含用户选择的一系列成分

  exp = (ExpandableListView) findViewById(R.id.expandableListView);
        ing_cat = DataProvider.getInfo();
        ing_list = new ArrayList<String>(ing_cat.keySet());
        indicator = (ImageView) findViewById(R.id.indicator);

        adpt = new MyIngAdapter(this, ing_cat, ing_list);
        exp.setAdapter(adpt);
        int noOfGroups = exp.getExpandableListAdapter().getGroupCount();
exp=(ExpandableListView)findViewById(R.id.ExpandableListView);
ing_cat=DataProvider.getInfo();
ing_list=new ArrayList(ing_cat.keySet());
指示器=(图像视图)findViewById(R.id.indicator);
adpt=新的MyIngAdapter(此,ing_目录,ing_列表);
exp.setAdapter(adpt);
int noOfGroups=exp.getExpandableListAdapter().getGroupCount();
现在,单击ListView的其中一个视图时,我希望有一个选项来请求删除,如下图所示(长按此打开):

我想要类似的东西,我可以把我自己的方法。谁能帮我一下吗

谢谢 Kalyan

你试过这个吗?你试过这个吗?