Android Open Source - GearsDrawable Hello Android Activity






From Project

Back to project page GearsDrawable.

License

The source code is released under:

GNU General Public License

If you think the Android project GearsDrawable 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.simon.android.drawable;
// ww w .  j  av a  2s.c  o m
import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;

public class HelloAndroidActivity extends Activity {

  /**
   * Called when the activity is first created.
   *
   * @param savedInstanceState If the activity is being re-initialized after
   *                           previously being shut down then this Bundle contains the data it most
   *                           recently supplied in onSaveInstanceState(Bundle). <b>Note: Otherwise it is null.</b>
   */
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    findViewById(R.id.gears).setBackground(new GearsDrawable(this));
  }

  @Override
  public boolean onCreateOptionsMenu(Menu menu) {
    // Inflate the menu; this adds items to the action bar if it is present.
    getMenuInflater().inflate(com.simon.android.drawable.R.menu.main, menu);
    return true;
  }

}




Java Source Code List

com.simon.android.drawable.GearsDrawable.java
com.simon.android.drawable.HelloAndroidActivity.java