//
// DO NOT EDIT THIS FILE, IT HAS BEEN GENERATED USING AndroidAnnotations 3.0.1.
//


package com.gitonway.fineday.widget;

import android.content.Context;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.gitonway.fineday.R.id;
import com.gitonway.fineday.R.layout;
import com.gitonway.fineday.widget.shimmer.ShimmerTextView;
import org.androidannotations.api.view.HasViews;
import org.androidannotations.api.view.OnViewChangedListener;
import org.androidannotations.api.view.OnViewChangedNotifier;


/**
 * We use @SuppressWarning here because our java code
 * generator doesn't know that there is no need
 * to import OnXXXListeners from View as we already
 * are in a View.
 * 
 */
@SuppressWarnings("unused")
public final class TodayWeaterInfo_
    extends TodayWeaterInfo
    implements HasViews, OnViewChangedListener
{

    private boolean alreadyInflated_ = false;
    private final OnViewChangedNotifier onViewChangedNotifier_ = new OnViewChangedNotifier();

    public TodayWeaterInfo_(Context context) {
        super(context);
        init_();
    }

    public static TodayWeaterInfo build(Context context) {
        TodayWeaterInfo_ instance = new TodayWeaterInfo_(context);
        instance.onFinishInflate();
        return instance;
    }

    /**
     * The mAlreadyInflated_ hack is needed because of an Android bug
     * which leads to infinite calls of onFinishInflate()
     * when inflating a layout with a parent and using
     * the <merge /> tag.
     * 
     */
    @Override
    public void onFinishInflate() {
        if (!alreadyInflated_) {
            alreadyInflated_ = true;
            inflate(getContext(), layout.viewpager_today_info, this);
            onViewChangedNotifier_.notifyViewChanged(this);
        }
        super.onFinishInflate();
    }

    private void init_() {
        OnViewChangedNotifier previousNotifier = OnViewChangedNotifier.replaceNotifier(onViewChangedNotifier_);
        OnViewChangedNotifier.registerOnViewChangedListener(this);
        OnViewChangedNotifier.replaceNotifier(previousNotifier);
    }

    @Override
    public void onViewChanged(HasViews hasViews) {
        mTextViewDate = ((TextView) hasViews.findViewById(id.today_date));
        mLayoutWeek = ((LinearLayout) hasViews.findViewById(id.layout_week_));
        mTextViewWeaterInfo = ((TextView) hasViews.findViewById(id.weaterinfo));
        mTextViewTempH = ((TextView) hasViews.findViewById(id.temph));
        mImageViewIcon = ((ImageView) hasViews.findViewById(id.today_weater_icon));
        mTextViewAir = ((TextView) hasViews.findViewById(id.air));
        mTextViewArea = ((ShimmerTextView) hasViews.findViewById(id.area));
        mLayoutInfo = ((LinearLayout) hasViews.findViewById(id.layout_another_info_));
        mTextViewCurrentWeater = ((TextView) hasViews.findViewById(id.currentweater));
        mTextViewWeek = ((TextView) hasViews.findViewById(id.today_week));
        mTextViewWind = ((TextView) hasViews.findViewById(id.wind));
        mTextViewTempL = ((TextView) hasViews.findViewById(id.templ));
        {
            View view = hasViews.findViewById(id.area);
            if (view!= null) {
                view.setOnClickListener(new OnClickListener() {


                    @Override
                    public void onClick(View view) {
                        TodayWeaterInfo_.this.areaClicked();
                    }

                }
                );
            }
        }
        {
            View view = hasViews.findViewById(id.currentweater);
            if (view!= null) {
                view.setOnClickListener(new OnClickListener() {


                    @Override
                    public void onClick(View view) {
                        TodayWeaterInfo_.this.currentweaterClicked();
                    }

                }
                );
            }
        }
    }

}
