Fixes
This commit is contained in:
parent
6fd6e9aa2b
commit
a9f6371788
2 changed files with 47 additions and 75 deletions
|
@ -162,9 +162,8 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/context_menu_buttons_top_margin"
|
||||
android:clickable="true"
|
||||
android:minHeight="@dimen/context_menu_action_buttons_h"
|
||||
android:orientation="horizontal"
|
||||
android:paddingBottom="@dimen/context_menu_buttons_padding_bottom"
|
||||
android:paddingBottom="@dimen/context_menu_padding_margin_medium"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
|
@ -234,73 +233,57 @@
|
|||
android:id="@+id/download_buttons_container"
|
||||
android:layout_width="match_parent"
|
||||
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:orientation="vertical"
|
||||
android:paddingBottom="@dimen/context_menu_buttons_padding_bottom"
|
||||
android:orientation="horizontal"
|
||||
android:paddingBottom="@dimen/context_menu_padding_margin_medium"
|
||||
android:visibility="gone"
|
||||
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:id="@+id/download_button_left_view"
|
||||
android:background="?attr/ctx_menu_controller_bg"
|
||||
android:layout_marginLeft="@dimen/context_menu_padding_margin_medium"
|
||||
android:layout_marginRight="@dimen/context_menu_padding_margin_medium"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="@dimen/context_menu_controller_height">
|
||||
|
||||
<TextView
|
||||
android:textAllCaps="true"
|
||||
android:id="@+id/download_button_left"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@null"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingLeft="@dimen/context_menu_button_padding_x"
|
||||
android:paddingRight="@dimen/context_menu_button_padding_x"
|
||||
android:text="@string/shared_string_download"
|
||||
android:textColor="?attr/contextMenuButtonColor"
|
||||
android:textSize="@dimen/default_desc_text_size"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
android:id="@+id/download_button_right_view"
|
||||
android:background="?attr/ctx_menu_controller_bg"
|
||||
android:layout_marginLeft="@dimen/context_menu_padding_margin_medium"
|
||||
android:layout_marginRight="@dimen/context_menu_padding_margin_medium"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="@dimen/context_menu_controller_height">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/download_button_left_view"
|
||||
android:background="?attr/ctx_menu_controller_bg"
|
||||
android:layout_marginLeft="@dimen/context_menu_padding_margin_medium"
|
||||
android:layout_marginRight="@dimen/context_menu_padding_margin_medium"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="@dimen/context_menu_controller_height">
|
||||
|
||||
<TextView
|
||||
android:textAllCaps="true"
|
||||
android:id="@+id/download_button_left"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@null"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingLeft="@dimen/context_menu_button_padding_x"
|
||||
android:paddingRight="@dimen/context_menu_button_padding_x"
|
||||
android:text="@string/shared_string_download"
|
||||
android:textColor="?attr/contextMenuButtonColor"
|
||||
android:textSize="@dimen/default_desc_text_size"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/download_button_right_view"
|
||||
android:background="?attr/ctx_menu_controller_bg"
|
||||
android:layout_marginLeft="@dimen/context_menu_padding_margin_medium"
|
||||
android:layout_marginRight="@dimen/context_menu_padding_margin_medium"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="@dimen/context_menu_controller_height">
|
||||
|
||||
<TextView
|
||||
android:textAllCaps="true"
|
||||
android:id="@+id/download_button_right"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@null"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingLeft="@dimen/context_menu_button_padding_x"
|
||||
android:paddingRight="@dimen/context_menu_button_padding_x"
|
||||
android:text="@string/shared_string_delete"
|
||||
android:textColor="?attr/contextMenuButtonColor"
|
||||
android:textSize="@dimen/default_desc_text_size"/>
|
||||
|
||||
</LinearLayout>
|
||||
<TextView
|
||||
android:textAllCaps="true"
|
||||
android:id="@+id/download_button_right"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@null"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingLeft="@dimen/context_menu_button_padding_x"
|
||||
android:paddingRight="@dimen/context_menu_button_padding_x"
|
||||
android:text="@string/shared_string_delete"
|
||||
android:textColor="?attr/contextMenuButtonColor"
|
||||
android:textSize="@dimen/default_desc_text_size"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
@ -310,12 +293,11 @@
|
|||
android:id="@+id/title_progress_container"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/context_menu_buttons_top_margin"
|
||||
android:clickable="true"
|
||||
android:gravity="center_vertical"
|
||||
android:minHeight="@dimen/context_menu_action_buttons_h"
|
||||
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:paddingStart="@dimen/context_menu_progress_padding_left"
|
||||
android:paddingRight="@dimen/context_menu_progress_padding_right"
|
||||
|
|
|
@ -735,16 +735,6 @@ public class MapContextMenuFragment extends BaseOsmAndFragment implements Downlo
|
|||
final View downloadButtonsContainer = view.findViewById(R.id.download_buttons_container);
|
||||
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
|
||||
final View leftDownloadButtonView = view.findViewById(R.id.download_button_left_view);
|
||||
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.setCompoundDrawablePadding(dpToPx(8f));
|
||||
} else {
|
||||
rightDownloadButtonView.setVisibility(View.GONE);
|
||||
rightDownloadButtonView.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
|
||||
// Progress bar
|
||||
|
|
Loading…
Reference in a new issue