Android Open Source - android-cd-travis-example Cities Activity






From Project

Back to project page android-cd-travis-example.

License

The source code is released under:

MIT License

If you think the Android project android-cd-travis-example listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.ruenzuo.weatherapp.activities;
// ww w.  jav a  2s. c o m
import android.os.Bundle;
import android.view.View;
import android.widget.FrameLayout;
import com.google.ads.AdRequest;
import com.google.ads.AdSize;
import com.ruenzuo.weatherapp.R;
import com.ruenzuo.weatherapp.base.CitiesBaseActivity;
import com.google.ads.AdView;

public class CitiesActivity extends CitiesBaseActivity {

    private AdView adView;

    private View mAdView;

    public View getAdView() {
        return mAdView;
    }

    public void setAdView(View adView) {
        this.mAdView = adView;
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        adView = new AdView(this, AdSize.BANNER, "a14defa59f9a1e7");
        FrameLayout layout = (FrameLayout)findViewById(R.id.frameLayout);
        layout.addView(adView);
        adView.loadAd(new AdRequest());
        setAdView(adView);
    }

    @Override
    public void onDestroy() {
        if (adView != null) {
            adView.destroy();
        }
        super.onDestroy();
    }

}




Java Source Code List

com.ruenzuo.weatherapp.activities.CitiesActivity.java
com.ruenzuo.weatherapp.activities.CitiesActivity.java
com.ruenzuo.weatherapp.activities.CityActivity.java
com.ruenzuo.weatherapp.activities.CityActivity.java
com.ruenzuo.weatherapp.adapters.CitiesAdapter.java
com.ruenzuo.weatherapp.adapters.CityAdapter.java
com.ruenzuo.weatherapp.base.CitiesBaseActivity.java
com.ruenzuo.weatherapp.base.CityBaseActivity.java
com.ruenzuo.weatherapp.fragments.CitiesListFragment.java
com.ruenzuo.weatherapp.fragments.CityFragment.java
com.ruenzuo.weatherapp.pojos.City.java
com.ruenzuo.weatherapp.pojos.Coordinate.java
com.ruenzuo.weatherapp.pojos.Forecast.java
com.ruenzuo.weatherapp.pojos.ListCities.java
com.ruenzuo.weatherapp.requests.CityJsonRequest.java
com.ruenzuo.weatherapp.test.CitiesActivityFunctionalTests.java
com.ruenzuo.weatherapp.test.CityActivityFunctionalTests.java