Android Open Source - swap Main Activity






From Project

Back to project page swap.

License

The source code is released under:

This is free and unencumbered software released into the public domain. Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a co...

If you think the Android project swap 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 org.solazo.swap;
// w ww  . ja va2 s  .c  o m
import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
//import android.view.Menu;
import android.view.View;

public class MainActivity extends Activity {

  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);  
    if (AppState.getInstance(this).isOnline(this)) {
      setContentView(R.layout.activity_main);
    } else {
        setContentView(R.layout.activity_no_internet);
    }
  }

  public void startGuessActivity(View view) {
    Intent intent = new Intent(this, GuessActivity.class);
    startActivity(intent);
  }

  public void startSubmitActivity(View view) {
    Intent intent = new Intent(this, SubmitActivity.class);
    startActivity(intent);
  }
  
  public void startAboutActivity(View view) {
    Intent intent = new Intent(this, AboutActivity.class);
    startActivity(intent);
  }
}




Java Source Code List

org.solazo.AboutFragment.java
org.solazo.GuessActivity.java
org.solazo.LocationActivity.java
org.solazo.MainActivity.java
org.solazo.Solazo.java
org.solazo.SubmitActivity.java
org.solazo.TabActivity.java
org.solazo.swap.AboutActivity.java
org.solazo.swap.AppState.java
org.solazo.swap.GuessActivity.java
org.solazo.swap.LocationService.java
org.solazo.swap.MainActivity.java
org.solazo.swap.SubmitActivity.java
org.solazo.utils.AppState.java
org.solazo.utils.DateUtils.java
org.solazo.utils.LocationUtils.java
org.solazo.utils.WeatherConditionsUtils.java