Skip to content

Commit

Permalink
v2 complete
Browse files Browse the repository at this point in the history
  • Loading branch information
Makamu Evans committed Apr 6, 2018
1 parent 32ff6ba commit 7bdf4d1
Show file tree
Hide file tree
Showing 14 changed files with 162 additions and 108 deletions.
2 changes: 1 addition & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<application
android:name=".model.Sugar"
android:allowBackup="true"
android:icon="@mipmap/logo"
android:icon="@drawable/my_checkv2"
android:label="@string/app_name"
android:roundIcon="@drawable/logo"
android:supportsRtl="true"
Expand Down
12 changes: 5 additions & 7 deletions app/src/main/java/com/elm/mycheck/login/NotificationBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ private void createNotification(String message) {

//prepare notification
NotificationCompat.Builder builder = new NotificationCompat.Builder(this);
builder.setSmallIcon(R.mipmap.logo)
builder.setSmallIcon(R.drawable.my_checkv2)
.setContentTitle("Alarm")
.setDefaults(Notification.DEFAULT_ALL)
.setPriority(Notification.PRIORITY_MAX)
Expand Down Expand Up @@ -591,7 +591,6 @@ public void onFinish() {
}.start();
}


private void cancelCountDown() {
Log.e(TAG, "cancelCountDown Called");
if (interval != null) {
Expand Down Expand Up @@ -641,7 +640,6 @@ public boolean dispatchKeyEvent(KeyEvent event) {
}
}


private void boxPuzzle() {
//initialize
info_layout.setVisibility(View.GONE);
Expand Down Expand Up @@ -1045,7 +1043,7 @@ public void onClick(View view) {
sequence_counterr.setText(ans_message);
sequence_message.setText("Success!");
sequence_message.setTextColor(getResources().getColor(R.color.basil));
if (ansCount == (puzzle_level-1))
if (ansCount == (puzzle_level))
successSequence();
} else {
imageCount = 0;
Expand All @@ -1072,7 +1070,7 @@ public void onClick(View view) {
sequence_counterr.setText(ans_message);
sequence_message.setText("Success!");
sequence_message.setTextColor(getResources().getColor(R.color.basil));
if (ansCount == (puzzle_level-1))
if (ansCount == (puzzle_level))
successSequence();
//success
} else {
Expand Down Expand Up @@ -1101,7 +1099,7 @@ public void onClick(View view) {
sequence_counterr.setText(ans_message);
sequence_message.setText("Success!");
sequence_message.setTextColor(getResources().getColor(R.color.basil));
if (ansCount == (puzzle_level-1))
if (ansCount == (puzzle_level))
successSequence();
} else {
imageCount = 0;
Expand Down Expand Up @@ -1129,7 +1127,7 @@ public void onClick(View view) {
sequence_counterr.setText(ans_message);
sequence_message.setText("Success!");
sequence_message.setTextColor(getResources().getColor(R.color.basil));
if (ansCount == (puzzle_level-1))
if (ansCount == (puzzle_level))
successSequence();
} else {
imageCount = 0;
Expand Down
4 changes: 4 additions & 0 deletions app/src/main/java/com/elm/mycheck/login/SplashScreen.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,16 @@
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.Window;
import android.view.WindowManager;

public class SplashScreen extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
this.requestWindowFeature(Window.FEATURE_NO_TITLE);
this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
Intent intent = new Intent(this, Navigation.class);
startActivity(intent);
finish();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,14 +119,21 @@ public void onReceive(Context context, Intent intent) {
Reminder reminder = Reminder.findById(Reminder.class, alarmReminder.getReminderid());
if (reminder != null){
if (reminder.getStatus()) {
SimpleDateFormat dayFormat = new SimpleDateFormat("EEEE", Locale.ENGLISH);
Calendar calendar = Calendar.getInstance();
String weekDay = dayFormat.format(calendar.getTime());
if (reminder.getRepeat().contains(weekDay)) {
if (reminder.getRepeat() != null){
SimpleDateFormat dayFormat = new SimpleDateFormat("EEEE", Locale.ENGLISH);
Calendar calendar = Calendar.getInstance();
String weekDay = dayFormat.format(calendar.getTime());
if (reminder.getRepeat().contains(weekDay)) {
alarmReminder.setActive(true);
alarmReminder.save();
reminderAlarms(nTitle, context);
}
}else {
alarmReminder.setActive(true);
alarmReminder.save();
reminderAlarms(nTitle, context);
}

}
}
} else if (nId == Constants.todoReminder){
Expand Down Expand Up @@ -155,7 +162,7 @@ public void reminderAlarms(String nTitle, Context context) {

//prepare notification
NotificationCompat.Builder builder = new NotificationCompat.Builder(context);
builder.setSmallIcon(R.mipmap.logo)
builder.setSmallIcon(R.drawable.my_checkv2)
.setContentTitle("myCheck: New Reminder(s)!")
.setDefaults(Notification.DEFAULT_ALL)
.setPriority(Notification.PRIORITY_MAX)
Expand Down
6 changes: 6 additions & 0 deletions app/src/main/res/anim/slide_in_left.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>

<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate android:fromXDelta="-100%p" android:toXDelta="0"
android:duration="@android:integer/config_mediumAnimTime"/>
</set>
6 changes: 6 additions & 0 deletions app/src/main/res/anim/slide_in_right.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>

<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate android:fromXDelta="100%p" android:toXDelta="0"
android:duration="@android:integer/config_mediumAnimTime"/>
</set>
5 changes: 5 additions & 0 deletions app/src/main/res/anim/slide_out_left.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate android:fromXDelta="0" android:toXDelta="-100%p"
android:duration="@android:integer/config_mediumAnimTime"/>
</set>
6 changes: 6 additions & 0 deletions app/src/main/res/anim/slide_out_right.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>

<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate android:fromXDelta="0" android:toXDelta="100%p"
android:duration="@android:integer/config_mediumAnimTime"/>
</set>
Binary file added app/src/main/res/drawable/my_checkv2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion app/src/main/res/drawable/splash.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<item>
<bitmap
android:gravity="center"
android:src="@drawable/flat_alarm"/>
android:src="@drawable/my_checkv2"/>
</item>

</layer-list>
197 changes: 104 additions & 93 deletions app/src/main/res/layout/activity_add_note.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical">

<LinearLayout
Expand Down Expand Up @@ -35,9 +36,10 @@
android:layout_weight="0.5">

<TextView
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/add_category"
android:gravity="center"
android:text="Add Category"
android:layout_margin="10dp"
/>
Expand Down Expand Up @@ -85,104 +87,113 @@
</LinearLayout>
</LinearLayout>

<HorizontalScrollView android:id="@+id/tools"
<LinearLayout
android:layout_width="match_parent"
android:layout_alignParentBottom="true"
android:layout_height="wrap_content"
android:scrollbars="none">

<LinearLayout android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_gravity="center"
android:background="?attr/colorPrimary"
android:layout_height="wrap_content">
android:orientation="vertical"
android:gravity="center"
android:id="@+id/tools"
android:layout_height="wrap_content">

<ImageButton android:id="@+id/editor_undo"
android:contentDescription="@null"
android:layout_width="48dp"
android:layout_height="48dp"
android:src="@mipmap/ic_action_undo"
android:scaleType="center"
android:background="?android:selectableItemBackground">
</ImageButton>

<ImageButton android:id="@+id/editor_redo"
android:contentDescription="@null"
android:layout_width="48dp"
android:layout_height="48dp"
android:src="@mipmap/ic_action_redo"
android:scaleType="center"
android:background="?android:selectableItemBackground">
</ImageButton>

<ImageButton android:id="@+id/editor_bold"
android:contentDescription="@null"
android:layout_width="48dp"
android:layout_height="48dp"
android:src="@mipmap/ic_format_bold"
android:scaleType="center"
android:background="?android:selectableItemBackground">
</ImageButton>

<ImageButton android:id="@+id/editor_italic"
android:contentDescription="@null"
android:layout_width="48dp"
android:layout_height="48dp"
android:src="@mipmap/ic_format_italic"
android:scaleType="center"
android:background="?android:selectableItemBackground">
</ImageButton>

<ImageButton android:id="@+id/editor_underline"
android:contentDescription="@null"
android:layout_width="48dp"
android:layout_height="48dp"
android:src="@mipmap/ic_format_underline"
android:scaleType="center"
android:background="?android:selectableItemBackground">
</ImageButton>

<ImageButton android:id="@+id/strike_through"
android:contentDescription="@null"
android:layout_width="48dp"
android:layout_height="48dp"
android:src="@mipmap/ic_format_strikethrough"
android:scaleType="center"
android:background="?android:selectableItemBackground">
</ImageButton>

<ImageButton android:id="@+id/editor_ordered"
android:contentDescription="@null"
android:layout_width="48dp"
android:layout_height="48dp"
android:src="@mipmap/ic_number"
android:scaleType="center"
android:background="?android:selectableItemBackground">
</ImageButton>

<ImageButton android:id="@+id/editor_bullets"
android:contentDescription="@null"
android:layout_width="48dp"
android:layout_height="48dp"
android:src="@mipmap/ic_format_bullet"
android:scaleType="center"
android:background="?android:selectableItemBackground">
</ImageButton>


<ImageButton android:id="@+id/editor_quote"
android:contentDescription="@null"
android:layout_width="48dp"
android:layout_height="48dp"
android:src="@mipmap/ic_format_quote"
android:scaleType="center"
android:background="?android:selectableItemBackground">
</ImageButton>

<HorizontalScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorPrimary"
android:scrollbars="none">

</LinearLayout>
<LinearLayout
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content">

</HorizontalScrollView>
<ImageButton android:id="@+id/editor_undo"
android:contentDescription="@null"
android:layout_width="48dp"
android:layout_height="48dp"
android:src="@mipmap/ic_action_undo"
android:scaleType="center"
android:background="?android:selectableItemBackground">
</ImageButton>

<ImageButton android:id="@+id/editor_redo"
android:contentDescription="@null"
android:layout_width="48dp"
android:layout_height="48dp"
android:src="@mipmap/ic_action_redo"
android:scaleType="center"
android:background="?android:selectableItemBackground">
</ImageButton>

<ImageButton android:id="@+id/editor_bold"
android:contentDescription="@null"
android:layout_width="48dp"
android:layout_height="48dp"
android:src="@mipmap/ic_format_bold"
android:scaleType="center"
android:background="?android:selectableItemBackground">
</ImageButton>

<ImageButton android:id="@+id/editor_italic"
android:contentDescription="@null"
android:layout_width="48dp"
android:layout_height="48dp"
android:src="@mipmap/ic_format_italic"
android:scaleType="center"
android:background="?android:selectableItemBackground">
</ImageButton>

<ImageButton android:id="@+id/editor_underline"
android:contentDescription="@null"
android:layout_width="48dp"
android:layout_height="48dp"
android:src="@mipmap/ic_format_underline"
android:scaleType="center"
android:background="?android:selectableItemBackground">
</ImageButton>

<ImageButton android:id="@+id/strike_through"
android:contentDescription="@null"
android:layout_width="48dp"
android:layout_height="48dp"
android:src="@mipmap/ic_format_strikethrough"
android:scaleType="center"
android:background="?android:selectableItemBackground">
</ImageButton>

<ImageButton android:id="@+id/editor_ordered"
android:contentDescription="@null"
android:layout_width="48dp"
android:layout_height="48dp"
android:src="@mipmap/ic_number"
android:scaleType="center"
android:background="?android:selectableItemBackground">
</ImageButton>

<ImageButton android:id="@+id/editor_bullets"
android:contentDescription="@null"
android:layout_width="48dp"
android:layout_height="48dp"
android:src="@mipmap/ic_format_bullet"
android:scaleType="center"
android:background="?android:selectableItemBackground">
</ImageButton>


<ImageButton android:id="@+id/editor_quote"
android:contentDescription="@null"
android:layout_width="48dp"
android:layout_height="48dp"
android:src="@mipmap/ic_format_quote"
android:scaleType="center"
android:background="?android:selectableItemBackground">
</ImageButton>


</LinearLayout>

</HorizontalScrollView>
</LinearLayout>

<RelativeLayout
android:layout_width="match_parent"
Expand Down
Loading

0 comments on commit 7bdf4d1

Please sign in to comment.