This commit is contained in:
PavelRatushny 2017-11-29 16:04:00 +02:00
parent 6fd6e9aa2b
commit a9f6371788
2 changed files with 47 additions and 75 deletions

View file

@ -162,9 +162,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/context_menu_buttons_top_margin" android:layout_marginTop="@dimen/context_menu_buttons_top_margin"
android:clickable="true" android:clickable="true"
android:minHeight="@dimen/context_menu_action_buttons_h"
android:orientation="horizontal" android:orientation="horizontal"
android:paddingBottom="@dimen/context_menu_buttons_padding_bottom" android:paddingBottom="@dimen/context_menu_padding_margin_medium"
android:visibility="gone" android:visibility="gone"
tools:visibility="visible"> tools:visibility="visible">
@ -234,26 +233,12 @@
android:id="@+id/download_buttons_container" android:id="@+id/download_buttons_container"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:minHeight="@dimen/context_menu_action_buttons_h"
android:layout_marginTop="@dimen/context_menu_buttons_top_margin"
android:clickable="true" android:clickable="true"
android:orientation="vertical" android:orientation="horizontal"
android:paddingBottom="@dimen/context_menu_buttons_padding_bottom" android:paddingBottom="@dimen/context_menu_padding_margin_medium"
android:visibility="gone" android:visibility="gone"
tools:visibility="visible"> tools:visibility="visible">
<View
android:id="@+id/download_buttons_top_border"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginLeft="10dp"
android:background="?attr/dashboard_divider"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<LinearLayout <LinearLayout
android:id="@+id/download_button_left_view" android:id="@+id/download_button_left_view"
android:background="?attr/ctx_menu_controller_bg" android:background="?attr/ctx_menu_controller_bg"
@ -304,18 +289,15 @@
</LinearLayout> </LinearLayout>
</LinearLayout>
<LinearLayout <LinearLayout
android:id="@+id/title_progress_container" android:id="@+id/title_progress_container"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/context_menu_buttons_top_margin"
android:clickable="true" android:clickable="true"
android:gravity="center_vertical" android:gravity="center_vertical"
android:minHeight="@dimen/context_menu_action_buttons_h" android:minHeight="@dimen/context_menu_action_buttons_h"
android:orientation="horizontal" android:orientation="horizontal"
android:paddingBottom="@dimen/context_menu_buttons_padding_bottom" android:paddingBottom="@dimen/context_menu_padding_margin_medium"
android:paddingLeft="@dimen/context_menu_progress_padding_left" android:paddingLeft="@dimen/context_menu_progress_padding_left"
android:paddingStart="@dimen/context_menu_progress_padding_left" android:paddingStart="@dimen/context_menu_progress_padding_left"
android:paddingRight="@dimen/context_menu_progress_padding_right" android:paddingRight="@dimen/context_menu_progress_padding_right"

View file

@ -735,16 +735,6 @@ public class MapContextMenuFragment extends BaseOsmAndFragment implements Downlo
final View downloadButtonsContainer = view.findViewById(R.id.download_buttons_container); final View downloadButtonsContainer = view.findViewById(R.id.download_buttons_container);
downloadButtonsContainer.setVisibility(showDownloadButtonsContainer ? View.VISIBLE : View.GONE); downloadButtonsContainer.setVisibility(showDownloadButtonsContainer ? View.VISIBLE : View.GONE);
if (showDownloadButtonsContainer) {
view.findViewById(R.id.download_buttons_top_border).setVisibility(showTitleButtonsContainer ? View.VISIBLE : View.INVISIBLE);
if (showTitleButtonsContainer) {
LinearLayout.LayoutParams ll = (LinearLayout.LayoutParams) downloadButtonsContainer.getLayoutParams();
if (ll.topMargin != 0) {
ll.setMargins(0, 0, 0, 0);
}
}
}
// Left download button // Left download button
final View leftDownloadButtonView = view.findViewById(R.id.download_button_left_view); final View leftDownloadButtonView = view.findViewById(R.id.download_button_left_view);
final TextView leftDownloadButton = (TextView) view.findViewById(R.id.download_button_left); final TextView leftDownloadButton = (TextView) view.findViewById(R.id.download_button_left);
@ -772,7 +762,7 @@ public class MapContextMenuFragment extends BaseOsmAndFragment implements Downlo
rightDownloadButton.setCompoundDrawablesWithIntrinsicBounds(leftIcon, null, null, null); rightDownloadButton.setCompoundDrawablesWithIntrinsicBounds(leftIcon, null, null, null);
rightDownloadButton.setCompoundDrawablePadding(dpToPx(8f)); rightDownloadButton.setCompoundDrawablePadding(dpToPx(8f));
} else { } else {
rightDownloadButtonView.setVisibility(View.GONE); rightDownloadButtonView.setVisibility(View.INVISIBLE);
} }
// Progress bar // Progress bar