File tree Expand file tree Collapse file tree 8 files changed +40
-12
lines changed
app/src/main/java/com/donnfelker/android/bootstrap Expand file tree Collapse file tree 8 files changed +40
-12
lines changed Original file line number Diff line number Diff line change 1
1
package com .donnfelker .android .bootstrap ;
2
2
3
3
import android .accounts .AccountManager ;
4
+ import android .app .NotificationManager ;
4
5
import android .content .Context ;
5
6
import android .content .SharedPreferences ;
6
7
import android .content .pm .ApplicationInfo ;
@@ -83,4 +84,9 @@ ClassLoader provideClassLoader(final Context context) {
83
84
return context .getClassLoader ();
84
85
}
85
86
87
+ @ Provides
88
+ NotificationManager provideNotificationManager (final Context context ) {
89
+ return (NotificationManager ) context .getSystemService (Context .NOTIFICATION_SERVICE );
90
+ }
91
+
86
92
}
Original file line number Diff line number Diff line change 6
6
import com .donnfelker .android .bootstrap .authenticator .BootstrapAuthenticatorActivity ;
7
7
import com .donnfelker .android .bootstrap .authenticator .LogoutService ;
8
8
import com .donnfelker .android .bootstrap .core .CheckIn ;
9
+ import com .donnfelker .android .bootstrap .core .TimerService ;
9
10
import com .donnfelker .android .bootstrap .ui .BootstrapTimerActivity ;
10
11
import com .donnfelker .android .bootstrap .ui .CarouselActivity ;
11
12
import com .donnfelker .android .bootstrap .ui .CheckInsListFragment ;
38
39
NewsActivity .class ,
39
40
NewsListFragment .class ,
40
41
UserActivity .class ,
41
- UserListFragment .class
42
+ UserListFragment .class ,
43
+ TimerService .class
42
44
}
43
45
44
46
)
Original file line number Diff line number Diff line change 10
10
*/
11
11
public class BootstrapFragmentActivity extends SherlockFragmentActivity {
12
12
13
- @ Override
14
- public void setContentView (int layoutResId ) {
15
- super .setContentView (layoutResId );
13
+ // Handle any super class related items here.
16
14
17
- // Perform view injection via butter knife
18
- // Doesnt seem like you can inject via a super class. Throws method not found.
19
- //Views.inject(this);
20
- BootstrapApplication .getInstance ().inject (this );
21
- }
22
15
}
Original file line number Diff line number Diff line change 8
8
import android .widget .Button ;
9
9
import android .widget .TextView ;
10
10
11
+ import com .donnfelker .android .bootstrap .BootstrapApplication ;
11
12
import com .donnfelker .android .bootstrap .R ;
12
13
import com .donnfelker .android .bootstrap .core .PauseTimerEvent ;
13
14
import com .donnfelker .android .bootstrap .core .ResumeTimerEvent ;
@@ -38,6 +39,8 @@ protected void onCreate(Bundle savedInstanceState) {
38
39
39
40
setContentView (R .layout .bootstrap_timer );
40
41
42
+ BootstrapApplication .getInstance ().inject (this );
43
+
41
44
Views .inject (this );
42
45
43
46
setTitle (R .string .timer );
Original file line number Diff line number Diff line change @@ -26,11 +26,17 @@ public class CheckInsListFragment extends ItemListFragment<CheckIn> {
26
26
@ Inject protected BootstrapServiceProvider serviceProvider ;
27
27
@ Inject protected LogoutService logoutService ;
28
28
29
+ @ Override
30
+ public void onCreate (Bundle savedInstanceState ) {
31
+ super .onCreate (savedInstanceState );
32
+ BootstrapApplication .getInstance ().inject (this );
33
+ }
34
+
29
35
@ Override
30
36
public void onActivityCreated (Bundle savedInstanceState ) {
31
37
super .onActivityCreated (savedInstanceState );
32
38
33
- BootstrapApplication . getInstance (). inject ( this );
39
+
34
40
}
35
41
36
42
@ Override
Original file line number Diff line number Diff line change @@ -25,13 +25,20 @@ public class NewsListFragment extends ItemListFragment<News> {
25
25
@ Inject protected BootstrapServiceProvider serviceProvider ;
26
26
@ Inject protected LogoutService logoutService ;
27
27
28
+
29
+ @ Override
30
+ public void onCreate (Bundle savedInstanceState ) {
31
+ super .onCreate (savedInstanceState );
32
+ BootstrapApplication .getInstance ().inject (this );
33
+ }
34
+
28
35
@ Override
29
36
public void onActivityCreated (Bundle savedInstanceState ) {
30
37
super .onActivityCreated (savedInstanceState );
31
38
32
39
setEmptyText (R .string .no_news );
33
40
34
- BootstrapApplication . getInstance (). inject ( this );
41
+
35
42
}
36
43
37
44
@ Override
Original file line number Diff line number Diff line change 5
5
import android .widget .ImageView ;
6
6
import android .widget .TextView ;
7
7
8
+ import com .donnfelker .android .bootstrap .BootstrapApplication ;
8
9
import com .donnfelker .android .bootstrap .R ;
9
10
import com .donnfelker .android .bootstrap .core .AvatarLoader ;
10
11
import com .donnfelker .android .bootstrap .core .User ;
11
12
import javax .inject .Inject ;
12
13
13
14
import butterknife .InjectView ;
15
+ import butterknife .Views ;
14
16
15
17
public class UserActivity extends BootstrapActivity {
16
18
@@ -27,6 +29,8 @@ protected void onCreate(Bundle savedInstanceState) {
27
29
28
30
setContentView (R .layout .user_view );
29
31
32
+ BootstrapApplication .getInstance ().inject (this );
33
+
30
34
if (getIntent () != null && getIntent ().getExtras () != null ) {
31
35
user = (User ) getIntent ().getExtras ().getSerializable (USER );
32
36
}
Original file line number Diff line number Diff line change @@ -29,13 +29,20 @@ public class UserListFragment extends ItemListFragment<User> {
29
29
@ Inject AvatarLoader avatars ;
30
30
@ Inject LogoutService logoutService ;
31
31
32
+
33
+ @ Override
34
+ public void onCreate (Bundle savedInstanceState ) {
35
+ super .onCreate (savedInstanceState );
36
+ BootstrapApplication .getInstance ().inject (this );
37
+ }
38
+
32
39
@ Override
33
40
public void onActivityCreated (Bundle savedInstanceState ) {
34
41
super .onActivityCreated (savedInstanceState );
35
42
36
43
setEmptyText (R .string .no_users );
37
44
38
- BootstrapApplication . getInstance (). inject ( this );
45
+
39
46
}
40
47
41
48
@ Override
You can’t perform that action at this time.
0 commit comments