Created
November 19, 2016 01:10
-
-
Save mochadwi/5a0bf56a9e0055858579eb2824e304d5 to your computer and use it in GitHub Desktop.
Codelabs Workshop #19 - Intro to MVC and RecyclerView
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package io.github.mochadwi.practicerecyclerview; | |
import android.content.Intent; | |
import android.support.v7.app.AppCompatActivity; | |
import android.os.Bundle; | |
import android.view.View; | |
import android.widget.Button; | |
public class MainActivity extends AppCompatActivity { | |
Button arrayList; | |
Button okHttp; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); | |
arrayList = (Button) findViewById(R.id.btn_arraylist); | |
okHttp = (Button) findViewById(R.id.btn_okhttp); | |
arrayList.setOnClickListener(new View.OnClickListener() { | |
@Override | |
public void onClick(View view) { | |
startActivity(new Intent(MainActivity.this, ArrayListActivity.class)); | |
} | |
}); | |
okHttp.setOnClickListener(new View.OnClickListener() { | |
@Override | |
public void onClick(View view) { | |
startActivity(new Intent(MainActivity.this, OkHttpActivity.class)); | |
} | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment