Android Open Source - Android-1 My Activity






From Project

Back to project page Android-1.

License

The source code is released under:

MIT License

If you think the Android project Android-1 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.example.georgi.resourcesrecreate;
/*from w w w .j av a2s.c om*/
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.provider.MediaStore;
import android.view.Menu;
import android.view.MenuItem;

import java.util.ArrayList;


public class MyActivity extends Activity {

    private Intent result;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        Intent getToMyOtherActivity = new Intent(this, LoginActivity.class);
        startActivity(getToMyOtherActivity);
        finish();

//        setContentView(R.layout.activity_my);
//
//        Intent i = new Intent();
//        i.setType("text/plain");
//
//
//        i.setClass("com.example.georgi.resourcesRecreate", MyOtherActivity.class);
//        i.setAction(MediaStore.ACTION_IMAGE_CAPTURE);
////        i.setData(Uri.parse("mailto:ch_bg@abv.bg"));
//        i.putExtra(Intent.EXTRA_SUBJECT, "meh");
//        i.putExtra(Intent.EXTRA_EMAIL, new String[] { "ch_bg@abv.bg" });

        startActivity(i);

        int requestCode = 0xBABE;
        startActivityForResult(i, requestCode);

        getIntent().getStringExtra("photoLocation");

        setResult(RESULT_OK, new Intent());
        finish();
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);

        switch (requestCode){
            case 0xBABE:
                break;
        }

    }

    @Override
    protected void onSaveInstanceState(Bundle outState) {
        outState.putStringArrayList("contacts", new ArrayList<String>());
        super.onSaveInstanceState(outState);
    }


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

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        // Handle action bar item clicks here. The action bar will
        // automatically handle clicks on the Home/Up button, so long
        // as you specify a parent activity in AndroidManifest.xml.
        int id = item.getItemId();
        if (id == R.id.action_settings) {
            return true;
        }
        return super.onOptionsItemSelected(item);
    }
}




Java Source Code List

com.example.georgi.mehadapter.ApplicationTest.java
com.example.georgi.mehadapter.Contact.java
com.example.georgi.mehadapter.IvoAdapter.java
com.example.georgi.mehadapter.MyActivity.java
com.example.georgi.puzzle.ApplicationTest.java
com.example.georgi.puzzle.BuildConfig.java
com.example.georgi.puzzle.PuzzleActivity.java
com.example.georgi.resourcesrecreate.AppContext.java
com.example.georgi.resourcesrecreate.ApplicationTest.java
com.example.georgi.resourcesrecreate.LoginActivity.java
com.example.georgi.resourcesrecreate.MyActivity.java
com.example.georgi.resourcesrecreate.PlusBaseActivity.java
com.example.georgi.sqliteexample.ApplicationTest.java
com.example.georgi.sqliteexample.FluentApiBuilder.java
com.example.georgi.sqliteexample.Losers.java
com.example.georgi.sqliteexample.MyActivity.java
com.example.gestureimageview.GestureImageActivity.java