BodyZoneActivity.java 文件源码

java
阅读 19 收藏 0 点赞 0 评论 0

项目:MoleMapperAndroid 作者:
private void startMoleCreateState()
{
    LogExt.i(getClass(), "startMoleCreateState");

    addMole.animate()
            .scaleX(0)
            .scaleY(0)
            .setDuration(150)
            .setInterpolator(new FastOutLinearInInterpolator())
            .withEndAction(() -> {
                addMole.setVisibility(View.GONE);
                addMoleContainer.animate().setDuration(150).translationY(0);
            });

    zoneImage.setCurrentState(ZoneView.STATE_MOLE_CREATE);
    addMoleTitle.setText(R.string.zone_add_mole_hint_highlight);
    addMoleAction.setText(R.string.save);
    addMoleAction.setOnClickListener(v -> {

        Observable.from(zoneImage.getCreated())
                .map(emptyMole -> ((Database) StorageAccess.getInstance()
                        .getAppDatabase()).createMole(BodyZoneActivity.this, emptyMole, zone))
                .compose(ObservableUtils.applyDefault())
                .subscribe(mole -> {
                    LogExt.d(BodyZoneActivity.class, "Saved new mole: " + mole.moleName);
                }, error -> {
                    throw new OnErrorNotImplementedException(error);
                }, this :: fetchZone);

        startMoleSelectionState();
    });
    addMoleCancel.setVisibility(View.VISIBLE);
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号