move emptyStub inside api check

This commit is contained in:
Chumva 2018-03-28 16:38:19 +03:00
parent c15584eca3
commit ed67b29bf0

View file

@ -96,10 +96,10 @@ public class NotesFragment extends OsmAndListFragment {
View view = getActivity().getLayoutInflater().inflate(R.layout.update_index, container, false);
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);
if (Build.VERSION.SDK_INT >= 18) {
ViewStub emptyStub = (ViewStub) view.findViewById(R.id.empty_view_stub);
emptyStub.setLayoutResource(R.layout.empty_state_av_notes);
emptyView = emptyStub.inflate();
int icRes = getMyApplication().getSettings().isLightContent()
? R.drawable.ic_empty_state_av_notes_day : R.drawable.ic_empty_state_av_notes_night;