Skip to content

Commit 5dede7e

Browse files
committed
Fixing issue where injection was in the wrong place and upgrading butterknife.
1 parent fe207e2 commit 5dede7e

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

app/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
<dependency>
4646
<groupId>com.jakewharton</groupId>
4747
<artifactId>butterknife</artifactId>
48-
<version>1.3.0</version>
48+
<version>1.3.2</version>
4949
</dependency>
5050
<dependency>
5151
<groupId>com.actionbarsherlock</groupId>

app/src/main/java/com/donnfelker/android/bootstrap/ui/BootstrapActivity.java

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import static android.content.Intent.FLAG_ACTIVITY_CLEAR_TOP;
44
import static android.content.Intent.FLAG_ACTIVITY_SINGLE_TOP;
55
import android.content.Intent;
6+
import android.os.Bundle;
67

78
import com.actionbarsherlock.app.SherlockActivity;
89
import com.actionbarsherlock.view.MenuItem;
@@ -16,11 +17,15 @@
1617
public abstract class BootstrapActivity extends SherlockActivity {
1718

1819
@Override
19-
public void setContentView(int layoutResId) {
20-
super.setContentView(layoutResId);
21-
20+
protected void onCreate(Bundle savedInstanceState) {
21+
super.onCreate(savedInstanceState);
2222

2323
BootstrapApplication.getInstance().inject(this);
24+
}
25+
26+
@Override
27+
public void setContentView(int layoutResId) {
28+
super.setContentView(layoutResId);
2429

2530
// Used to inject views with the Butterknife library
2631
Views.inject(this);

app/src/main/java/com/donnfelker/android/bootstrap/ui/BootstrapFragmentActivity.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
* Base class for all Bootstrap Activities that need fragments.
1212
*/
1313
public class BootstrapFragmentActivity extends SherlockFragmentActivity {
14+
1415
@Override
1516
protected void onCreate(Bundle savedInstanceState) {
1617
super.onCreate(savedInstanceState);

0 commit comments

Comments
 (0)