-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from gscdev/master
#15 updated audio file names
- Loading branch information
Showing
13 changed files
with
139 additions
and
11 deletions.
There are no files selected for viewing
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
59 changes: 59 additions & 0 deletions
59
app/src/main/java/org/literacyapp/startguide/content/FinalActivity.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
package org.literacyapp.startguide.content; | ||
|
||
import android.graphics.drawable.Animatable; | ||
import android.graphics.drawable.Drawable; | ||
import android.os.Bundle; | ||
import android.os.Handler; | ||
import android.support.v7.app.AppCompatActivity; | ||
import android.view.View; | ||
import android.widget.ImageView; | ||
|
||
import org.literacyapp.startguide.R; | ||
import org.literacyapp.startguide.util.MediaPlayerHelper; | ||
|
||
import static org.literacyapp.startguide.util.MediaPlayerHelper.DEFAULT_PLAYER_DELAY; | ||
|
||
|
||
public class FinalActivity extends AppCompatActivity { | ||
|
||
private ImageView mFinalCheckmarkImageView; | ||
|
||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.activity_final); | ||
|
||
mFinalCheckmarkImageView = (ImageView) findViewById(R.id.final_checkmark); | ||
} | ||
|
||
@Override | ||
protected void onStart() { | ||
super.onStart(); | ||
|
||
// Animate checkmark | ||
mFinalCheckmarkImageView.postDelayed(new Runnable() { | ||
@Override | ||
public void run() { | ||
mFinalCheckmarkImageView.setVisibility(View.VISIBLE); | ||
Drawable drawable = mFinalCheckmarkImageView.getDrawable(); | ||
((Animatable) drawable).start(); | ||
|
||
playGoodJob(); | ||
} | ||
}, DEFAULT_PLAYER_DELAY); | ||
} | ||
|
||
private void playGoodJob() { | ||
MediaPlayerHelper.play(this, R.raw.good_job, new MediaPlayerHelper.MediaPlayerListener() { | ||
@Override | ||
public void onCompletion() { | ||
new Handler().postDelayed(new Runnable() { | ||
@Override | ||
public void run() { | ||
finish(); | ||
} | ||
}, DEFAULT_PLAYER_DELAY); | ||
} | ||
}); | ||
} | ||
} |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<set xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:interpolator="@android:anim/accelerate_interpolator" | ||
android:ordering="sequentially" | ||
android:shareInterpolator="false"> | ||
|
||
<!-- Step 1 --> | ||
<objectAnimator | ||
android:duration="@android:integer/config_shortAnimTime" | ||
android:propertyName="pathData" | ||
android:valueFrom="M6,11 l0,0 l0,0" | ||
android:valueTo="M6,11 l3.5,4 l0,0" | ||
android:valueType="pathType" /> | ||
|
||
<!-- Step 2 --> | ||
<objectAnimator | ||
android:duration="@android:integer/config_shortAnimTime" | ||
android:propertyName="pathData" | ||
android:valueFrom="M6,11 l3.5,4 l0,0" | ||
android:valueTo="M6,11 l3.5,4 l8,-7" | ||
android:valueType="pathType" /> | ||
</set> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<animated-vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:drawable="@drawable/checkmark"> | ||
<target | ||
android:name="tick" | ||
android:animation="@anim/checkmark_animation"/> | ||
</animated-vector> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="24dp" | ||
android:height="24dp" | ||
android:viewportHeight="24.0" | ||
android:viewportWidth="24.0"> | ||
|
||
<group android:name="background"> | ||
<path | ||
android:name="circle" | ||
android:fillColor="@color/colorAccent" | ||
android:pathData="M12,12m-10,0a10,10 0,1 1,20 0a10,10 0,1 1,-20 0" /> | ||
</group> | ||
<group android:name="check"> | ||
<path | ||
android:name="tick" | ||
android:pathData="M6,11 l0,0 l0,0" | ||
android:strokeColor="#FFF" | ||
android:strokeWidth="1" /> | ||
</group> | ||
</vector> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<RelativeLayout | ||
xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:background="@android:color/white" | ||
tools:context="org.literacyapp.startguide.content.FinalActivity"> | ||
|
||
<ImageView | ||
android:id="@+id/final_checkmark" | ||
android:visibility="gone" | ||
android:layout_width="256dp" | ||
android:layout_height="256dp" | ||
android:layout_centerInParent="true" | ||
android:src="@drawable/animated_checkmark" | ||
tools:visibility="visible"/> | ||
</RelativeLayout> |
File renamed without changes.
File renamed without changes.
Binary file not shown.
File renamed without changes.
File renamed without changes.