package com.seatel.mobilehall.util.customview;

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

import com.seatel.mobilehall.R;

public class TermServicePrivacyPolicyView extends LinearLayout implements View.OnClickListener {
    public TermServicePrivacyPolicyView(Context context) {
        super(context);
        initView();
    }

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

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

    public TermServicePrivacyPolicyView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
        super(context, attrs, defStyleAttr, defStyleRes);
        initView();
    }

    private void initView() {
        LayoutInflater.from(getContext()).inflate(R.layout.term_service_privacy_policy, this);
        findViewById(R.id.term_of_service).setOnClickListener(this);
//        findViewById(R.id.privacy_policy).setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.term_of_service:
//                TermServicePrivatePolicyActivity.launch(getContext(), getContext().getString(R.string.url_term), "Term of Service");
                break;
//            case R.id.privacy_policy:
////                TermServicePrivatePolicyActivity.launch(getContext(), getContext().getString(R.string.url_private), "Privacy Policy");
//                break;
        }
    }
}
