Android Open Source - RobolectricSample Home Activity






From Project

Back to project page RobolectricSample.

License

The source code is released under:

MIT License

If you think the Android project RobolectricSample 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.pivotallabs;
/*from   ww w .  j  a  va 2 s  .  co m*/
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import com.pivotallabs.injected.InjectedActivity;
import com.pivotallabs.tracker.RecentActivityActivity;

public class HomeActivity extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setContentView(R.layout.home_layout);

        findViewById(R.id.press_me_button).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                startActivity(NamesActivity.class);
            }
        });

        findViewById(R.id.tracker_recent_activity).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                startActivity(RecentActivityActivity.class);
            }
        });

        findViewById(R.id.injected_activity_button).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                startActivity(InjectedActivity.class);
            }
        });
    }

    private void startActivity(Class<? extends Activity> activityClass) {
        Intent intent = new Intent();
        intent.setClassName(getPackageName(), activityClass.getName());
        startActivity(intent);
    }
}




Java Source Code List

com.pivotallabs.AuthenticationCallbacks.java
com.pivotallabs.Callbacks.java
com.pivotallabs.EmptyOnClickListener.java
com.pivotallabs.GenericAdapter.java
com.pivotallabs.HomeActivity.java
com.pivotallabs.MultiCallbacks.java
com.pivotallabs.NamesActivity.java
com.pivotallabs.NamesAdapter.java
com.pivotallabs.NotifyDataSetChangedCallbacks.java
com.pivotallabs.OnChangeListener.java
com.pivotallabs.StubTextWatcher.java
com.pivotallabs.ViewEnablingTextWatcher.java
com.pivotallabs.ViewVisibleWhileOutstandingCallbacks.java
com.pivotallabs.api.ApiGateway.java
com.pivotallabs.api.ApiRequest.java
com.pivotallabs.api.ApiResponseCallbacks.java
com.pivotallabs.api.ApiResponse.java
com.pivotallabs.api.CertificateIgnoringSSLSocketFactory.java
com.pivotallabs.api.Http.java
com.pivotallabs.api.TrustingTrustManager.java
com.pivotallabs.api.Xmls.java
com.pivotallabs.injected.Counter.java
com.pivotallabs.injected.InjectedActivity.java
com.pivotallabs.injected.RobolectricSampleModule.java
com.pivotallabs.injected.SampleGuiceApplication.java
com.pivotallabs.tracker.AuthenticationGateway.java
com.pivotallabs.tracker.RecentActivities.java
com.pivotallabs.tracker.RecentActivityActivity.java
com.pivotallabs.tracker.RecentActivityAdapter.java
com.pivotallabs.tracker.RecentActivityRequest.java
com.pivotallabs.tracker.RecentActivity.java
com.pivotallabs.tracker.SignInDialog.java
com.pivotallabs.tracker.TrackerAuthenticationRequest.java
com.pivotallabs.util.Pair.java
com.pivotallabs.util.Strings.java