Skip to content

Commit

Permalink
Merge pull request #4 from jogrimst/master
Browse files Browse the repository at this point in the history
#3 Add TypeMissingNumber activity
  • Loading branch information
literacyapp authored Jun 21, 2017
2 parents a294bd9 + 96632f1 commit 31756d0
Show file tree
Hide file tree
Showing 7 changed files with 101 additions and 28 deletions.
2 changes: 1 addition & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</activity>

<activity
android:name="org.literacyapp.missing_number.MissingNumberActivity">
android:name="org.literacyapp.missing_number.TypeMissingNumberActivity">
</activity>
</application>
</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ protected void onStart() {

ContentProvider.initializeDb(this);

Intent intent = new Intent(this, MissingNumberActivity.class);
Intent intent = new Intent(this, TypeMissingNumberActivity.class);
startActivity(intent);

finish();
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package org.literacyapp.missing_number;

import android.media.MediaPlayer;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;

import org.literacyapp.contentprovider.ContentProvider;
import org.literacyapp.contentprovider.model.content.Number;

import java.util.List;

public class TypeMissingNumberActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
Log.i(getClass().getName(), "onCreate");
super.onCreate(savedInstanceState);

setContentView(R.layout.activity_type_missing_number);

List<Number> unlockedNumbers = ContentProvider.getUnlockedNumbers();
Log.i(getClass().getName(), "unlockedNumbers: " + unlockedNumbers);

MediaPlayer mediaPlayer = MediaPlayer.create(getApplicationContext(), R.raw.activity_instruction_number_typing);
mediaPlayer.start();
}
}
10 changes: 0 additions & 10 deletions app/src/main/res/layout/activity_missing_number.xml

This file was deleted.

71 changes: 71 additions & 0 deletions app/src/main/res/layout/activity_type_missing_number.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:gravity="center">


<android.support.v7.widget.CardView
android:id="@+id/cardView1"
android:layout_width="256dp"
android:layout_height="wrap_content"
app:contentPaddingTop="@dimen/activity_vertical_margin"
app:contentPaddingRight="@dimen/activity_horizontal_margin"
app:contentPaddingBottom="@dimen/activity_vertical_margin"
app:contentPaddingLeft="@dimen/activity_horizontal_margin">

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="1"
android:textSize="72sp" />
</android.support.v7.widget.CardView>

<android.support.v7.widget.CardView
android:id="@+id/cardView2"
android:layout_width="256dp"
android:layout_height="wrap_content"
app:contentPaddingTop="@dimen/activity_vertical_margin"
app:contentPaddingRight="@dimen/activity_horizontal_margin"
app:contentPaddingBottom="@dimen/activity_vertical_margin"
app:contentPaddingLeft="@dimen/activity_horizontal_margin"
android:layout_marginLeft="@dimen/activity_horizontal_margin">

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="2"
android:textSize="72sp" />
</android.support.v7.widget.CardView>

<android.support.v7.widget.CardView
android:id="@+id/cardView3"
android:layout_width="256dp"
android:layout_height="wrap_content"
app:contentPaddingTop="@dimen/activity_vertical_margin"
app:contentPaddingRight="@dimen/activity_horizontal_margin"
app:contentPaddingBottom="@dimen/activity_vertical_margin"
app:contentPaddingLeft="@dimen/activity_horizontal_margin"
android:layout_marginLeft="@dimen/activity_horizontal_margin">

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="3"
android:textSize="72sp"
android:visibility="invisible" />
<EditText android:id="@+id/text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:elegantTextHeight="true"
android:textSize="72sp" />
</android.support.v7.widget.CardView>
</LinearLayout>
Binary file not shown.

0 comments on commit 31756d0

Please sign in to comment.