package com.zhuinden.flow_alpha_master_detail.paths;

import android.annotation.TargetApi;
import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.widget.LinearLayout;

import com.zhuinden.flow_alpha_master_detail.R;

import flowless.Flow;

/**
 * Created by Zhuinden on 2016.04.16..
 */
public class FourthDetailView
        extends LinearLayout {
    public FourthDetailView(Context context) {
        super(context);
    }

    public FourthDetailView(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    public FourthDetailView(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
    }

    @TargetApi(21)
    public FourthDetailView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
        super(context, attrs, defStyleAttr, defStyleRes);
    }

    @Override
    protected void onFinishInflate() {
        super.onFinishInflate();
        findViewById(R.id.fourth_detail_start_detail).setOnClickListener(new OnClickListener() {
            @Override
            public void onClick(View v) {
                Flow.get(v).set(FourthDetailSecondKey.create());
            }
        });
    }
}
