use of net.osmand.plus.audionotes.AudioVideoNotesPlugin.CurrentRecording in project Osmand by osmandapp.
the class AudioVideoNoteRecordingMenu method applyViewfinderVisibility.
protected void applyViewfinderVisibility() {
MapActivity mapActivity = plugin.getMapActivity();
CurrentRecording recording = plugin.getCurrentRecording();
boolean show = showViewfinder && recording != null && recording.getType() != AVActionType.REC_AUDIO;
if (isLandscapeLayout() && mapActivity != null) {
int buttonsHeight = (int) view.getResources().getDimension(R.dimen.map_route_buttons_height);
int tileBoxHeight = mapActivity.getMapView().getCurrentRotatedTileBox().getPixHeight();
int h = show ? tileBoxHeight : buttonsHeight;
view.setLayoutParams(new LinearLayout.LayoutParams(AndroidUtils.dpToPx(mapActivity, 320f), h));
view.requestLayout();
}
viewfinder.setVisibility(show ? View.VISIBLE : View.GONE);
}
Aggregations