|
|
@@ -3,13 +3,16 @@ package kr.co.zumo.app.lifeplus.view.fragment.tutorial;
|
|
|
import android.content.Context;
|
|
|
import android.support.annotation.NonNull;
|
|
|
import android.support.v4.view.PagerAdapter;
|
|
|
+import android.util.Log;
|
|
|
import android.view.LayoutInflater;
|
|
|
import android.view.View;
|
|
|
import android.view.ViewGroup;
|
|
|
+import android.widget.Button;
|
|
|
import android.widget.ImageView;
|
|
|
import android.widget.TextView;
|
|
|
|
|
|
import kr.co.zumo.app.R;
|
|
|
+import kr.co.zumo.app.lifeplus.view.Event;
|
|
|
import kr.co.zumo.app.lifeplus.view.presenter.Presenter;
|
|
|
|
|
|
/**
|
|
|
@@ -87,30 +90,35 @@ public class TutorialPagerAdapter extends PagerAdapter {
|
|
|
ImageView imageViewTutorial = (ImageView) view.findViewById(R.id.image_view_tutorial);
|
|
|
TextView textViewTitle = (TextView) view.findViewById(R.id.text_view_tutorial_title);
|
|
|
TextView textViewDetail = (TextView) view.findViewById(R.id.text_view_tutorial_detail);
|
|
|
+ bottomView.setVisibility(View.VISIBLE);
|
|
|
|
|
|
switch (position) {
|
|
|
case 0:
|
|
|
- bottomView.setVisibility(View.VISIBLE);
|
|
|
imageViewTutorial.setImageResource(R.drawable.tutorial_image1);
|
|
|
textViewTitle.setText(R.string.tutorial_title1);
|
|
|
textViewDetail.setText(R.string.tutorial_title1_message);
|
|
|
break;
|
|
|
case 1:
|
|
|
- bottomView.setVisibility(View.VISIBLE);
|
|
|
imageViewTutorial.setImageResource(R.drawable.tutorial_image2);
|
|
|
+ textViewTitle.setText(R.string.tutorial_title2);
|
|
|
+ textViewDetail.setText(R.string.tutorial_title2_message);
|
|
|
break;
|
|
|
case 2:
|
|
|
- bottomView.setVisibility(View.VISIBLE);
|
|
|
imageViewTutorial.setImageResource(R.drawable.tutorial_image3);
|
|
|
+ textViewTitle.setText(R.string.tutorial_title3);
|
|
|
+ textViewDetail.setText(R.string.tutorial_title3_message);
|
|
|
break;
|
|
|
case 3:
|
|
|
- bottomView.setVisibility(View.VISIBLE);
|
|
|
imageViewTutorial.setImageResource(R.drawable.tutorial_image4);
|
|
|
+ textViewTitle.setText(R.string.tutorial_title4);
|
|
|
+ textViewDetail.setText(R.string.tutorial_title4_message);
|
|
|
break;
|
|
|
case 4:
|
|
|
//하단 바 사라짐
|
|
|
- view = layoutInflater.inflate(R.layout.tutorial_last, container, false);
|
|
|
bottomView.setVisibility(View.GONE);
|
|
|
+ view = layoutInflater.inflate(R.layout.tutorial_last, container, false);
|
|
|
+ Button buttonStart = view.findViewById(R.id.button_start_main);
|
|
|
+ buttonStart.setOnClickListener(v -> presenter.onEvent(new Event.Builder(Event.TUTORIAL_CLOSE).build()));
|
|
|
break;
|
|
|
default:
|
|
|
break;
|
|
|
@@ -129,6 +137,7 @@ public class TutorialPagerAdapter extends PagerAdapter {
|
|
|
*/
|
|
|
@Override
|
|
|
public void destroyItem(@NonNull ViewGroup container, int position, @NonNull Object object) {
|
|
|
+ Log.e("APP# TutorialPagerAdapter | destroyItem", "|" + position);
|
|
|
container.removeView((View) object);
|
|
|
}
|
|
|
|