I don't know what I'm doing :D
2
.idea/misc.xml
generated
@@ -37,7 +37,7 @@
|
|||||||
<ConfirmationsSetting value="0" id="Add" />
|
<ConfirmationsSetting value="0" id="Add" />
|
||||||
<ConfirmationsSetting value="0" id="Remove" />
|
<ConfirmationsSetting value="0" id="Remove" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="JDK" project-jdk-type="JavaSDK">
|
||||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectType">
|
<component name="ProjectType">
|
||||||
|
|||||||
2
.idea/modules.xml
generated
@@ -2,8 +2,8 @@
|
|||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="ProjectModuleManager">
|
<component name="ProjectModuleManager">
|
||||||
<modules>
|
<modules>
|
||||||
<module fileurl="file://$PROJECT_DIR$/Stoofnogaan.iml" filepath="$PROJECT_DIR$/Stoofnogaan.iml" />
|
|
||||||
<module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" />
|
<module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" />
|
||||||
|
<module fileurl="file://$PROJECT_DIR$/stoofnogaan.iml" filepath="$PROJECT_DIR$/stoofnogaan.iml" />
|
||||||
</modules>
|
</modules>
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
package be.mathsaey.stoofnogaan;
|
|
||||||
|
|
||||||
import android.content.Context;
|
|
||||||
import android.support.test.InstrumentationRegistry;
|
|
||||||
import android.support.test.runner.AndroidJUnit4;
|
|
||||||
|
|
||||||
import org.junit.Test;
|
|
||||||
import org.junit.runner.RunWith;
|
|
||||||
|
|
||||||
import static org.junit.Assert.*;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Instrumentation test, which will execute on an Android device.
|
|
||||||
*
|
|
||||||
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
|
|
||||||
*/
|
|
||||||
@RunWith(AndroidJUnit4.class)
|
|
||||||
public class ExampleInstrumentedTest {
|
|
||||||
@Test
|
|
||||||
public void useAppContext() throws Exception {
|
|
||||||
// Context of the app under test.
|
|
||||||
Context appContext = InstrumentationRegistry.getTargetContext();
|
|
||||||
|
|
||||||
assertEquals("be.mathsaey.stoofnogaan", appContext.getPackageName());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -4,9 +4,9 @@
|
|||||||
|
|
||||||
<application
|
<application
|
||||||
android:allowBackup="true"
|
android:allowBackup="true"
|
||||||
android:icon="@mipmap/ic_launcher"
|
android:icon="@mipmap/stoofinbrand_icon"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:roundIcon="@mipmap/ic_launcher_round"
|
android:roundIcon="@mipmap/stoofinbrand_icon"
|
||||||
android:supportsRtl="true"
|
android:supportsRtl="true"
|
||||||
android:theme="@style/AppTheme">
|
android:theme="@style/AppTheme">
|
||||||
<activity android:name=".MainActivity">
|
<activity android:name=".MainActivity">
|
||||||
|
|||||||
BIN
app/src/main/assets/fonts/Oswald.ttf
Normal file
@@ -2,11 +2,13 @@ package be.mathsaey.stoofnogaan;
|
|||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
import android.content.res.AssetManager;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.Menu;
|
import android.view.Menu;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
|
import android.widget.RelativeLayout;
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
import java.io.FileInputStream;
|
import java.io.FileInputStream;
|
||||||
|
|||||||
@@ -1,11 +1,14 @@
|
|||||||
package be.mathsaey.stoofnogaan;
|
package be.mathsaey.stoofnogaan;
|
||||||
|
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
import android.view.KeyEvent;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
import android.view.inputmethod.EditorInfo;
|
||||||
import android.widget.CheckBox;
|
import android.widget.CheckBox;
|
||||||
import android.widget.EditText;
|
import android.widget.EditText;
|
||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
class TaskView extends LinearLayout {
|
class TaskView extends LinearLayout {
|
||||||
private MainActivity parent;
|
private MainActivity parent;
|
||||||
@@ -50,16 +53,17 @@ class TaskView extends LinearLayout {
|
|||||||
private void addTextListeners() {
|
private void addTextListeners() {
|
||||||
// When done is clicked...
|
// When done is clicked...
|
||||||
// Or not because that is when things start to go boom
|
// Or not because that is when things start to go boom
|
||||||
// textView.setOnEditorActionListener(new TextView.OnEditorActionListener() {
|
textView.setOnEditorActionListener(new TextView.OnEditorActionListener() {
|
||||||
// @Override
|
@Override
|
||||||
// public boolean onEditorAction(TextView textView, int i, KeyEvent keyEvent) {
|
public boolean onEditorAction(TextView textView, int i, KeyEvent keyEvent) {
|
||||||
// if (i == EditorInfo.IME_ACTION_DONE && TaskView.this.isEmpty()) {
|
if (i == EditorInfo.IME_ACTION_DONE && TaskView.this.isEmpty()) {
|
||||||
// parent.deleteTask(TaskView.this);
|
parent.deleteTask(TaskView.this);
|
||||||
// return true;
|
return true;
|
||||||
// }
|
}
|
||||||
// return false;
|
return false;
|
||||||
// }
|
}
|
||||||
// });
|
});
|
||||||
|
|
||||||
// Or when we lose focus
|
// Or when we lose focus
|
||||||
textView.setOnFocusChangeListener(new OnFocusChangeListener() {
|
textView.setOnFocusChangeListener(new OnFocusChangeListener() {
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
31
app/src/main/res/drawable/button.xml
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:shape="rectangle" >
|
||||||
|
|
||||||
|
<item>
|
||||||
|
<shape>
|
||||||
|
<!-- set the shadow color here -->
|
||||||
|
<stroke
|
||||||
|
android:width="2dp"
|
||||||
|
android:color="#3e1a01" />
|
||||||
|
|
||||||
|
<padding
|
||||||
|
android:bottom="2dp"
|
||||||
|
android:left="0dp"
|
||||||
|
android:right="0dp"
|
||||||
|
android:top="0dp" />
|
||||||
|
|
||||||
|
<corners android:radius="3dp" />
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
|
||||||
|
<!-- Background -->
|
||||||
|
|
||||||
|
<item>
|
||||||
|
<shape>
|
||||||
|
<solid android:color="@color/colorBrown" />
|
||||||
|
<corners android:radius="3dp" />
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
|
||||||
|
</layer-list>
|
||||||
31
app/src/main/res/drawable/drop_shadow.xml
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:shape="rectangle" >
|
||||||
|
|
||||||
|
<item>
|
||||||
|
<shape>
|
||||||
|
<!-- set the shadow color here -->
|
||||||
|
<stroke
|
||||||
|
android:width="2dp"
|
||||||
|
android:color="@color/colorDropShadow" />
|
||||||
|
|
||||||
|
<padding
|
||||||
|
android:bottom="2dp"
|
||||||
|
android:left="0dp"
|
||||||
|
android:right="2dp"
|
||||||
|
android:top="0dp" />
|
||||||
|
|
||||||
|
<corners android:radius="3dp" />
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
|
||||||
|
<!-- Background -->
|
||||||
|
|
||||||
|
<item>
|
||||||
|
<shape>
|
||||||
|
<solid android:color="@color/colorWhite" />
|
||||||
|
<corners android:radius="3dp" />
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
|
||||||
|
</layer-list>
|
||||||
@@ -5,20 +5,40 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
|
android:background="@color/colorLight"
|
||||||
|
android:padding="52dp"
|
||||||
|
android:paddingTop="102dp"
|
||||||
tools:context="be.mathsaey.stoofnogaan.MainActivity">
|
tools:context="be.mathsaey.stoofnogaan.MainActivity">
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@drawable/drop_shadow"
|
||||||
|
android:paddingBottom="16dp"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/tasks"
|
android:id="@+id/tasks"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical"
|
||||||
|
android:padding="16dp"
|
||||||
|
android:layout_above="@+id/addButton">
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/addButton"
|
android:id="@+id/addButton"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:onClick="onNewTaskButtonClick"
|
||||||
android:text="@string/task_new"
|
android:text="@string/task_new"
|
||||||
android:onClick="onNewTaskButtonClick"/>
|
android:background="@drawable/button"
|
||||||
|
android:layout_alignParentBottom="true"
|
||||||
|
android:paddingLeft="52dp"
|
||||||
|
android:paddingRight="52dp"
|
||||||
|
android:layout_centerHorizontal="true">
|
||||||
|
</Button>
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|||||||
@@ -9,12 +9,15 @@
|
|||||||
android:id="@+id/checkBox"
|
android:id="@+id/checkBox"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@null"/>
|
android:text="@null">
|
||||||
|
</CheckBox>
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/textView"
|
android:id="@+id/textView"
|
||||||
android:inputType="text"
|
android:inputType="text"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:hint="@string/task_hint"/>
|
android:hint="@string/task_hint">
|
||||||
|
</EditText>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<menu
|
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"/>
|
|
||||||
<item
|
<item
|
||||||
android:title="@string/settings_text"
|
android:title="@string/settings_text"
|
||||||
android:icon="@android:drawable/ic_menu_preferences"
|
android:icon="@mipmap/stoofinbrand_icon"
|
||||||
android:showAsAction="always"/>
|
android:showAsAction="always">
|
||||||
|
</item>
|
||||||
</menu>
|
</menu>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 4.1 KiB |
BIN
app/src/main/res/mipmap-hdpi/stoofinbrand_icon.png
Normal file
|
After Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 2.5 KiB |
BIN
app/src/main/res/mipmap-mdpi/stoofinbrand_icon.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 4.7 KiB |
|
Before Width: | Height: | Size: 6.0 KiB |
BIN
app/src/main/res/mipmap-xhdpi/stoofinbrand_icon.png
Normal file
|
After Width: | Height: | Size: 5.5 KiB |
|
Before Width: | Height: | Size: 7.5 KiB |
|
Before Width: | Height: | Size: 9.8 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/stoofinbrand_icon.png
Normal file
|
After Width: | Height: | Size: 9.6 KiB |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 14 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/stoofinbrand_icon.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
@@ -1,6 +1,9 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<color name="colorPrimary">#3F51B5</color>
|
<color name="colorWhite">#FFF</color>
|
||||||
<color name="colorPrimaryDark">#303F9F</color>
|
<color name="colorLight">#FFF8E1</color>
|
||||||
<color name="colorAccent">#FF4081</color>
|
<color name="colorOrange">#FF7F2A</color>
|
||||||
|
<color name="colorTeak">#5FD3BC</color>
|
||||||
|
<color name="colorDropShadow">#E6DDBF</color>
|
||||||
|
<color name="colorBrown">#552200</color>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<resources>
|
<resources>
|
||||||
|
|
||||||
<!-- Base application theme. -->
|
<!-- Base application theme. -->
|
||||||
<style name="AppTheme" parent="android:Theme.Material.Light.DarkActionBar">
|
<style name="AppTheme" parent="android:Theme.Holo.NoActionBar">
|
||||||
<!-- Customize your theme here. -->
|
<!-- Customize your theme here. -->
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|||||||
BIN
app/src/main/stoofinbrand_icon-web.png
Normal file
|
After Width: | Height: | Size: 68 KiB |
@@ -1,17 +0,0 @@
|
|||||||
package be.mathsaey.stoofnogaan;
|
|
||||||
|
|
||||||
import org.junit.Test;
|
|
||||||
|
|
||||||
import static org.junit.Assert.*;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Example local unit test, which will execute on the development machine (host).
|
|
||||||
*
|
|
||||||
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
|
|
||||||
*/
|
|
||||||
public class ExampleUnitTest {
|
|
||||||
@Test
|
|
||||||
public void addition_isCorrect() throws Exception {
|
|
||||||
assertEquals(4, 2 + 2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||