07 2011 档案
在右上角添加menu
摘要:@Override public boolean onCreateOptionsMenu(Menu menu) { // TODO Auto-generated method stub MenuInflater inflater = getMenuInflater(); inflater.inflate(R.menu.result_menu, menu); return true; } @Override public boolean onOptionsItemSelected(MenuItem item) { // TODO Auto-generated method stub switc.
阅读全文
调用系统Gallery并返回选择的图片Url
摘要:private final static int LAUNCH_GALLERY = 3; //数字自定义 此处用来返回requestCode;在需要调用系统gallery的地方调用如下代码:Intent intent = new Intent(); intent.setType("image/*"); intent.setAction(Intent.ACTION_GET_CONTENT); startActivityForResult(Intent.createChooser(intent, "Select Picture"),LAUNCH_GALLER
阅读全文