Merge remote-tracking branch 'origin/master'

This commit is contained in:
Weblate 2018-04-20 19:13:39 +02:00
commit 951eefb7ff
3 changed files with 61 additions and 38 deletions

View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="3dp"/>
</shape>

View file

@ -87,58 +87,72 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
<net.osmand.plus.widgets.TextViewEx <FrameLayout
android:id="@+id/left_button"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/bottom_sheet_content_padding_small" android:layout_marginLeft="@dimen/bottom_sheet_content_padding_small"
android:layout_marginStart="@dimen/bottom_sheet_content_padding_small" android:layout_marginStart="@dimen/bottom_sheet_content_padding_small"
android:background="?attr/selectableItemBackgroundBorderless" android:background="@drawable/rounded_background_3dp">
android:drawablePadding="@dimen/bottom_sheet_content_padding_small"
android:ellipsize="end" <net.osmand.plus.widgets.TextViewEx
android:gravity="center_vertical" android:id="@+id/left_button"
android:letterSpacing="@dimen/text_button_letter_spacing" android:layout_width="wrap_content"
android:maxLines="1" android:layout_height="wrap_content"
android:paddingBottom="@dimen/context_menu_padding_margin_tiny" android:background="?attr/selectableItemBackgroundBorderless"
android:paddingLeft="@dimen/bottom_sheet_content_padding_small" android:drawablePadding="@dimen/bottom_sheet_content_padding_small"
android:paddingRight="@dimen/bottom_sheet_content_padding_small" android:ellipsize="end"
android:paddingTop="@dimen/context_menu_padding_margin_tiny" android:gravity="center_vertical"
android:textColor="?attr/wikivoyage_active_color" android:letterSpacing="@dimen/text_button_letter_spacing"
android:textSize="@dimen/text_button_text_size" android:maxLines="1"
osmand:typeface="@string/font_roboto_medium" android:paddingBottom="@dimen/context_menu_padding_margin_tiny"
tools:drawableLeft="@drawable/ic_action_read_article" android:paddingLeft="@dimen/bottom_sheet_content_padding_small"
tools:drawableTint="?attr/wikivoyage_active_color" android:paddingRight="@dimen/bottom_sheet_content_padding_small"
tools:ignore="UnusedAttribute" android:paddingTop="@dimen/context_menu_padding_margin_tiny"
tools:text="Read"/> android:textColor="?attr/wikivoyage_active_color"
android:textSize="@dimen/text_button_text_size"
osmand:typeface="@string/font_roboto_medium"
tools:drawableLeft="@drawable/ic_action_read_article"
tools:drawableTint="?attr/wikivoyage_active_color"
tools:ignore="UnusedAttribute"
tools:text="Read"/>
</FrameLayout>
<View <View
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="1"/> android:layout_weight="1"/>
<net.osmand.plus.widgets.TextViewEx <FrameLayout
android:id="@+id/right_button"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/bottom_sheet_content_padding_small" android:layout_marginEnd="@dimen/bottom_sheet_content_padding_small"
android:layout_marginRight="@dimen/bottom_sheet_content_padding_small" android:layout_marginRight="@dimen/bottom_sheet_content_padding_small"
android:background="?attr/selectableItemBackgroundBorderless" android:background="@drawable/rounded_background_3dp">
android:drawablePadding="@dimen/bottom_sheet_content_padding_small"
android:ellipsize="end" <net.osmand.plus.widgets.TextViewEx
android:gravity="center_vertical" android:id="@+id/right_button"
android:letterSpacing="@dimen/text_button_letter_spacing" android:layout_width="wrap_content"
android:maxLines="1" android:layout_height="wrap_content"
android:paddingBottom="@dimen/context_menu_padding_margin_tiny" android:background="?attr/selectableItemBackgroundBorderless"
android:paddingLeft="@dimen/bottom_sheet_content_padding_small" android:drawablePadding="@dimen/bottom_sheet_content_padding_small"
android:paddingRight="@dimen/bottom_sheet_content_padding_small" android:ellipsize="end"
android:paddingTop="@dimen/context_menu_padding_margin_tiny" android:gravity="center_vertical"
android:textColor="?attr/wikivoyage_active_color" android:letterSpacing="@dimen/text_button_letter_spacing"
android:textSize="@dimen/text_button_text_size" android:maxLines="1"
osmand:typeface="@string/font_roboto_medium" android:paddingBottom="@dimen/context_menu_padding_margin_tiny"
tools:drawableRight="@drawable/ic_action_read_later_fill" android:paddingLeft="@dimen/bottom_sheet_content_padding_small"
tools:drawableTint="?attr/wikivoyage_active_color" android:paddingRight="@dimen/bottom_sheet_content_padding_small"
tools:ignore="UnusedAttribute" android:paddingTop="@dimen/context_menu_padding_margin_tiny"
tools:text="Delete"/> android:textColor="?attr/wikivoyage_active_color"
android:textSize="@dimen/text_button_text_size"
osmand:typeface="@string/font_roboto_medium"
tools:drawableRight="@drawable/ic_action_read_later_fill"
tools:drawableTint="?attr/wikivoyage_active_color"
tools:ignore="UnusedAttribute"
tools:text="Delete"/>
</FrameLayout>
</LinearLayout> </LinearLayout>

View file

@ -138,6 +138,11 @@ public class WikivoyageArticleNavigationFragment extends MenuBottomSheetDialogFr
return false; return false;
} }
@Override
protected int getBgColorId() {
return nightMode ? R.color.wikivoyage_bottom_bar_bg_dark : R.color.bg_color_light;
}
private void sendResults(long cityId) { private void sendResults(long cityId) {
Fragment fragment = getTargetFragment(); Fragment fragment = getTargetFragment();
if (fragment != null) { if (fragment != null) {