草庐IT

share-button

全部标签

android - 如何在 android 中处理浏览器的 "share page" Intent ?

我在这里读到(http://androidlittle.blogspot.com/2009/08/intent-filter-for-share-link.html)需要什么Intent过滤器来处理android网络浏览器发送的“共享链接”Intent。我已将它放在我的AndroidManifest.xml中的一个block中,如下所示:不过,我这辈子都无法触发它。当我在android浏览器中共享链接时,模拟器日志显示它正在创建选择器Intent,但没有提供选择器正在执行的Intent的详细信息。不会弹出选择器窗口,并且Intent由SMS应用程序处理。我也尝试过手动启动Intent:

android - 使用共享用户 ID 时的 INSTALL_FAILED_SHARED_USER_INCOMPATIBLE

我正在开发将共享数据库的Android应用程序。为此,我在两个应用程序的list文件中都使用了android:sharedUserId。当我在添加该sharedUserId后尝试运行应用程序时,它会在控制台中显示以下错误。[2013-03-0419:37:32-MainActivity]Installationerror:INSTALL_FAILED_SHARED_USER_INCOMPATIBLE[2013-03-0419:37:32-MainActivity]Pleasechecklogcatoutputformoredetails.[2013-03-0419:37:32-Main

android - 将颜色过滤器添加到 Drawable 会更改使用相同 Drawable 的所有 Button

我有一个屏幕,其中多个按钮使用相同的背景Drawable。我在各种项目中使用了可重用的代码来添加一个OnTouch监听器,该监听器在触摸按钮时添加灰色滤光片。这通常可以正常工作,但在这种情况下,当按下任何按钮时,所有按钮都会着色。我在http://developer.android.com/guide/topics/graphics/2d-graphics.html中看到了解释:Note:Eachuniqueresourceinyourprojectcanmaintainonlyonestate,nomatterhowmanydifferentobjectsyoumayinstanti

安卓 6 : cannot share files anymore?

我正在分享一张图片,此代码适用于Android6之前的设备:IntentshareIntent=newIntent(Intent.ACTION_SEND);shareIntent.setType("image/*");Uriuri=Uri.fromFile(newFile(mFilename));shareIntent.putExtra(Intent.EXTRA_STREAM,uri);mContext.startActivity(Intent.createChooser(shareIntent,mChooserTitle));但是,当我尝试使用Android6共享时,我收到了toas

Android 创建一个 "flat button"

据说,在Material主题中,有两种按钮:凸起的和扁平的:当我创建,它看起来像“凸起”按钮。如何使用标记制作“平面按钮”。有什么风格或属性可以做到吗?我在主题编辑器中找到了这张图片。 最佳答案 您可以在Button上使用style="?android:attr/borderlessButtonStyle,如下所示:BorderlessButtonStyleStyleforbuttonswithoutanexplicitborder,oftenusedingroups.你也可以使用那些FlatButtons

android - 如何在 Android 中更改 Button 小部件的文本?

如何在代码而不是XML文件中更改AndroidButton小部件的文本? 最佳答案 您可以使用setText()方法。示例:importandroid.widget.Button;Buttonp1_button=(Button)findViewById(R.id.Player1);p1_button.setText("Sometext");另外,作为引用,Button扩展TextView,因此您可以像使用普通TextView一样使用setText()。 关于android-如何在Andr

android - 错误 libGL.so : cannot open shared object file using Android emulator

我试图在Ubuntu12.04(64位)中运行android模拟器。但是,我收到以下错误。StartingemulatorforAVD'emulatr'FailedtoloadlibGL.soerrorlibGL.so:cannotopensharedobjectfile:NosuchfileordirectoryFailedtoloadlibGL.soerrorlibGL.so:cannotopensharedobjectfile:Nosuchfileordirectoryemulator:emulatorwindowwasoutofviewandwasrecentered使用loc

android - 是否可以生成一个 'share on Facebook' 链接以在 Android/iOS/移动设备上打开 native Facebook 应用程序而不是网络共享对话框?

是否可以在在native应用程序中打开分享对话框的网站上拥有在Facebook上分享链接?当前行为:现在点击Facebook分享链接会打开基于网络的分享对话框,这很糟糕,因为大多数移动Facebook用户使用的是native应用程序,因此没有在他们的浏览器上登录。因此,网络共享对话框会提示他们输入他们的用户凭据-这可能会导致他们最终不共享。理想行为:单击Facebook上的分享链接会在本地Facebook应用程序中打开分享对话框,用户已在其中登录。提前感谢您的帮助! 最佳答案 截至目前,没有官方方法可以实现这一目标。不过,它可以由F

android - 为什么 Android API 级别 15 中的 "Buttons in button bars should be borderless"?

我正在为Android开发一个应用程序,我最近将API级别目标从8更改为15,现在当Buttons在LinearLayouts中时,Eclipse会警告我>或表格行.当Button在RelativeLayout中时不会发生同样的情况。警告说:Buttonsinbuttonbarsshouldbeborderless;usestyle="?android:attr/buttonBarButtonStyle"(and?android:attr/buttonBarStyleontheparent)我可以通过遵循建议甚至压制它来消除警告,但我现在很想知道为什么会这样?带边框的按钮有什么问题?

android - "Back button"使用 getSupportActionbar 和 appcompat v7 工具栏

我正在使用AppcompatV7库中的新工具栏,并且正在制作一个带有抽屉导航和fragment的应用程序。在某些fragment中,我不想显示汉堡包图标,而是显示箭头...很好,我是这样做的:mDrawerToggle.setDrawerIndicatorEnabled(false);mDrawerToggle.syncState();getSupportActionBar().setDisplayHomeAsUpEnabled(true);getSupportActionBar().setHomeButtonEnabled(true);getSupportActionBar().se