草庐IT

outside_scope

全部标签

android - Google People API 在 scopes.profile 中出现性别错误

首先,我实际上想从旧方法中获取性别,但它说已经弃用了,我在getGender()时出错;无法识别GoogleSignInAccountacct=result.getSignInAccount();IntentHome=newIntent(this,HomeActivity.class);Home.putExtra("name",acct.getDisplayName());Home.putExtra("email",acct.getEmail());Home.putExtra("URL",acct.getPhotoUrl());Home.putExtra("URL",acct.getG

android - 错误 : declaration conflicts with target of using declaration already in scope

我是android构建系统的新手,在MACOS中构建时出现以下错误。请帮助我成功构建。Infileincludedfromexternal/libcxx/src/any.cpp:10:Infileincludedfromexternal/libcxx/include/experimental/any:84:external/libcxx/include/cstdlib:167:44:error:declarationconflictswithtargetofusingdeclarationalreadyinscopeinline_LIBCPP_INLINE_VISIBILITYlong

安卓运行时异常 "Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag"

我在一个ListView中创建了多个布局,但是当我点击时我得到一个AndroidRuntimeException“从Activity上下文外部调用startActivity()需要FLAG_ACTIVITY_NEW_TASK标志。这真的是你想要的吗?”我正在添加Intent.FLAG_ACTIVITY_NEW_TASK我的Intent,但我得到了同样的信息!=(@OverridepublicViewgetView(intposition,ViewconvertView,ViewGroupparent){retval=LayoutInflater.from(getApplicationC

android - Dagger 2 : Scoping and handling release/cleanup of provided injection

是否可以限定此范围并在模块或其他地方提供释放方法以防止内存泄漏。前任。我需要在onDestroy()中关闭一个数据库连接,但如果这可以由模块本身处理就好了。考虑以下示例*代码。*阅读容易出错的代码,风险自负模块@dagger.Module@lombok.NoArgsConstructorpublicclassPersistenceModule{@Provides@SingletonDatabaseProviderprovidesDatabaseHelper(Contextcontext){returnnewDatabaseProvider(context);}}Activitypubl

android - Xamarin/安卓 : F# scoping - how do I see a namespace in a different file?

Xamarin/Android:F#作用域-如何在不同文件中查看命名空间?我知道这听起来很基础,但我似乎无法让它发挥作用。我将举例说明:我开始一个新的解决方案,我选择一个新的F#Android应用程序并将其命名为FSScopeTest1,给我MainActivity.fsnamespaceFSScopeTest1openSystemopenAndroid.ContentopenAndroid.OSopenAndroid.RuntimeopenAndroid.ViewsopenAdroid.Widget[]typeMainActivity()=inheritActivity()letmu

android - android中的圆形按钮..避免按下 "outside"按钮?

我已经创建/试图通过使用ImageButton“小部件”为android创建一个圆形按钮。但是由于这种类型的按钮被视为正方形,而我的png图像也被视为具有透明背景的正方形,那么我如何避免用户无法按下圆形按钮之外的按钮?..因为现在..他们可以按下按钮的“角落”,这仍然会触发点击事件..是否有任何特殊的映射层可以在photoshop中完成或以任何方式更改图像按钮的半径以使其适合我图像的“圆度”..或任何想法?提前致谢!..抱歉英语不好.. 最佳答案 试试勾股定理和onTouch,简单易行的方法。publicbooleaninCircl

flutter ,飞镖。我的 MainModel 类继承自 scoped_model 包的 Model 以及 4 个其他类。

起初可以工作,但在我进行了一些flutter升级后,它给出了一条错误消息。我当前的flutter版本,0.10.2classMainModelextendsModelwithConnectedProductsModel,UserModel,ProductsModel,UtilityModel{}错误消息:“类'UserModel'不能用作mixin,因为它扩展了Object以外的类。” 最佳答案 您需要更改代码中的某些内容。打开您的ConnectedProductsModel.dart文件并进行更改classConnectedPro

flutter ,飞镖。我的 MainModel 类继承自 scoped_model 包的 Model 以及 4 个其他类。

起初可以工作,但在我进行了一些flutter升级后,它给出了一条错误消息。我当前的flutter版本,0.10.2classMainModelextendsModelwithConnectedProductsModel,UserModel,ProductsModel,UtilityModel{}错误消息:“类'UserModel'不能用作mixin,因为它扩展了Object以外的类。” 最佳答案 您需要更改代码中的某些内容。打开您的ConnectedProductsModel.dart文件并进行更改classConnectedPro

android - Dagger 2 : Component cannot depend on multiple scoped components

是的,我知道之前有人问过这个问题,是的,我知道这是“设计使然”的。但我想做这样的事情:@Component(modules={RealmModule.class})publicinterfaceRealmComponent{Realmrealm();}@Component(modules={RepositoryModule.class})publicinterfaceRepositoryComponent{PersonRepositorypersonRepository();ScheduleRepositoryschedulesRepository();}@Component(depe

安卓运动事件 : find out if motion happened outside the view

我有一个按钮和附加到它的OnTouchListener。我怎样才能找到运动(当用户按下按钮时)发生在它的内部还是外部?event.getAction()和event.getActionMasked()都只返回0、1或2,分别是ActionDown、ActionUp、ActionMove。有一个常量MotionEvent.ACTION_OUTSIDE,它是4,但不知何故,即使我将触摸拖到按钮外,我也没有收到它-我仍然从这两种方法收到2。有什么问题?UPD:我找到了很好的解决方案-只需在ACTION_UP之后检查View的聚焦状态。如果它没有聚焦,则意味着移动发生在View之外。