Skip to content

Commit dfb63c4

Browse files
committed
first real commit
1 parent a702b8d commit dfb63c4

File tree

66 files changed

+1751
-5
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+1751
-5
lines changed

.gitignore

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,7 @@ captures/
3434

3535
# Intellij
3636
*.iml
37-
.idea/workspace.xml
38-
.idea/tasks.xml
39-
.idea/gradle.xml
40-
.idea/dictionaries
41-
.idea/libraries
37+
.idea/
4238

4339
# Keystore files
4440
*.jks

app/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

app/build.gradle

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
apply plugin: 'com.android.application'
2+
apply plugin: 'com.google.firebase.firebase-perf'
3+
apply plugin: 'io.fabric'
4+
5+
repositories {
6+
maven { url 'https://maven.fabric.io/public' }
7+
}
8+
9+
android {
10+
signingConfigs {
11+
release {
12+
keyAlias 'signingKey'
13+
keyPassword ANDROID_KEY_PASSWORD
14+
storeFile file('G:/My Drive/Android App Development/TaskKeeper/keys.jks')
15+
storePassword ANDROID_STORE_PASSWORD
16+
}
17+
}
18+
compileSdkVersion 25
19+
buildToolsVersion "25.0.3"
20+
defaultConfig {
21+
applicationId "tech.akpmakes.android.taskkeeper"
22+
minSdkVersion 15
23+
targetSdkVersion 25
24+
versionCode 2
25+
versionName "1.0"
26+
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
27+
signingConfig signingConfigs.release
28+
}
29+
buildTypes {
30+
release {
31+
minifyEnabled false
32+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
33+
signingConfig signingConfigs.release
34+
}
35+
debug {
36+
signingConfig signingConfigs.release
37+
}
38+
}
39+
productFlavors {
40+
}
41+
}
42+
43+
dependencies {
44+
compile fileTree(include: ['*.jar'], dir: 'libs')
45+
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
46+
exclude group: 'com.android.support', module: 'support-annotations'
47+
})
48+
compile('com.crashlytics.sdk.android:crashlytics:2.6.8@aar') {
49+
transitive = true;
50+
}
51+
compile 'com.android.support:appcompat-v7:25.3.1'
52+
compile 'com.android.support.constraint:constraint-layout:1.0.2'
53+
compile 'com.google.firebase:firebase-perf:11.0.2'
54+
compile 'com.google.firebase:firebase-auth:11.0.2'
55+
compile 'com.google.firebase:firebase-database:11.0.2'
56+
compile 'com.google.android.gms:play-services-auth:11.0.2'
57+
compile 'com.android.support:design:25.3.1'
58+
compile 'com.android.support:support-v4:25.3.1'
59+
testCompile 'junit:junit:4.12'
60+
}
61+
62+
apply plugin: 'com.google.gms.google-services'

app/proguard-rules.pro

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Add project specific ProGuard rules here.
2+
# By default, the flags in this file are appended to flags specified
3+
# in C:\Users\Austin\AppData\Local\Android\Sdk/tools/proguard/proguard-android.txt
4+
# You can edit the include path and order by changing the proguardFiles
5+
# directive in build.gradle.
6+
#
7+
# For more details, see
8+
# http://developer.android.com/guide/developing/tools/proguard.html
9+
10+
# Add any project specific keep options here:
11+
12+
# If your project uses WebView with JS, uncomment the following
13+
# and specify the fully qualified class name to the JavaScript interface
14+
# class:
15+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16+
# public *;
17+
#}
18+
19+
# Uncomment this to preserve the line number information for
20+
# debugging stack traces.
21+
#-keepattributes SourceFile,LineNumberTable
22+
23+
# If you keep the line number information, uncomment this to
24+
# hide the original source file name.
25+
#-renamesourcefileattribute SourceFile
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
package tech.akpmakes.android.taskkeeper;
2+
3+
import android.content.Context;
4+
import android.support.test.InstrumentationRegistry;
5+
import android.support.test.runner.AndroidJUnit4;
6+
7+
import org.junit.Test;
8+
import org.junit.runner.RunWith;
9+
10+
import static org.junit.Assert.*;
11+
12+
/**
13+
* Instrumentation test, which will execute on an Android device.
14+
*
15+
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
16+
*/
17+
@RunWith(AndroidJUnit4.class)
18+
public class ExampleInstrumentedTest {
19+
@Test
20+
public void useAppContext() throws Exception {
21+
// Context of the app under test.
22+
Context appContext = InstrumentationRegistry.getTargetContext();
23+
24+
assertEquals("tech.akpmakes.android.taskkeeper", appContext.getPackageName());
25+
}
26+
}

