Created
April 2, 2016 04:27
-
-
Save AraujoJordan/71d0cdf243414f72ed62e43d02f1844d to your computer and use it in GitHub Desktop.
[Nova Cursos] Aula6 - MainActivity (mais limpa)
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 araujo.jordan.novaquiz; | |
import android.os.Bundle; | |
import android.support.v4.view.ViewPager; | |
import android.support.v7.app.AppCompatActivity; | |
/** | |
* Tela principal do programa, chamada por um dos botões da PrimeiraActivity | |
*/ | |
public class MainActivity extends AppCompatActivity { | |
private Partida partida; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); | |
partida = (Partida) getIntent().getSerializableExtra("partida"); | |
ViewPager pagerLayout = (ViewPager) findViewById(R.id.fragments); | |
pagerLayout.setAdapter(new QuizPagerAdapter(getSupportFragmentManager(), partida)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment