0
public void getData(String empid)
{
Cursor cursor = assignment.getAcceptedTasks(empid);
startManagingCursor(cursor);
list = (ListView) findViewById(R.id.list);
list.setOnItemClickListener(new OnItemClickListener() {
public void onItemClick(AdapterView<?> adapterView, View v, int arg2,
long arg3) {
startActivity(new Intent(v.getContext(), TaskDetails.class));
}
});
SimpleCursorAdapter adapter = new SimpleCursorAdapter (this, R.layout.mytaskslayout, cursor, new String[] {"Aircraft","Discrepancy"}, new int[] {R.id.ac, R.id.discrepancy});
list.setAdapter(adapter);
registerForContextMenu(list);
}
}
}
//@Override
public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) {
if (v.getId()==R.id.list) {
AdapterView.AdapterContextMenuInfo info = (AdapterView.AdapterContextMenuInfo)menuInfo;
menu.setHeaderTitle("");
menu.add(0, v.getId(), 0, "View Details");
menu.add(0, v.getId(), 0, "Close - Accomplished");
menu.add(0, v.getId(), 0, "Close - No Action Required");
}
}
"不一致"をコンテキストメニューのヘッダータイトルとして設定したいとします。どのように私はそれを行うのですか...ContextMenu setHeaderTitle