// // DO NOT EDIT THIS FILE, IT HAS BEEN GENERATED USING AndroidAnnotations 3.2. // package com.appassit.widget; import android.content.Context; import android.support.v4.app.Fragment; import android.view.View; import android.view.View.OnClickListener; import android.widget.ImageView; import android.widget.TextView; import com.appassit.R.id; import com.appassit.R.layout; 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 RealtimeWeatherItem_ extends RealtimeWeatherItem implements HasViews, OnViewChangedListener { private boolean alreadyInflated_ = false; private final OnViewChangedNotifier onViewChangedNotifier_ = new OnViewChangedNotifier(); public RealtimeWeatherItem_(Context context, Fragment fragment) { super(context, fragment); init_(); } public static RealtimeWeatherItem build(Context context, Fragment fragment) { RealtimeWeatherItem_ instance = new RealtimeWeatherItem_(context, fragment); 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.layout_weather_today, 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) { ivWeatherIcon = ((ImageView) hasViews.findViewById(id.iv_weather_icon)); btnAddCity = ((RippleView) hasViews.findViewById(id.btn_addcity)); tvCity = ((TextView) hasViews.findViewById(id.tv_city)); tvWind = ((TextView) hasViews.findViewById(id.tv_wind)); tvCreateTiem = ((TextView) hasViews.findViewById(id.tv_create_time)); tvTemp = ((TextView) hasViews.findViewById(id.tv_temp)); tvWeather = ((TextView) hasViews.findViewById(id.tv_weather)); if (btnAddCity!= null) { btnAddCity.setOnClickListener(new OnClickListener() { @Override public void onClick(View view) { RealtimeWeatherItem_.this.cityClick(); } } ); } } }