我刚刚发现了Realm,并且想要更详细地探索它,所以我决定创建示例应用程序并搞乱它.到现在为止还挺好.
但是,我还没有解决的一件事是如何在Realm Browser中查看我的数据库.如何才能做到这一点?
我正在开发一个实现apigee的应用程序,但是,我在尝试更新实体时遇到了一个问题.以下是我目前正在使用的方法.
Map<String, Object> updatedEntity = new HashMap<String, Object>();
ArrayList<Map<String,Object>> subPropertyArray = new ArrayList<Map<String,Object>>();
Map<String, Object> subProperty = new HashMap<String, Object>();
subProperty.put("age", "");
subProperty.put("auto_checkin_times", auto_checkin_times);
subProperty.put("auto_checkins_enabled", "on");
subProperty.put("bio", "");
subProperty.put("max_age", "999");
subProperty.put("min_age","18");
subProperty.put("dob", mDob);
subProperty.put("locale","");
subProperty.put("sex", mGender);
subProperty.put("sexual_preference", mSexualPreference);
subProperty.put("utc_offset","");
subPropertyArray.add(subProperty);
updatedEntity.put("type", "user");
updatedEntity.put("info", subPropertyArray);
dataClient.updateEntityAsync(entityID, updatedEntity, new ApiResponseCallback() {
@Override
public void onResponse(ApiResponse apiResponse) {
if (apiResponse != null) {
Intent intent = new Intent(SetupPage.this, HomePage.class);
startActivity(intent);
}
}
@Override
public void onException(Exception e) {
Log.e("", e.toString());
}
});
Run Code Online (Sandbox Code Playgroud)
但是我收到以下错误: …
我正在实施一个Lottie动画,整个动画效果很好!但是,我想添加一些代码,这些代码将在30帧之后暂停动画,然后我可以在一定时间后恢复.这是迄今为止的代码
animationView.playAnimation(0, 30)
animationView.addAnimatorListener(object : Animator.AnimatorListener {
override fun onAnimationEnd(animation: Animator) {
if (isLoading == false) {
//Everything has loaded. Continue Animation
//This line has no effect. The animation does not continue
animationView.playAnimation(30, 60)
//Resuming the animation just makes the animation disappear
//animation.resume()
}
}
Run Code Online (Sandbox Code Playgroud)
任何意见,将不胜感激!