Android Open Source - rfcx-client-stream-android Login Activity






From Project

Back to project page rfcx-client-stream-android.

License

The source code is released under:

Apache License

If you think the Android project rfcx-client-stream-android 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 org.rfcx.android.stream;
/*from w w w.j  a v  a2 s.co m*/
import android.content.Intent;
import android.os.Build;
import android.support.v7.app.ActionBarActivity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.ImageView;


public class LoginActivity extends BaseActivity {

    ImageView mTopLogoImage;

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

        mTopLogoImage = (ImageView) findViewById(R.id.top_logo);

        if (Build.VERSION.SDK_INT >= 21) { // Lollipop
            getWindow().setStatusBarColor(getResources().getColor(R.color.dark_primary_tranparent));
        }
    }


    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.menu_login, 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();

        //noinspection SimplifiableIfStatement
        if (id == R.id.action_settings) {
            return true;
        }

        return super.onOptionsItemSelected(item);
    }

    public void onJoinClick(View view) {
        Intent intent = new Intent(this, RainForestActivity.class);
//        intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
        intent.putExtra("auth", true);
        startActivity(intent);
        finish();
    }

    public void onSignInClick(View view) {
        Intent intent = new Intent(this, RainForestActivity.class);
//        intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
        intent.putExtra("auth", true);
        startActivity(intent);
        finish();
    }

    @Override
    protected void dayTheme() {
        super.dayTheme();
        // Update top logo
        mTopLogoImage.setImageResource(R.drawable.ic_rfcx_green);
    }

    @Override
    protected void nightTheme() {
        super.nightTheme();
        // Update top logo
        mTopLogoImage.setImageResource(R.drawable.ic_rfcx_white);
    }
}




Java Source Code List

me.cafecode.lib.dotindicatorlib.ApplicationTest.java
me.cafecode.lib.dotindicatorlib.DotIndicator.java
org.rfcx.android.stream.ApplicationTest.java
org.rfcx.android.stream.BaseActivity.java
org.rfcx.android.stream.ForestDetailFragment.java
org.rfcx.android.stream.LoginActivity.java
org.rfcx.android.stream.RainForestActivity.java
org.rfcx.android.stream.view.SignUpFragment.java
org.rfcx.android.stream.view.VisualizerView.java