fixed some bugs

This commit is contained in:
Christian Schabesberger 2016-01-28 12:10:50 +01:00
parent 576786c751
commit f152d66cd8
3 changed files with 22 additions and 17 deletions

View file

@ -134,7 +134,16 @@ public class VideoItemDetailFragment extends Fragment {
}
}
} catch (Exception e) {
progressBar.setVisibility(View.GONE);
h.post(new Runnable() {
@Override
public void run() {
progressBar.setVisibility(View.GONE);
// This is poor style, but unless we have better error handling in the
// crawler, this may not be better.
Toast.makeText(VideoItemDetailFragment.this.getActivity(),
R.string.network_error, Toast.LENGTH_LONG).show();
}
});
e.printStackTrace();
}
@ -443,12 +452,6 @@ public class VideoItemDetailFragment extends Fragment {
}
}
private boolean checkIfLandscape() {
DisplayMetrics displayMetrics = new DisplayMetrics();
getActivity().getWindowManager().getDefaultDisplay().getMetrics(displayMetrics);
return displayMetrics.heightPixels < displayMetrics.widthPixels;
}
@Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
actionBarHandler.setupMenu(menu, inflater);