Android Open Source - Linked Main Activity






From Project

Back to project page Linked.

License

The source code is released under:

Apache License

If you think the Android project Linked 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.yuhumai.life;
/*from w  ww  . j av  a 2  s.  co  m*/
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.widget.Toast;

import com.parse.Parse;
import com.parse.ParseUser;

public class MainActivity extends ActionBarActivity {

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

        Parse.initialize(this, "kGcB1GjFAh49f0m8Ql3u0WXB8DeYrvkFGiIykRI9", "hpboyAR6eZZnthG9hGgvGDZ6tPUVns38qDkiwdgE");
    }

    @Override
    protected void onResume() {
        super.onResume();

        ParseUser currentUser = ParseUser.getCurrentUser();
        if (currentUser != null) {
            Intent intent = new Intent(this, TabBarActivity.class);
            startActivity(intent);
            Toast.makeText(getApplicationContext(), "Signed In", Toast.LENGTH_SHORT).show();
        } else {
            Intent intent = new Intent(this, LoginActivity.class);
            startActivity(intent);
        }
    }
}




Java Source Code List

com.yuhumai.life.ApplicationTest.java
com.yuhumai.life.LoginActivity.java
com.yuhumai.life.MainActivity.java
com.yuhumai.life.PlusBaseActivity.java
com.yuhumai.life.TabBarActivity.java
com.yuhumai.life.fragment.FinanceFragment.java
com.yuhumai.life.fragment.FitnessFragment.java
com.yuhumai.life.fragment.PackageFragment.java