/*
 * COPYRIGHT (c) 2018 All rights reserved by HANWHA LIFE.
 */
package kr.co.zumo.app.lifeplus.view.fragment.onboarding;

import android.content.Context;
import android.support.annotation.NonNull;
import android.util.Log;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;

import kr.co.zumo.app.R;

/**
 * OnBoardingFromZumoPagerAdapter
 * <pre>
 * </pre>
 *
 * @author 민효동
 * @version 1.0
 * @history 민효동   [2018. 10. 4.]   [최초 작성]
 * @since 2018. 10. 4.
 */
public class OnBoardingFromZumoPagerAdapter extends OnBoardingPagerAdapter {
  public OnBoardingFromZumoPagerAdapter(Context context) {
    super(context);
  }

  @Override
  public int getCount() {
    return 1;
  }

  @NonNull
  @Override
  public Object instantiateItem(@NonNull ViewGroup container, int position) {

    Log.e("APP#  OnBoardingPagerAdapter | instantiateItem", "| position" + position);
    view = layoutInflater.inflate(R.layout.tutorial_layout, container, false);
    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);
    bottomBar.setVisibility(View.VISIBLE);
    tabLayout.setVisibility(View.GONE);

    ((TextView) bottomBar.findViewById(R.id.button1_tutorial)).setText(R.string.tutorial_bottom_close);
    ((TextView) bottomBar.findViewById(R.id.button2_tutorial)).setText(R.string.tutorial_bottom_next_for_zumo_user);

    switch (position) {
      case 0:
        imageViewTutorial.setImageResource(R.drawable.mockup_main_60);
        textViewTitle.setText(R.string.tutorial_title_zumo);
        textViewDetail.setText(R.string.tutorial_title_zumo_message);
        break;
      default:
        break;

    }
    container.addView(view);
    return view;
  }


}
