Skip to content

Commit 7b16883

Browse files
committed
commit_added
2 parents 2a6d359 + 0b02d77 commit 7b16883

19 files changed

+906
-20
lines changed

.gitignore

Lines changed: 183 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,185 @@
1+
# Created by https://www.gitignore.io/api/macos,linux,android,windows,intellij
2+
3+
### Android ###
4+
# Built application files
5+
*.apk
6+
*.ap_
7+
8+
# Files for the ART/Dalvik VM
9+
*.dex
10+
11+
# Java class files
12+
*.class
13+
14+
# Generated files
15+
bin/
16+
gen/
17+
out/
18+
19+
# Gradle files
20+
.gradle/
21+
build/
22+
23+
# Local configuration file (sdk path, etc)
24+
local.properties
25+
26+
# Proguard folder generated by Eclipse
27+
proguard/
28+
29+
# Log Files
30+
*.log
31+
32+
# Android Studio Navigation editor temp files
33+
.navigation/
34+
35+
# Android Studio captures folder
36+
captures/
37+
38+
# Intellij
139
*.iml
2-
.gradle
3-
/local.properties
4-
/.idea/workspace.xml
5-
/.idea/libraries
6-
.DS_Store
7-
/build
8-
/captures
40+
.idea/workspace.xml
41+
.idea/tasks.xml
42+
.idea/gradle.xml
43+
.idea/dictionaries
44+
.idea/libraries
45+
46+
# External native build folder generated in Android Studio 2.2 and later
947
.externalNativeBuild
48+
49+
# Freeline
50+
freeline.py
51+
freeline/
52+
freeline_project_description.json
53+
54+
### Android Patch ###
55+
gen-external-apklibs
56+
57+
### Intellij ###
58+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
59+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
60+
61+
# User-specific stuff:
62+
.idea/**/workspace.xml
63+
.idea/**/tasks.xml
64+
65+
# Sensitive or high-churn files:
66+
.idea/**/dataSources/
67+
.idea/**/dataSources.ids
68+
.idea/**/dataSources.xml
69+
.idea/**/dataSources.local.xml
70+
.idea/**/sqlDataSources.xml
71+
.idea/**/dynamic.xml
72+
.idea/**/uiDesigner.xml
73+
74+
# Gradle:
75+
.idea/**/gradle.xml
76+
.idea/**/libraries
77+
78+
# CMake
79+
cmake-build-debug/
80+
81+
# Mongo Explorer plugin:
82+
.idea/**/mongoSettings.xml
83+
84+
## File-based project format:
85+
*.iws
86+
87+
## Plugin-specific files:
88+
89+
# IntelliJ
90+
/out/
91+
92+
# mpeltonen/sbt-idea plugin
93+
.idea_modules/
94+
95+
# JIRA plugin
96+
atlassian-ide-plugin.xml
97+
98+
# Cursive Clojure plugin
99+
.idea/replstate.xml
100+
101+
# Ruby plugin and RubyMine
102+
/.rakeTasks
103+
104+
# Crashlytics plugin (for Android Studio and IntelliJ)
105+
com_crashlytics_export_strings.xml
106+
crashlytics.properties
107+
crashlytics-build.properties
108+
fabric.properties
109+
110+
### Intellij Patch ###
111+
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
112+
113+
# *.iml
114+
# modules.xml
115+
# .idea/misc.xml
116+
# *.ipr
117+
118+
# Sonarlint plugin
119+
.idea/sonarlint
120+
121+
### Linux ###
122+
*~
123+
124+
# temporary files which can be created if a process still has a handle open of a deleted file
125+
.fuse_hidden*
126+
127+
# KDE directory preferences
128+
.directory
129+
130+
# Linux trash folder which might appear on any partition or disk
131+
.Trash-*
132+
133+
# .nfs files are created when an open file is removed but is still being accessed
134+
.nfs*
135+
136+
### macOS ###
137+
*.DS_Store
138+
.AppleDouble
139+
.LSOverride
140+
141+
# Icon must end with two \r
142+
Icon
143+
144+
# Thumbnails
145+
._*
146+
147+
# Files that might appear in the root of a volume
148+
.DocumentRevisions-V100
149+
.fseventsd
150+
.Spotlight-V100
151+
.TemporaryItems
152+
.Trashes
153+
.VolumeIcon.icns
154+
.com.apple.timemachine.donotpresent
155+
156+
# Directories potentially created on remote AFP share
157+
.AppleDB
158+
.AppleDesktop
159+
Network Trash Folder
160+
Temporary Items
161+
.apdisk
162+
163+
### Windows ###
164+
# Windows thumbnail cache files
165+
Thumbs.db
166+
ehthumbs.db
167+
ehthumbs_vista.db
168+
169+
# Folder config file
170+
Desktop.ini
171+
172+
# Recycle Bin used on file shares
173+
$RECYCLE.BIN/
174+
175+
# Windows Installer files
176+
*.cab
177+
*.msi
178+
*.msm
179+
*.msp
180+
181+
# Windows shortcuts
182+
*.lnk
183+
184+
185+
# End of https://www.gitignore.io/api/macos,linux,android,windows,intellij
-535 Bytes
Binary file not shown.

