|
@@ -1,5 +1,6 @@
|
|
|
package kr.co.zumo.app.lifeplus.view.screen.my.bucketlist;
|
|
package kr.co.zumo.app.lifeplus.view.screen.my.bucketlist;
|
|
|
|
|
|
|
|
|
|
+import android.graphics.drawable.Drawable;
|
|
|
import android.os.Bundle;
|
|
import android.os.Bundle;
|
|
|
import android.support.annotation.NonNull;
|
|
import android.support.annotation.NonNull;
|
|
|
import android.support.annotation.Nullable;
|
|
import android.support.annotation.Nullable;
|
|
@@ -16,6 +17,7 @@ import java.util.List;
|
|
|
import kr.co.zumo.app.R;
|
|
import kr.co.zumo.app.R;
|
|
|
import kr.co.zumo.app.lifeplus.bean.api.LifeplusImageBean;
|
|
import kr.co.zumo.app.lifeplus.bean.api.LifeplusImageBean;
|
|
|
import kr.co.zumo.app.lifeplus.helper.ActionBarHelper;
|
|
import kr.co.zumo.app.lifeplus.helper.ActionBarHelper;
|
|
|
|
|
+import kr.co.zumo.app.lifeplus.view.Event;
|
|
|
import kr.co.zumo.app.lifeplus.view.screen.FragmentBase;
|
|
import kr.co.zumo.app.lifeplus.view.screen.FragmentBase;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -31,7 +33,6 @@ import kr.co.zumo.app.lifeplus.view.screen.FragmentBase;
|
|
|
public class BucketListDefaultDetailFragment extends FragmentBase<BucketListDefaultDetailPresenter> implements IBucketListDefaultDetailView {
|
|
public class BucketListDefaultDetailFragment extends FragmentBase<BucketListDefaultDetailPresenter> implements IBucketListDefaultDetailView {
|
|
|
|
|
|
|
|
private TextView textViewBucketTitle;
|
|
private TextView textViewBucketTitle;
|
|
|
- private ImageView imageViewBucketCheck;
|
|
|
|
|
private ImageView imageViewBucketBackground;
|
|
private ImageView imageViewBucketBackground;
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
@@ -43,12 +44,13 @@ public class BucketListDefaultDetailFragment extends FragmentBase<BucketListDefa
|
|
|
@Override
|
|
@Override
|
|
|
protected void onAfterActivityCreated(Bundle savedInstanceState) {
|
|
protected void onAfterActivityCreated(Bundle savedInstanceState) {
|
|
|
textViewBucketTitle = findViewById(R.id.text_view_bucket_title);
|
|
textViewBucketTitle = findViewById(R.id.text_view_bucket_title);
|
|
|
- imageViewBucketCheck = findViewById(R.id.image_checker);
|
|
|
|
|
imageViewBucketBackground = findViewById(R.id.image_view_bucket_background);
|
|
imageViewBucketBackground = findViewById(R.id.image_view_bucket_background);
|
|
|
|
|
+ textViewBucketTitle.setOnClickListener(view -> {presenter.onEvent(new Event.Builder(Event.UPDATE).build());});
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
protected void defineActionBar(ActionBarHelper actionBarHelper) {
|
|
protected void defineActionBar(ActionBarHelper actionBarHelper) {
|
|
|
|
|
+
|
|
|
actionBarHelper.begin()
|
|
actionBarHelper.begin()
|
|
|
.back(navigationBar -> presenter.onNavigationClickBack(navigationBar))
|
|
.back(navigationBar -> presenter.onNavigationClickBack(navigationBar))
|
|
|
.confirm(navigationBar -> presenter.onNavigationClickConfirm(navigationBar))
|
|
.confirm(navigationBar -> presenter.onNavigationClickConfirm(navigationBar))
|
|
@@ -125,7 +127,13 @@ public class BucketListDefaultDetailFragment extends FragmentBase<BucketListDefa
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
public void setNavigationBarCompleted(boolean isCompleted) {
|
|
public void setNavigationBarCompleted(boolean isCompleted) {
|
|
|
- imageViewBucketCheck.setVisibility(isCompleted ? View.VISIBLE : View.GONE);
|
|
|
|
|
|
|
+ Drawable checkImageResource = getActivity().getResources().getDrawable(R.drawable.icon_bucket_complete_white);
|
|
|
|
|
+ if (isCompleted) {
|
|
|
|
|
+ textViewBucketTitle.setCompoundDrawablesWithIntrinsicBounds(checkImageResource, null, null, null);
|
|
|
|
|
+ }
|
|
|
|
|
+ else {
|
|
|
|
|
+ textViewBucketTitle.setCompoundDrawablesWithIntrinsicBounds(null, null, null, null);
|
|
|
|
|
+ }
|
|
|
getHelper(ActionBarHelper.class).setCompleted(isCompleted);
|
|
getHelper(ActionBarHelper.class).setCompleted(isCompleted);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|