Android Open Source - Planets Satellite Earth






From Project

Back to project page Planets.

License

The source code is released under:

Apache License

If you think the Android project Planets 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.andrewq.planets;
//  www  .  j  a va 2  s  .  co  m
import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class SatelliteEarth extends Activity {

  Button button;

  @Override
  protected void onCreate(Bundle savedInstanceState) {
    setContentView(R.layout.satellite_earth);
    getActionBar().setDisplayHomeAsUpEnabled(true);
    super.onCreate(savedInstanceState);

    button = (Button) findViewById(R.id.moon_button);

    button.setOnClickListener(new View.OnClickListener() {

      @Override
      public void onClick(View v) {

        String url = "http://space-facts.com/the-moon/";
        Intent i = new Intent(Intent.ACTION_VIEW);
        i.setData(Uri.parse(url));
        startActivity(i);

      }
    });

  }

}




Java Source Code List

com.andrewq.planets.MainActivity.java
com.andrewq.planets.PlanetFragment.java
com.andrewq.planets.SatelliteEarth.java
com.andrewq.planets.Settings.java