.idea/misc.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

Lines changed: 0 additions & 9 deletions
This file was deleted.

app/build.gradle

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,14 @@ dependencies {
2929
implementation 'com.android.support:cardview-v7:27.1.1'
3030
implementation 'com.android.support:design:27.1.1'
3131
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
32+
implementation 'com.android.support:preference-v7:27.1.1'
33+
compile 'com.google.firebase:firebase-database:11.0.4'
34+
compile 'com.google.firebase:firebase-storage:11.0.4'
3235

3336
implementation 'com.stephentuso:welcome:1.4.1'
3437

3538
implementation 'com.android.support:recyclerview-v7:27.1.1'
3639

3740
}
41+
42+
apply plugin: 'com.google.gms.google-services'

app/google-services.json

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
{
2+
"project_info": {
3+
"project_number": "891850808493",
4+
"firebase_url": "https://daily-goals-a9c53.firebaseio.com",
5+
"project_id": "daily-goals-a9c53",
6+
"storage_bucket": "daily-goals-a9c53.appspot.com"
7+
},
8+
"client": [
9+
{
10+
"client_info": {
11+
"mobilesdk_app_id": "1:891850808493:android:def136320218cb3a",
12+
"android_client_info": {
13+
"package_name": "com.example.dhananjay.dailygoals"
14+
}
15+
},
16+
"oauth_client": [
17+
{
18+
"client_id": "891850808493-9ddh59ootunrok7pfi5kplm48h4jshv5.apps.googleusercontent.com",
19+
"client_type": 1,
20+
"android_info": {
21+
"package_name": "com.example.dhananjay.dailygoals",
22+
"certificate_hash": "dc402beccbec5c64ee1f65fbbb06ddf429efe45a"
23+
}
24+
},
25+
{
26+
"client_id": "891850808493-atp6khfqm1jv21o4a1cqnm8n2jf5f9ag.apps.googleusercontent.com",
27+
"client_type": 3
28+
}
29+
],
30+
"api_key": [
31+
{
32+
"current_key": "AIzaSyAF-ifz80FZWLZJaFYn4uky1Vx1kRNdPG8"
33+
}
34+
],
35+
"services": {
36+
"analytics_service": {
37+
"status": 1
38+
},
39+
"appinvite_service": {
40+
"status": 2,
41+
"other_platform_oauth_client": [
42+
{
43+
"client_id": "891850808493-atp6khfqm1jv21o4a1cqnm8n2jf5f9ag.apps.googleusercontent.com",
44+
"client_type": 3
45+
}
46+
]
47+
},
48+
"ads_service": {
49+
"status": 2
50+
}
51+
}
52+
}
53+
],
54+
"configuration_version": "1"
55+
}

