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_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,73 +233,57 @@
|
||||||
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
|
<LinearLayout
|
||||||
android:id="@+id/download_buttons_top_border"
|
android:id="@+id/download_button_left_view"
|
||||||
android:layout_width="match_parent"
|
android:background="?attr/ctx_menu_controller_bg"
|
||||||
android:layout_height="1dp"
|
android:layout_marginLeft="@dimen/context_menu_padding_margin_medium"
|
||||||
android:layout_marginLeft="10dp"
|
android:layout_marginRight="@dimen/context_menu_padding_margin_medium"
|
||||||
android:background="?attr/dashboard_divider"/>
|
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
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:id="@+id/download_button_right_view"
|
||||||
android:layout_height="wrap_content"
|
android:background="?attr/ctx_menu_controller_bg"
|
||||||
android:orientation="horizontal">
|
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
|
<TextView
|
||||||
android:id="@+id/download_button_left_view"
|
android:textAllCaps="true"
|
||||||
android:background="?attr/ctx_menu_controller_bg"
|
android:id="@+id/download_button_right"
|
||||||
android:layout_marginLeft="@dimen/context_menu_padding_margin_medium"
|
android:layout_width="wrap_content"
|
||||||
android:layout_marginRight="@dimen/context_menu_padding_margin_medium"
|
android:layout_height="match_parent"
|
||||||
android:layout_width="0dp"
|
android:background="@null"
|
||||||
android:layout_weight="1"
|
android:gravity="center_vertical"
|
||||||
android:layout_height="@dimen/context_menu_controller_height">
|
android:paddingLeft="@dimen/context_menu_button_padding_x"
|
||||||
|
android:paddingRight="@dimen/context_menu_button_padding_x"
|
||||||
<TextView
|
android:text="@string/shared_string_delete"
|
||||||
android:textAllCaps="true"
|
android:textColor="?attr/contextMenuButtonColor"
|
||||||
android:id="@+id/download_button_left"
|
android:textSize="@dimen/default_desc_text_size"/>
|
||||||
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>
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
@ -310,12 +293,11 @@
|
||||||
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"
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue