Android Open Source - okulus Main Activity






From Project

Back to project page okulus.

License

The source code is released under:

Apache License

If you think the Android project okulus 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.vinaysshenoy.okulusdemo;
//  w  ww  .ja  v  a  2  s  . c o  m
import android.support.v4.app.Fragment;
import android.support.v7.app.ActionBarActivity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;

import com.vinaysshenoy.okulusdemo.fragments.NetworkFragment;
import com.vinaysshenoy.okulusdemo.fragments.RoundedRectanglesFragment;


public class MainActivity extends ActionBarActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        if(savedInstanceState == null) {
            loadNetworkFragment();
        }
    }

    private void loadRoundRectFragment() {

        getSupportFragmentManager().beginTransaction()
                .replace(R.id.frame_content,
                         Fragment.instantiate(this, RoundedRectanglesFragment.class.getName()),
                         "fragment_rounded_rectangles")
                .commit();
    }

    private void loadNetworkFragment() {

        getSupportFragmentManager().beginTransaction()
                .replace(R.id.frame_content,
                        Fragment.instantiate(this, NetworkFragment.class.getName()),
                        "fragment_network")
                .commit();
    }


    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.main, 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.android.volley.AuthFailureError.java
com.android.volley.CacheDispatcher.java
com.android.volley.Cache.java
com.android.volley.DefaultRetryPolicy.java
com.android.volley.ExecutorDelivery.java
com.android.volley.NetworkDispatcher.java
com.android.volley.NetworkError.java
com.android.volley.NetworkResponse.java
com.android.volley.Network.java
com.android.volley.NoConnectionError.java
com.android.volley.ParseError.java
com.android.volley.RequestQueue.java
com.android.volley.Request.java
com.android.volley.ResponseDelivery.java
com.android.volley.Response.java
com.android.volley.RetryPolicy.java
com.android.volley.ServerError.java
com.android.volley.TimeoutError.java
com.android.volley.VolleyError.java
com.android.volley.VolleyLog.java
com.android.volley.toolbox.AndroidAuthenticator.java
com.android.volley.toolbox.Authenticator.java
com.android.volley.toolbox.BasicNetwork.java
com.android.volley.toolbox.ByteArrayPool.java
com.android.volley.toolbox.ClearCacheRequest.java
com.android.volley.toolbox.DiskBasedCache.java
com.android.volley.toolbox.HttpClientStack.java
com.android.volley.toolbox.HttpHeaderParser.java
com.android.volley.toolbox.HttpStack.java
com.android.volley.toolbox.HurlStack.java
com.android.volley.toolbox.ImageLoader.java
com.android.volley.toolbox.ImageRequest.java
com.android.volley.toolbox.JsonArrayRequest.java
com.android.volley.toolbox.JsonObjectRequest.java
com.android.volley.toolbox.JsonRequest.java
com.android.volley.toolbox.NetworkImageView.java
com.android.volley.toolbox.NoCache.java
com.android.volley.toolbox.PoolingByteArrayOutputStream.java
com.android.volley.toolbox.RequestFuture.java
com.android.volley.toolbox.StringRequest.java
com.android.volley.toolbox.Volley.java
com.vinaysshenoy.okulus.OkulusDrawable.java
com.vinaysshenoy.okulus.OkulusImageView.java
com.vinaysshenoy.okulusdemo.DemoApplication.java
com.vinaysshenoy.okulusdemo.MainActivity.java
com.vinaysshenoy.okulusdemo.fragments.NetworkFragment.java
com.vinaysshenoy.okulusdemo.fragments.RoundedRectanglesFragment.java
com.vinaysshenoy.okulusdemo.utils.RawBitmapManager.java