草庐IT

action_image_capture

全部标签

android - 删除由 MediaStore.Images.Media.insertImage 创建的图像和缩略图

我明白了MediaStore.Images.Media.insertImage(ContentResolvercr,Bitmapsource,Stringtitle,Stringdescription)将创建2个文件(图像和缩略图)如何删除两个已创建的图像? 最佳答案 使用此命令使用您要删除的图像的ID:mediaStoreIds.add(mediaStoreId);context.getContentResolver().delete(MediaStore.Images.Media.EXTERNAL_CONTENT_URI,Bas

android - 对于非默认语言,在 2.1 中使用 TextToSpeech.Engine.ACTION_CHECK_TTS_DATA 的正确方法是什么?

Intentintent=newIntent();intent.setAction(TextToSpeech.Engine.ACTION_CHECK_TTS_DATA);startActivityForResult(intent,0);@OverrideprotectedvoidonActivityResult(intrequestCode,intresultCode,Intentdata){if(requestCode==0){if(resultCode==TextToSpeech.Engine.CHECK_VOICE_DATA_PASS){Toast.makeText(getApp

android - Action 模式完成按钮

我有一个操作模式,当用户在ListView上选择项目时显示,现在当用户点击操作模式上的完成按钮时,我想做一个特定的操作,我做了这个和它工作完美,现在我想支持横向,所以我应该保持Action模式。我对中的选定项目执行操作的问题onDestroyActionMode所以当用户选择项目并旋转称为onDestroyActionMode的Action模式时我不想在旋转时使用它,如何自定义完成按钮事件处理以便我不依赖onDestroyActionMode 最佳答案 我建议你检查这些答案PreventtocancelActionModebypre

android - 如何使用来自 Google 的 OAuth 回调来避免 "Complete action with"弹出窗口?

我正在玩弄OpenIDConnect和OAuth,我想支持多个OpenID提供商(因此不仅仅是AccountManager已知的提供商)。但是,我遇到了这个问题。当作为已安装的应用程序针对Google进行身份验证时,您将(由Google)预定义的回调地址传递给http://localhost。因此,我通过像这样重定向到Google的端点来启动OAuth流程:Stringurl="https://accounts.google.com/o/oauth2/auth?scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email+

Android ListView onTouchEvent 并不总是给出 ACTION_DOWN

我的问题是,当我试图在我的ListView中拖动一个项目时,我并不总是得到ACTION_DOWN事件。我收到了很多ACTION_MOVE事件,只有一个ACTION_UP事件。情况并非总是如此。我得到ACTION_DOWN3次。这让我很困惑。我看过类似的问题,但它的答案似乎不适合我。谁能想到为什么会这样?谢谢//list_client--alistviewlist_client.setOnTouchListener(newView.OnTouchListener(){floatf1=-1,f2=-1;@OverridepublicbooleanonTouch(Viewv,MotionEv

android - 使用 ACTION_SEND 或 ACTION_SEND_MULTIPLE 发送图像和文本

-我们已尝试使用以下代码发布图片和文本:finalIntentshareIntent=newIntent(android.content.Intent.ACTION_SEND_MULTIPLE);shareIntent.setType("image/png");shareIntent.putExtra(android.content.Intent.EXTRA_STREAM,Uri.parse("file:///mnt/sdcard/UserImages/"+ParseUser.getCurrentUser().getObjectId()+".png"));shareIntent.put

android + 通用图像加载器 : show custom marker with image in google map

我正在开发一个包含谷歌地图的应用程序。map中的默认标记是可见的,但我要做的是从facebookurl获取图像,然后将其显示在谷歌地图上。我正在使用“universal-image-loader-sample-1.8.6.apk”来使用url加载图像。现在我正在加载图像。ImageLoaderimageLoader;imageLoader=ImageLoader.getInstance();ImageLoaderConfigurationilc=ImageLoaderConfiguration.createDefault(this);imageLoader.init(ilc);Imag

android - 找不到处理 Intent 的 Activity { act=android.intent.action.EDIT typ=vnd.android.cursor.item/event

我正在编写一段代码,其中我允许用户使用Intent将事件添加到日历中,但是每当我尝试将事件插入到较低版本中时,都会得到:不幸的是应用程序已停止和错误是:android.content.ActivityNotFoundException:NoActivityfoundtohandleIntent{act=android.intent.action.EDITtyp=vnd.android.cursor.item/event(hasextras)}AndroidManifest.xml:-Java代码:-finalButtonbutton=(Button)findViewById(R.id.

android - Intent.ACTION_GET_CONTENT 打开最近的文件,这给出了错误的 URI

我正在使用Intent.ACTION_GET_CONTENT打开最近的文件。从最近的文件中选择项目会给出错误的URI,但从文件管理器中选择相同的文件会给出可以由我的代码处理的正确URI。publicstaticStringgetRealPathFromURI(Contextcontext,Uriuri){Stringpath;if("content".equals(uri.getScheme())){Cursorcursor=context.getContentResolver().query(uri,null,null,null,null);cursor.moveToFirst();

android - ListView 隐藏在 ToolBar 后面,Floating action button 隐藏在 ListView 后面

我的FAB将显示在androidstudio的设计窗口中,但在我实际运行应用程序时不会显示。此外,我有一个ListView项目,我指定它应该位于工具栏下方,但当我运行该应用程序时,它部分隐藏在工具栏后面。howthelayoutappearsindesignmodehowappappearswhenrun做什么? 最佳答案 MyFABwillshowsupinthedesignwindowinandroidstudiobutdoesnotshowupwhenIactuallyruntheapp.尝试在代码中将FAB移动到ListVi