List of usage examples for android.view ContextMenu setHeaderTitle
public ContextMenu setHeaderTitle(CharSequence title);
From source file:eu.trentorise.smartcampus.communicator.fragments.channels.ChannelListFragment.java
@Override public void onCreateContextMenu(ContextMenu menu, View view, ContextMenuInfo menuInfo) { menu.setHeaderTitle(isFeed() ? R.string.feed_options_header : R.string.channel_options_header); android.view.MenuInflater inflater = getSherlockActivity().getMenuInflater(); inflater.inflate(R.menu.channel_menu, menu); }
From source file:org.sigimera.app.android.CrisesListFragment.java
@Override public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) { menu.setHeaderTitle("Options"); menu.setHeaderIcon(R.drawable.sigimera_logo); MenuInflater inflater = new MenuInflater(getActivity()); inflater.inflate(R.menu.list_menu, menu); }
From source file:com.zoterodroid.activity.BrowseCitations.java
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.browse_bookmarks); mAccountManager = AccountManager.get(this); mAccount = mAccountManager.getAccountsByType(Constants.ACCOUNT_TYPE)[0]; mContext = this; Log.d("browse bookmarks", getIntent().getDataString()); Uri data = getIntent().getData();// w w w. j a v a2 s. c o m String scheme = data.getScheme(); String path = data.getPath(); Log.d("path", path); String username = data.getQueryParameter("username"); String tagname = data.getQueryParameter("tagname"); String recent = data.getQueryParameter("recent"); myself = mAccount.name.equals(username); ArrayList<Citation> citationList = new ArrayList<Citation>(); if (scheme.equals("content") && path.equals("/citations") && myself) { try { String[] projection = new String[] { Citation._ID, Citation.Title, Citation.Key, Citation.Creator_Summary, Citation.Item_Type }; String selection = null; String sortorder = null; selection = Citation.Account + " = '" + username + "'"; Uri citations = Citation.CONTENT_URI; Cursor c = managedQuery(citations, projection, selection, null, sortorder); if (c.moveToFirst()) { int idColumn = c.getColumnIndex(Citation._ID); int titleColumn = c.getColumnIndex(Citation.Title); int keyColumn = c.getColumnIndex(Citation.Key); int creatorSummaryColumn = c.getColumnIndex(Citation.Creator_Summary); int itemTypeColumn = c.getColumnIndex(Citation.Item_Type); do { Citation b = new Citation(c.getInt(idColumn), c.getString(titleColumn), c.getString(keyColumn), c.getString(creatorSummaryColumn), c.getString(itemTypeColumn)); citationList.add(b); } while (c.moveToNext()); } setListAdapter(new CitationListAdapter(this, R.layout.bookmark_view, citationList)); } catch (Exception e) { } } lv = getListView(); lv.setTextFilterEnabled(true); lv.setOnItemClickListener(new OnItemClickListener() { public void onItemClick(AdapterView<?> parent, View view, int position, long id) { } }); /* Add Context-Menu listener to the ListView. */ lv.setOnCreateContextMenuListener(new OnCreateContextMenuListener() { public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) { menu.setHeaderTitle("Actions"); if (myself) { menu.add(Menu.NONE, 0, Menu.NONE, "Delete"); } else { menu.add(Menu.NONE, 1, Menu.NONE, "Add"); } } }); }
From source file:pl.selvin.android.listsyncsample.ui.ListsListFragment.java
@Override public void onCreateContextMenu(ContextMenu menu, View v, ContextMenu.ContextMenuInfo menuInfo) { getActivity().getMenuInflater().inflate(R.menu.list_edit_delete, menu); menu.setHeaderTitle("List"); }
From source file:org.schabi.newpipe.about.LicenseFragment.java
@Override public void onCreateContextMenu(ContextMenu menu, View v, ContextMenu.ContextMenuInfo menuInfo) { MenuInflater inflater = getActivity().getMenuInflater(); SoftwareComponent component = (SoftwareComponent) v.getTag(); menu.setHeaderTitle(component.getName()); inflater.inflate(R.menu.software_component, menu); super.onCreateContextMenu(menu, v, menuInfo); mComponentForContextMenu = (SoftwareComponent) v.getTag(); }
From source file:net.ustyugov.jtalk.activity.muc.MucUsers.java
@Override public void onCreateContextMenu(ContextMenu menu, View v, ContextMenu.ContextMenuInfo info) { menu.setHeaderTitle(R.string.Actions); menu.add(Menu.NONE, CONTEXT_EDIT, Menu.NONE, R.string.Edit); menu.add(Menu.NONE, CONTEXT_REMOVE, Menu.NONE, R.string.Remove); super.onCreateContextMenu(menu, v, info); }
From source file:pl.zajecia.cw3.PhotosActivity.java
@Override public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) { super.onCreateContextMenu(menu, v, menuInfo); menu.setHeaderTitle(R.string.image_options); menu.add(Menu.NONE, 0, Menu.NONE, R.string.remove_image); }
From source file:pl.selvin.android.listsyncsample.ui.ListFragment.java
@Override public void onCreateContextMenu(ContextMenu menu, View v, ContextMenu.ContextMenuInfo menuInfo) { getActivity().getMenuInflater().inflate(R.menu.item_edit_delete, menu); menu.setHeaderTitle("Item"); }
From source file:de.hshannover.f4.trust.ironcontrol.view.list_activities.ListSavedPublishsActivity.java
@Override public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) { super.onCreateContextMenu(menu, v, menuInfo); menu.setHeaderTitle("Context Menu"); menu.add(0, UPDATE_ID, 0, R.string.publish_update); menu.add(0, NOTIFY_ID, 0, R.string.publish_notify); menu.add(0, DELETE_ID, 0, R.string.publish_delete); menu.add(0, EDIT_ID, 0, R.string.edit); menu.add(0, REMOVE_ID, 0, R.string.remove); }
From source file:org.lyricue.android.AvailableSongsFragment.java
@Override public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) { if (v.getId() == R.id.available_songlist) { menu.setHeaderTitle("Item Actions"); menu.add(2, 0, 0, "Add to playlist"); }/* w w w . ja v a 2 s . c o m*/ }