Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import android.content.Context;
import android.graphics.Point;
import android.os.AsyncTask;
import android.os.Handler;
import android.support.percent.PercentRelativeLayout;
import android.util.AttributeSet;
import android.util.Log;
Expand Down Expand Up @@ -505,14 +506,35 @@ public void postFinishLine() {
@Override
public void onAnimationEnd(Animator animation) {
super.onAnimationEnd(animation);
applyEventNode("NEXT");
ongoingAnimator.remove(finishLineAnimator);
postSplashScreen();
}
});

finishLineAnimator.start();
}

public void postSplashScreen() {
final PercentRelativeLayout percentLayout = (PercentRelativeLayout) getChildAt(0);

final ImageView splashScreen = new ImageView(mContext);
splashScreen.setScaleType(ImageView.ScaleType.FIT_CENTER);
LayoutParams params = new LayoutParams(getWidth(), getHeight());
params.addRule(CENTER_HORIZONTAL);
splashScreen.setImageResource(cmu.xprize.ak_component.R.drawable.splash);

percentLayout.addView(splashScreen, params);

splashScreen.bringToFront();

new Handler().postDelayed(new Runnable() {
@Override
public void run() {
applyEventNode("NEXT");
}
}, 1000); //Timer is in ms heree
}

public void judge(){
reset();
switch(questionBoard.choices.length){
Expand Down
Binary file added comp_akira/src/main/res/drawable/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.