긴 목록을 클릭하면이 목록보기에서 애플리케이션 디스플레이를 제거하는 동안 내 목록보기에 오류가 발생합니다. 코드는 다음과 같습니다긴 클릭으로 애플리케이션을 제거 할 수 없음
protected boolean setOnItemLongClickListener(ListView l, View v, int position, long id) {
super.onItemLongClick(l, v, position, id);// Error
ApplicationInfo app = applist.get(position);
Uri packageUri = Uri.parse("package:"+app.packageName);
Intent uninstallIntent =
new Intent(Intent.ACTION_DELETE, packageUri);
startActivity(uninstallIntent);
return true;
}
오류는 다음과 같습니다 The method onItemLongClick(ListView, View, int, long) is undefined for the type ListActivity
어떻게 해결할 수 있습니까? 이미 OnLongClickListener
을 구현했습니다. 감사합니다
해결되었습니다. –