app/src/main/AndroidManifest.xml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919
<activity android:name=".WelcomeScreenActivity"
2020
android:theme="@style/WelcomeScreenTheme"
2121
android:screenOrientation="portrait"/>
22+
<activity android:name=".TodayActivity"></activity>
23+
<activity android:name=".PopupActivity"
24+
android:theme="@style/AppTheme.CustomTheme"></activity>
25+
<receiver android:name=".NotificationActivity"></receiver>
2226
</application>
23-
24-
</manifest>
27+
<uses-permission android:name="com.android.alarm.permission.SET_ALARM"></uses-permission>
28+
</manifest>
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
package com.example.dhananjay.dailygoals;
2+
3+
import android.support.v7.widget.RecyclerView;
4+
import android.view.View;
5+
6+
public class ItemClickSupport {
7+
8+
9+
private final RecyclerView mRecyclerView;
10+
private OnItemClickListener mOnItemClickListener;
11+
private OnItemLongClickListener mOnItemLongClickListener;
12+
private View.OnClickListener mOnClickListener = new View.OnClickListener() {
13+
@Override
14+
public void onClick(View v) {
15+
if (mOnItemClickListener != null) {
16+
RecyclerView.ViewHolder holder = mRecyclerView.getChildViewHolder(v);
17+
mOnItemClickListener.onItemClicked(mRecyclerView, holder.getAdapterPosition(), v);
18+
}
19+
}
20+
};
21+
private View.OnLongClickListener mOnLongClickListener = new View.OnLongClickListener() {
22+
@Override
23+
public boolean onLongClick(View v) {
24+
if (mOnItemLongClickListener != null) {
25+
RecyclerView.ViewHolder holder = mRecyclerView.getChildViewHolder(v);
26+
return mOnItemLongClickListener.onItemLongClicked(mRecyclerView, holder.getAdapterPosition(), v);
27+
}
28+
return false;
29+
}
30+
};
31+
private RecyclerView.OnChildAttachStateChangeListener mAttachListener
32+
= new RecyclerView.OnChildAttachStateChangeListener() {
33+
@Override
34+
public void onChildViewAttachedToWindow(View view) {
35+
if (mOnItemClickListener != null) {
36+
view.setOnClickListener(mOnClickListener);
37+
}
38+
if (mOnItemLongClickListener != null) {
39+
view.setOnLongClickListener(mOnLongClickListener);
40+
}
41+
}
42+
43+
@Override
44+
public void onChildViewDetachedFromWindow(View view) {
45+
46+
}
47+
};
48+
49+
private ItemClickSupport(RecyclerView recyclerView) {
50+
mRecyclerView = recyclerView;
51+
mRecyclerView.setTag(R.id.item_click_support, this);
52+
mRecyclerView.addOnChildAttachStateChangeListener(mAttachListener);
53+
}
54+
55+
public static ItemClickSupport addTo(RecyclerView view) {
56+
ItemClickSupport support = (ItemClickSupport) view.getTag(R.id.item_click_support);
57+
if (support == null) {
58+
support = new ItemClickSupport(view);
59+
}
60+
return support;
61+
}
62+
63+
public static ItemClickSupport removeFrom(RecyclerView view) {
64+
ItemClickSupport support = (ItemClickSupport) view.getTag(R.id.item_click_support);
65+
if (support != null) {
66+
support.detach(view);
67+
}
68+
return support;
69+
}
70+
71+
public ItemClickSupport setOnItemClickListener(OnItemClickListener listener) {
72+
mOnItemClickListener = listener;
73+
return this;
74+
}
75+
76+
public ItemClickSupport setOnItemLongClickListener(OnItemLongClickListener listener) {
77+
mOnItemLongClickListener = listener;
78+
return this;
79+
}
80+
81+
private void detach(RecyclerView view) {
82+
view.removeOnChildAttachStateChangeListener(mAttachListener);
83+
view.setTag(R.id.item_click_support, null);
84+
}
85+
86+
public interface OnItemClickListener {
87+
88+
void onItemClicked(RecyclerView recyclerView, int position, View v);
89+
}
90+
91+
public interface OnItemLongClickListener {
92+
93+
boolean onItemLongClicked(RecyclerView recyclerView, int position, View v);
94+
}
95+
}
96+

0 commit comments

Comments
 (0)