Android Open Source - LikeYahooWeather Main Activity






From Project

Back to project page LikeYahooWeather.

License

The source code is released under:

GNU General Public License

If you think the Android project LikeYahooWeather 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.moshdev.likeyahooweather;
//from  ww  w.j a va 2  s.  c om
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.ListView;

public class MainActivity extends ActionBarActivity {

  public static final int BACKGROUND_SHIFT = 200;
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    ListView listView = new ListView(this);
    String[] items = new String[] { "RunTime Blur", "Pre-Blur Image" };
    listView.setAdapter(new ArrayAdapter<>(this,
        android.R.layout.simple_list_item_1, items));
    setContentView(listView);
    listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {

      @Override
      public void onItemClick(AdapterView<?> parent, View view,
          int position, long id) {

        if (position == 0) {
          startActivity(new Intent(getApplicationContext(),
              RunTimeBlurActivity.class));
        } else if (position == 1) {
          startActivity(new Intent(getApplicationContext(),
              PreBlurActivity.class));
        }

      }
    });
  }

}




Java Source Code List

com.moshdev.likeyahooweather.MainActivity.java
com.moshdev.likeyahooweather.PreBlurActivity.java
com.moshdev.likeyahooweather.RunTimeBlurActivity.java
com.moshdev.likeyahooweather.adapter.BlurListAdapter.java
com.moshdev.likeyahooweather.utils.Blur.java
com.moshdev.likeyahooweather.utils.ImageUtils.java