app/src/main/AndroidManifest.xml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
package="tech.akpmakes.android.taskkeeper">
4+
5+
<uses-permission android:name="android.permission.INTERNET" />
6+
<!-- To auto-complete the email text field in the login form with the user's emails -->
7+
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
8+
<uses-permission android:name="android.permission.READ_PROFILE" />
9+
<uses-permission android:name="android.permission.READ_CONTACTS" />
10+
11+
<application
12+
android:name=".WhenApp"
13+
android:allowBackup="true"
14+
android:icon="@mipmap/ic_launcher"
15+
android:label="@string/app_name"
16+
android:roundIcon="@mipmap/ic_launcher_round"
17+
android:supportsRtl="true"
18+
android:theme="@style/AppTheme">
19+
<meta-data
20+
android:name="io.fabric.ApiKey"
21+
android:value="d70cc0c0eef2fdf1a924fd75b1e4114aa5747d69" />
22+
23+
<activity android:name=".MainActivity" />
24+
<activity
25+
android:name=".LoginActivity"
26+
android:label="@string/title_activity_login"
27+
android:parentActivityName=".MainActivity">
28+
<meta-data
29+
android:name="android.support.PARENT_ACTIVITY"
30+
android:value="tech.akpmakes.android.taskkeeper.MainActivity" />
31+
</activity>
32+
<activity
33+
android:name=".WelcomeActivity"
34+
android:theme="@style/AppTheme.NoActionBar">
35+
<intent-filter>
36+
<action android:name="android.intent.action.MAIN" />
37+
38+
<category android:name="android.intent.category.LAUNCHER" />
39+
</intent-filter>
40+
</activity>
41+
<activity
42+
android:name=".ProfileActivity"
43+
android:label="@string/title_activity_profile"
44+
android:parentActivityName=".MainActivity"
45+
android:theme="@style/AppTheme.NoActionBar">
46+
<meta-data
47+
android:name="android.support.PARENT_ACTIVITY"
48+
android:value="tech.akpmakes.android.taskkeeper.MainActivity" />
49+
</activity>
50+
</application>
51+
52+
</manifest>

app/src/main/ic_launcher-web.png

24.5 KB
Loading
39.9 KB
Loading
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
package tech.akpmakes.android.taskkeeper;
2+
3+
import android.app.Activity;
4+
import android.app.Dialog;
5+
import android.content.DialogInterface;
6+
import android.os.Bundle;
7+
import android.support.v4.app.DialogFragment;
8+
import android.support.v7.app.AlertDialog;
9+
import android.view.LayoutInflater;
10+
import android.view.View;
11+
import android.widget.EditText;
12+
13+
public class AddItemDialog extends DialogFragment {
14+
/* The activity that creates an instance of this dialog fragment must
15+
* implement this interface in order to receive event callbacks.
16+
* Each method passes the DialogFragment in case the host needs to query it. */
17+
public interface AddItemDialogListener {
18+
public void onValue(String name);
19+
}
20+
21+
// Use this instance of the interface to deliver action events
22+
AddItemDialogListener mListener;
23+
24+
@Override
25+
public void onAttach(Activity activity) {
26+
super.onAttach(activity);
27+
// Verify that the host activity implements the callback interface
28+
try {
29+
// Instantiate the AddItemDialogListener so we can send events to the host
30+
mListener = (AddItemDialogListener) activity;
31+
} catch (ClassCastException e) {
32+
// The activity doesn't implement the interface, throw exception
33+
throw new ClassCastException(activity.toString()
34+
+ " must implement NoticeDialogListener");
35+
}
36+
}
37+
38+
@Override
39+
public Dialog onCreateDialog(Bundle savedInstanceState) {
40+
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
41+
// Get the layout inflater
42+
LayoutInflater inflater = getActivity().getLayoutInflater();
43+
final View view = inflater.inflate(R.layout.dialog_add_item, null);
44+
45+
// Inflate and set the layout for the dialog
46+
// Pass null as the parent view because its going in the dialog layout
47+
builder.setView(view)
48+
// Add action buttons
49+
.setPositiveButton(R.string.add_item, new DialogInterface.OnClickListener() {
50+
@Override
51+
public void onClick(DialogInterface dialog, int id) {
52+
mListener.onValue(((EditText) view.findViewById(R.id.item_name)).getText().toString());
53+
}
54+
})
55+
.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {
56+
public void onClick(DialogInterface dialog, int id) {
57+
AddItemDialog.this.getDialog().cancel();
58+
}
59+
});
60+
return builder.create();
61+
}
62+
}

0 commit comments

Comments
 (0)