59 lines
1.9 KiB
Java
59 lines
1.9 KiB
Java
package com.rubenvandeven.emotionhero;
|
|
|
|
import android.content.Intent;
|
|
import android.graphics.Typeface;
|
|
import android.support.v7.app.AppCompatActivity;
|
|
import android.os.Bundle;
|
|
import android.support.v7.widget.Toolbar;
|
|
import android.view.View;
|
|
import android.view.WindowManager;
|
|
import android.widget.TextView;
|
|
|
|
/**
|
|
* Not to be confused with IntroActivity:
|
|
* this is the first game introduction (explaining the procedure etc.)
|
|
*/
|
|
public class IntroductionActivity extends AppCompatActivity {
|
|
|
|
TextView nextButton;
|
|
TextView readyButton;
|
|
TextView text1;
|
|
TextView text2;
|
|
|
|
@Override
|
|
protected void onCreate(Bundle savedInstanceState) {
|
|
super.onCreate(savedInstanceState);
|
|
getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
|
|
setContentView(R.layout.activity_introduction);
|
|
|
|
|
|
nextButton = (TextView) findViewById(R.id.nextButton);
|
|
readyButton = (TextView) findViewById(R.id.readyButton);
|
|
text1 = (TextView) findViewById(R.id.introText1);
|
|
text2 = (TextView) findViewById(R.id.introText2);
|
|
|
|
Typeface font = Typeface.createFromAsset(getAssets(), "unifont-9.0.02.ttf");
|
|
nextButton.setTypeface(font);
|
|
readyButton.setTypeface(font);
|
|
|
|
nextButton.setOnClickListener(new View.OnClickListener() {
|
|
@Override
|
|
public void onClick(View v) {
|
|
nextButton.setVisibility(View.GONE);
|
|
readyButton.setVisibility(View.VISIBLE);
|
|
text1.setVisibility(View.GONE);
|
|
text2.setVisibility(View.VISIBLE);
|
|
}
|
|
});
|
|
|
|
readyButton.setOnClickListener(new View.OnClickListener() {
|
|
@Override
|
|
public void onClick(View v) {
|
|
Intent intent = new Intent(IntroductionActivity.this, ProgressActivity.class);
|
|
finish();
|
|
startActivity(intent);
|
|
}
|
|
});
|
|
}
|
|
}
|