wrap NotesFragment emptyView with API check
This commit is contained in:
parent
f85dc396c4
commit
c15584eca3
1 changed files with 4 additions and 4 deletions
|
@ -98,15 +98,15 @@ public class NotesFragment extends OsmAndListFragment {
|
|||
view.findViewById(R.id.header_layout).setVisibility(View.GONE);
|
||||
ViewStub emptyStub = (ViewStub) view.findViewById(R.id.empty_view_stub);
|
||||
emptyStub.setLayoutResource(R.layout.empty_state_av_notes);
|
||||
emptyView = emptyStub.inflate();
|
||||
|
||||
if (Build.VERSION.SDK_INT >= 18) {
|
||||
emptyView = emptyStub.inflate();
|
||||
int icRes = getMyApplication().getSettings().isLightContent()
|
||||
? R.drawable.ic_empty_state_av_notes_day : R.drawable.ic_empty_state_av_notes_night;
|
||||
((ImageView) emptyView.findViewById(R.id.empty_state_image_view)).setImageResource(icRes);
|
||||
emptyView.setBackgroundColor(getResources().getColor(getMyApplication().getSettings()
|
||||
.isLightContent() ? R.color.ctx_menu_info_view_bg_light : R.color.ctx_menu_info_view_bg_dark));
|
||||
}
|
||||
emptyView.setBackgroundColor(getResources().getColor(getMyApplication().getSettings()
|
||||
.isLightContent() ? R.color.ctx_menu_info_view_bg_light : R.color.ctx_menu_info_view_bg_dark));
|
||||
|
||||
return view;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue