Skip to content
This repository was archived by the owner on Feb 26, 2023. It is now read-only.

Commit 6e239ab

Browse files
committed
Fix PreferenceActivity RuntimeException with @PreferenceScreen
The problem was that we called the addPreferencesFromResource method before calling super.onCreate().
1 parent 9785ed2 commit 6e239ab

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • AndroidAnnotations/androidannotations/src/main/java/org/androidannotations/holder

‎AndroidAnnotations/androidannotations/src/main/java/org/androidannotations/holder/EActivityHolder.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -778,7 +778,7 @@ protected JFieldVar setDatabaseHelperRef(TypeMirror databaseHelperTypeMirror) {
778778

779779
@Override
780780
public JBlock getPreferenceScreenInitializationBlock() {
781-
return getInitBody();
781+
return getOnCreate().body();
782782
}
783783

784784
@Override

0 commit comments

Comments
 (0)