Skip to content

Commit

Permalink
trying to solve a nullpointerexception on android 5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
konradrenner committed Jan 17, 2016
1 parent 0dd8f65 commit e1fd12f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ android {
applicationId "org.kore.kolabnotes.android"
minSdkVersion 16
targetSdkVersion 23
versionCode 49
versionName "1.5.0"
versionCode 50
versionName "1.5.1"
}
buildTypes {
release {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@ public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);

toolbar = (Toolbar) getActivity().findViewById(R.id.toolbar_tag_list);

if(activity == null){
activity = (AppCompatActivity)getActivity();
}

activity.setSupportActionBar(toolbar);
if(activity.getSupportActionBar() != null) {
activity.getSupportActionBar().setDisplayHomeAsUpEnabled(true);
Expand Down

0 comments on commit e1fd12f

Please sign in to comment.