Android Open Source - spotdroid Main Activity






From Project

Back to project page spotdroid.

License

The source code is released under:

MIT License

If you think the Android project spotdroid 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.spotdroid.mobile.android.gui;
/*from  w  w w  .j av a 2  s . c  om*/
import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;

import com.spotdroid.mobile.android.R;

/**
 * Main activity as a start point for all app activities. 
 */
public class MainActivity extends Activity
{

    /* (non-Javadoc)
     * @see android.app.Activity#onCreate(android.os.Bundle)
     */
    @Override
    protected void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
    }

    /* (non-Javadoc)
     * @see android.app.Activity#onPause()
     */
    @Override
    protected void onPause()
    {
        super.onPause();
    }

    /* (non-Javadoc)
     * @see android.app.Activity#onResume()
     */
    @Override
    protected void onResume()
    {
        super.onResume();
    }

    /**
     * Method defined in layout for button click. 
     * @param view
     */
    public void onClickShowLocation(View view)
    {
        Intent intent = new Intent(this, LocationActivity.class);
        startActivity(intent);
    }

    /**
     * Method defined in layout for button click. 
     * @param view
     */
    public void onClickShowSettings(View view)
    {
        Intent intent = new Intent(this, SettingsActivity.class);
        startActivity(intent);
    }

    /**
     * Method defined in layout for button click. 
     * @param view
     */
    public void onClickShowSendData(View view)
    {
        //TODO
    }

    /**
     * Method defined in layout for button click. 
     * @param view
     */
    public void onClickShowActivitiesIndex(View view)
    {
        Intent intent = new Intent(this, ActivityIndexActivity.class);
        startActivity(intent);
    }

    /**
     * Method defined in layout for button click. 
     * @param view
     */
    public void onClickShowWebsite(View view)
    {
        Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(this.getString(R.string.key_url_website)));
        startActivity(intent);
    }

}




Java Source Code List

com.spotdroid.mobile.android.data.DatabaseHelper.java
com.spotdroid.mobile.android.data.LocationData.java
com.spotdroid.mobile.android.gui.ActivityIndexActivity.java
com.spotdroid.mobile.android.gui.LocationActivity.java
com.spotdroid.mobile.android.gui.MainActivity.java
com.spotdroid.mobile.android.gui.PreferenceData.java
com.spotdroid.mobile.android.gui.SettingsActivity.java
com.spotdroid.mobile.android.gui.SplashActivity.java