android Programming Glossary: contextmenuinfo
OnCreateContextMenu and ListView items http://stackoverflow.com/questions/12389184/oncreatecontextmenu-and-listview-items public void onCreateContextMenu ContextMenu menu View v ContextMenuInfo menuInfo menu.add 0 v.getId 0 Something menu.add 0 v.getId 0..
Add Context Menu Icon in android http://stackoverflow.com/questions/1245543/add-context-menu-icon-in-android public void onCreateContextMenu ContextMenu menu View v ContextMenuInfo menuInfo super.onCreateContextMenu menu v menuInfo menu.add..
Camera Force Closing issue in Samsung Galaxy S3 version 4.1.1 http://stackoverflow.com/questions/14495304/camera-force-closing-issue-in-samsung-galaxy-s3-version-4-1-1 android.view.ContextMenu import android.view.ContextMenu.ContextMenuInfo import android.view.MenuItem import android.view.View import.. public void onCreateContextMenu ContextMenu menu View v ContextMenuInfo menuInfo TODO Auto generated method stub Log.i TAG Inside onCreateContextMenu..
'Must Override a Superclass Method' Errors after importing a project into Eclipse http://stackoverflow.com/questions/1678122/must-override-a-superclass-method-errors-after-importing-a-project-into-eclips public void onCreateContextMenu ContextMenu menu View v ContextMenuInfo menuInfo will be initially populated like this list.setOnCreateContextMenuListener.. void onCreateContextMenu ContextMenu arg1 View arg2 ContextMenuInfo arg3 The odd thing is if I remove my code and have Eclipse..
Detecting which selected item (in a ListView) spawned the ContextMenu (Android) http://stackoverflow.com/questions/2321332/detecting-which-selected-item-in-a-listview-spawned-the-contextmenu-android void onCreateContextMenu ContextMenu menu final View v ContextMenuInfo menuInfo menu.add Make Toast .setOnMenuItemClickListener new.. my onCreateContextMenu ... method I cast the ContextMenu.ContextMenuInfo to AdapterView.AdapterContextMenuInfo. From there you can get.. cast the ContextMenu.ContextMenuInfo to AdapterView.AdapterContextMenuInfo. From there you can get the targetView which you cast again..
Show context menu when link is long pressed in TextView http://stackoverflow.com/questions/2662992/show-context-menu-when-link-is-long-pressed-in-textview public void onCreateContextMenu ContextMenu menu View v ContextMenuInfo menuInfo super.onCreateContextMenu menu v menuInfo Create your..
Copy text from TextView on Android http://stackoverflow.com/questions/2952914/copy-text-from-textview-on-android public void onCreateContextMenu ContextMenu menu View v ContextMenuInfo menuInfo user has long pressed your TextView menu.add 0 v.getId..
Android open ContextMenu on short click + pass item clicked details http://stackoverflow.com/questions/3722380/android-open-contextmenu-on-short-click-pass-item-clicked-details public void onCreateContextMenu ContextMenu menu View v ContextMenuInfo menuInfo super.onCreateContextMenu menu v menuInfo TextView..
How can I make a horizontal ListView in Android? [duplicate] http://stackoverflow.com/questions/3877040/how-can-i-make-a-horizontal-listview-in-android android.view.ViewGroup import android.view.ContextMenu.ContextMenuInfo import android.view.GestureDetector.SimpleOnGestureListener.. import android.widget.AdapterView.AdapterContextMenuInfo import android.widget.AdapterView.OnItemClickListener public.. public void onCreateContextMenu ContextMenu menu View v ContextMenuInfo menuInfo menu.add R.string.gallery_2_text @Override public boolean..
How do you implement context menu in a ListActivity on Android? http://stackoverflow.com/questions/433761/how-do-you-implement-context-menu-in-a-listactivity-on-android the menu on onCreateContextMenu ContextMenu menu View view ContextMenuInfo menuInfo . The menuInfo argument can provide information about.. which item was long clicked in this way AdapterView.AdapterContextMenuInfo info try info AdapterView.AdapterContextMenuInfo menuInfo catch.. info try info AdapterView.AdapterContextMenuInfo menuInfo catch ClassCastException e Log.e TAG bad menuInfo e..
android paste event http://stackoverflow.com/questions/5167381/android-paste-event public void onCreateContextMenu ContextMenu menu View v ContextMenuInfo menuInfo MenuInflater inflater getMenuInflater inflater.inflate.. getMenuInflater inflater.inflate R.menu.menu menu AdapterContextMenuInfo info AdapterContextMenuInfo menuInfo menu.setHeaderTitle title.. R.menu.menu menu AdapterContextMenuInfo info AdapterContextMenuInfo menuInfo menu.setHeaderTitle title Create method menu onClick..
How to handle onContextItemSelected in a multi fragment activity http://stackoverflow.com/questions/5297842/how-to-handle-oncontextitemselected-in-a-multi-fragment-activity public void onCreateContextMenu ContextMenu menu View v ContextMenuInfo menuInfo menu.add UNIQUE_FRAGMENT_GROUP_ID MENU_OPTION_1 0 R.string.src1..
get view id from oncontextitemselected http://stackoverflow.com/questions/6016569/get-view-id-from-oncontextitemselected MenuItem item TODO Auto generated method stub AdapterContextMenuInfo info AdapterContextMenuInfo item.getMenuInfo switch item.getItemId.. generated method stub AdapterContextMenuInfo info AdapterContextMenuInfo item.getMenuInfo switch item.getItemId case SEND_AS_TEXT do.. public void onCreateContextMenu ContextMenu menu View v ContextMenuInfo menuInfo TODO Auto generated method stub super.onCreateContextMenu..
ExpandableListFragment with LoaderManager for Compatibility Package http://stackoverflow.com/questions/6051050/expandablelistfragment-with-loadermanager-for-compatibility-package android.view.ContextMenu import android.view.ContextMenu.ContextMenuInfo import android.view.Gravity import android.view.LayoutInflater.. public void onCreateContextMenu ContextMenu menu View v ContextMenuInfo menuInfo public void onContentChanged View emptyView getView..
Android - EditTexts in Gallery show strange behaviour when being (long)-clicked http://stackoverflow.com/questions/7051034/android-edittexts-in-gallery-show-strange-behaviour-when-being-long-clicked to this activity so onCreateContextMenu ContextMenu View ContextMenuInfo will be called when it is time to show the context menu. As..
How to change background color of each row in list view? http://stackoverflow.com/questions/7683621/how-to-change-background-color-of-each-row-in-list-view public void onCreateContextMenu ContextMenu menu View v ContextMenuInfo menuInfo super.onCreateContextMenu menu v menuInfo menu.add.. item switch item.getItemId case PROCESSED_ID AdapterContextMenuInfo info AdapterContextMenuInfo item .getMenuInfo change_color.. case PROCESSED_ID AdapterContextMenuInfo info AdapterContextMenuInfo item .getMenuInfo change_color return true return super.onContextItemSelected..
OnCreateContextMenu and ListView items http://stackoverflow.com/questions/12389184/oncreatecontextmenu-and-listview-items ArrayList as with the onItemClickListener Here's what I've got public void onCreateContextMenu ContextMenu menu View v ContextMenuInfo menuInfo menu.add 0 v.getId 0 Something menu.add 0 v.getId 0 Something else Since OnCreateConextMenu takes different parameters..
Add Context Menu Icon in android http://stackoverflow.com/questions/1245543/add-context-menu-icon-in-android but when I setIcon for ContextMenu look like it doesn't work public void onCreateContextMenu ContextMenu menu View v ContextMenuInfo menuInfo super.onCreateContextMenu menu v menuInfo menu.add 0 DELETE_ID 0 R.string.context_menu_favorite .setIcon android.R.drawable.btn_star..
Camera Force Closing issue in Samsung Galaxy S3 version 4.1.1 http://stackoverflow.com/questions/14495304/camera-force-closing-issue-in-samsung-galaxy-s3-version-4-1-1 android.provider.MediaStore import android.util.Log import android.view.ContextMenu import android.view.ContextMenu.ContextMenuInfo import android.view.MenuItem import android.view.View import android.view.View.OnClickListener import android.widget.Button.. openContextMenu btn_upload_picture @Override public void onCreateContextMenu ContextMenu menu View v ContextMenuInfo menuInfo TODO Auto generated method stub Log.i TAG Inside onCreateContextMenu super.onCreateContextMenu menu v menuInfo..
'Must Override a Superclass Method' Errors after importing a project into Eclipse http://stackoverflow.com/questions/1678122/must-override-a-superclass-method-errors-after-importing-a-project-into-eclips These arguments have their correct names public void onCreateContextMenu ContextMenu menu View v ContextMenuInfo menuInfo will be initially populated like this list.setOnCreateContextMenuListener new OnCreateContextMenuListener This.. This methods arguments were not automatically provided public void onCreateContextMenu ContextMenu arg1 View arg2 ContextMenuInfo arg3 The odd thing is if I remove my code and have Eclipse automatically recreate the method it uses the same argument..
Detecting which selected item (in a ListView) spawned the ContextMenu (Android) http://stackoverflow.com/questions/2321332/detecting-which-selected-item-in-a-listview-spawned-the-contextmenu-android new OnCreateContextMenuListener @Override public void onCreateContextMenu ContextMenu menu final View v ContextMenuInfo menuInfo menu.add Make Toast .setOnMenuItemClickListener new OnMenuItemClickListener @Override public boolean onMenuItemClick.. share improve this question I do exactly this. In my onCreateContextMenu ... method I cast the ContextMenu.ContextMenuInfo to AdapterView.AdapterContextMenuInfo. From there you can get the targetView which you cast again to the widget. The complete.. I do exactly this. In my onCreateContextMenu ... method I cast the ContextMenu.ContextMenuInfo to AdapterView.AdapterContextMenuInfo. From there you can get the targetView which you cast again to the widget. The complete code is available in HomeActivity.java..
Show context menu when link is long pressed in TextView http://stackoverflow.com/questions/2662992/show-context-menu-when-link-is-long-pressed-in-textview override the onCreateContextMenu to create a menu @Override public void onCreateContextMenu ContextMenu menu View v ContextMenuInfo menuInfo super.onCreateContextMenu menu v menuInfo Create your context menu here menu.setHeaderTitle Context Menu menu.add..
Copy text from TextView on Android http://stackoverflow.com/questions/2952914/copy-text-from-textview-on-android Then override onCreateContextMenu in your Activity @Override public void onCreateContextMenu ContextMenu menu View v ContextMenuInfo menuInfo user has long pressed your TextView menu.add 0 v.getId 0 text that you want to show in the context menu I use simply..
Android open ContextMenu on short click + pass item clicked details http://stackoverflow.com/questions/3722380/android-open-contextmenu-on-short-click-pass-item-clicked-details registerForContextMenu text view.showContextMenu @Override public void onCreateContextMenu ContextMenu menu View v ContextMenuInfo menuInfo super.onCreateContextMenu menu v menuInfo TextView text TextView v.findViewById R.id.btitle CharSequence itemTitle..
How can I make a horizontal ListView in Android? [duplicate] http://stackoverflow.com/questions/3877040/how-can-i-make-a-horizontal-listview-in-android import android.view.MotionEvent import android.view.View import android.view.ViewGroup import android.view.ContextMenu.ContextMenuInfo import android.view.GestureDetector.SimpleOnGestureListener import android.view.View.OnTouchListener import android.widget.AdapterView.. import android.widget.ImageView import android.widget.Toast import android.widget.AdapterView.AdapterContextMenuInfo import android.widget.AdapterView.OnItemClickListener public class Gallery1 extends Activity @Override public void onCreate.. items in the gallery registerForContextMenu g @Override public void onCreateContextMenu ContextMenu menu View v ContextMenuInfo menuInfo menu.add R.string.gallery_2_text @Override public boolean onContextItemSelected MenuItem item AdapterContextMenuInfo..
How do you implement context menu in a ListActivity on Android? http://stackoverflow.com/questions/433761/how-do-you-implement-context-menu-in-a-listactivity-on-android this registerForContextMenu getListView and then populate the menu on onCreateContextMenu ContextMenu menu View view ContextMenuInfo menuInfo . The menuInfo argument can provide information about which item was long clicked in this way AdapterView.AdapterContextMenuInfo.. . The menuInfo argument can provide information about which item was long clicked in this way AdapterView.AdapterContextMenuInfo info try info AdapterView.AdapterContextMenuInfo menuInfo catch ClassCastException e Log.e TAG bad menuInfo e return long.. about which item was long clicked in this way AdapterView.AdapterContextMenuInfo info try info AdapterView.AdapterContextMenuInfo menuInfo catch ClassCastException e Log.e TAG bad menuInfo e return long id getListAdapter .getItemId info.position and..
android paste event http://stackoverflow.com/questions/5167381/android-paste-event R.id.et registerForContextMenu et Create contextMenu @Override public void onCreateContextMenu ContextMenu menu View v ContextMenuInfo menuInfo MenuInflater inflater getMenuInflater inflater.inflate R.menu.menu menu AdapterContextMenuInfo info AdapterContextMenuInfo.. menu View v ContextMenuInfo menuInfo MenuInflater inflater getMenuInflater inflater.inflate R.menu.menu menu AdapterContextMenuInfo info AdapterContextMenuInfo menuInfo menu.setHeaderTitle title Create method menu onClick @Override public boolean onContextItemSelected.. menuInfo MenuInflater inflater getMenuInflater inflater.inflate R.menu.menu menu AdapterContextMenuInfo info AdapterContextMenuInfo menuInfo menu.setHeaderTitle title Create method menu onClick @Override public boolean onContextItemSelected MenuItem item..
How to handle onContextItemSelected in a multi fragment activity http://stackoverflow.com/questions/5297842/how-to-handle-oncontextitemselected-in-a-multi-fragment-activity test for the groupId in 'onContextItemSelected.' For Example public void onCreateContextMenu ContextMenu menu View v ContextMenuInfo menuInfo menu.add UNIQUE_FRAGMENT_GROUP_ID MENU_OPTION_1 0 R.string.src1 menu.add UNIQUE_FRAGMENT_GROUP_ID MENU_OPTION_2..
get view id from oncontextitemselected http://stackoverflow.com/questions/6016569/get-view-id-from-oncontextitemselected openContextMenu v @Override public boolean onContextItemSelected MenuItem item TODO Auto generated method stub AdapterContextMenuInfo info AdapterContextMenuInfo item.getMenuInfo switch item.getItemId case SEND_AS_TEXT do sth related to the button clicked.. public boolean onContextItemSelected MenuItem item TODO Auto generated method stub AdapterContextMenuInfo info AdapterContextMenuInfo item.getMenuInfo switch item.getItemId case SEND_AS_TEXT do sth related to the button clicked break return super.onContextItemSelected.. break return super.onContextItemSelected item @Override public void onCreateContextMenu ContextMenu menu View v ContextMenuInfo menuInfo TODO Auto generated method stub super.onCreateContextMenu menu v menuInfo menu.add Menu.NONE SEND_AS_TEXT SEND_AS_TEXT..
ExpandableListFragment with LoaderManager for Compatibility Package http://stackoverflow.com/questions/6051050/expandablelistfragment-with-loadermanager-for-compatibility-package import android.os.Bundle import android.os.Handler import android.view.ContextMenu import android.view.ContextMenu.ContextMenuInfo import android.view.Gravity import android.view.LayoutInflater import android.view.View import android.view.View.OnCreateContextMenuListener.. arg4 TODO Auto generated method stub return false @Override public void onCreateContextMenu ContextMenu menu View v ContextMenuInfo menuInfo public void onContentChanged View emptyView getView .findViewById android.R.id.empty mList ExpandableListView getView..
Android - EditTexts in Gallery show strange behaviour when being (long)-clicked http://stackoverflow.com/questions/7051034/android-edittexts-in-gallery-show-strange-behaviour-when-being-long-clicked will set the View.OnCreateContextMenuListener on the view to this activity so onCreateContextMenu ContextMenu View ContextMenuInfo will be called when it is time to show the context menu. As you can see from the documentation onCreateContextMenu will..
How to change background color of each row in list view? http://stackoverflow.com/questions/7683621/how-to-change-background-color-of-each-row-in-list-view in change_color function so that i can change row bg color. public void onCreateContextMenu ContextMenu menu View v ContextMenuInfo menuInfo super.onCreateContextMenu menu v menuInfo menu.add 0 PROCESSED_ID 0 R.string.menu_processed public boolean onContextItemSelected.. public boolean onContextItemSelected MenuItem item switch item.getItemId case PROCESSED_ID AdapterContextMenuInfo info AdapterContextMenuInfo item .getMenuInfo change_color return true return super.onContextItemSelected item android.. boolean onContextItemSelected MenuItem item switch item.getItemId case PROCESSED_ID AdapterContextMenuInfo info AdapterContextMenuInfo item .getMenuInfo change_color return true return super.onContextItemSelected item android android listview share..
|