From ad64470d14314fae2151ca730b04410e61ee65fc Mon Sep 17 00:00:00 2001 From: Chumva Date: Wed, 11 Apr 2018 18:10:24 +0300 Subject: [PATCH 1/8] change sizes and padding of explistview items --- .../fragment_wikivoyage_article_dialog.xml | 6 +- .../wikivoyage_contents_child_list_item.xml | 22 +++++++ .../wikivoyage_contents_group_list_item.xml | 53 +++++++++++++++++ .../WikivoyageArticleContentsFragment.java | 59 +++++++++---------- 4 files changed, 108 insertions(+), 32 deletions(-) create mode 100644 OsmAnd/res/layout/wikivoyage_contents_child_list_item.xml create mode 100644 OsmAnd/res/layout/wikivoyage_contents_group_list_item.xml diff --git a/OsmAnd/res/layout/fragment_wikivoyage_article_dialog.xml b/OsmAnd/res/layout/fragment_wikivoyage_article_dialog.xml index 1e44100049..3204f3f542 100644 --- a/OsmAnd/res/layout/fragment_wikivoyage_article_dialog.xml +++ b/OsmAnd/res/layout/fragment_wikivoyage_article_dialog.xml @@ -94,11 +94,12 @@ android:background="?attr/selectableItemBackground" android:drawablePadding="@dimen/bottom_sheet_content_padding_small" android:ellipsize="end" + android:textAllCaps="true" android:gravity="center_vertical" android:letterSpacing="@dimen/text_button_letter_spacing" android:maxLines="1" android:paddingBottom="@dimen/context_menu_padding_margin_tiny" - android:paddingLeft="@dimen/bottom_sheet_content_padding_small" + android:paddingLeft="@dimen/bottom_sheet_content_margin" android:paddingRight="@dimen/bottom_sheet_content_padding_small" android:paddingTop="@dimen/context_menu_padding_margin_tiny" android:text="@string/shared_string_contents" @@ -118,12 +119,13 @@ android:background="?attr/selectableItemBackground" android:drawablePadding="@dimen/bottom_sheet_content_padding_small" android:ellipsize="end" + android:textAllCaps="true" android:gravity="center_vertical|end" android:letterSpacing="@dimen/text_button_letter_spacing" android:maxLines="1" android:paddingBottom="@dimen/context_menu_padding_margin_tiny" android:paddingLeft="@dimen/bottom_sheet_content_padding_small" - android:paddingRight="@dimen/bottom_sheet_content_padding_small" + android:paddingRight="@dimen/bottom_sheet_content_margin" android:paddingTop="@dimen/context_menu_padding_margin_tiny" android:textColor="?attr/wikivoyage_active_color" android:textSize="@dimen/default_desc_text_size" diff --git a/OsmAnd/res/layout/wikivoyage_contents_child_list_item.xml b/OsmAnd/res/layout/wikivoyage_contents_child_list_item.xml new file mode 100644 index 0000000000..052251ff8a --- /dev/null +++ b/OsmAnd/res/layout/wikivoyage_contents_child_list_item.xml @@ -0,0 +1,22 @@ + + + + + + \ No newline at end of file diff --git a/OsmAnd/res/layout/wikivoyage_contents_group_list_item.xml b/OsmAnd/res/layout/wikivoyage_contents_group_list_item.xml new file mode 100644 index 0000000000..a4f17169c2 --- /dev/null +++ b/OsmAnd/res/layout/wikivoyage_contents_group_list_item.xml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleContentsFragment.java b/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleContentsFragment.java index b68f09ce6d..425a75641d 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleContentsFragment.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleContentsFragment.java @@ -10,7 +10,6 @@ import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ExpandableListView; -import android.widget.ExpandableListView.OnGroupClickListener; import android.widget.LinearLayout; import android.widget.TextView; @@ -67,7 +66,9 @@ public class WikivoyageArticleContentsFragment extends MenuBottomSheetDialogFrag ExpandableListAdapter listAdapter = new ExpandableListAdapter(getContext(), listDataHeader, listDataChild); expListView.setAdapter(listAdapter); - expListView.setChildDivider(ContextCompat.getDrawable(getContext(), R.color.color_transparent)); + Drawable transparent = ContextCompat.getDrawable(getContext(), R.color.color_transparent); + expListView.setDivider(transparent); + expListView.setGroupIndicator(transparent); expListView.setLayoutParams(new LinearLayout.LayoutParams( LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT) @@ -76,33 +77,13 @@ public class WikivoyageArticleContentsFragment extends MenuBottomSheetDialogFrag expListView.setOnChildClickListener(new ExpandableListView.OnChildClickListener() { @Override public boolean onChildClick(ExpandableListView parent, View v, - int groupPosition, int childPosition, long id) { + int groupPosition, int childPosition, long id) { link = map.get(listDataChild.get(listDataHeader.get(groupPosition)).get(childPosition)); sendResult(); dismiss(); return false; } }); - - int width = AndroidUtils.getScreenWidth(getActivity()); - if (android.os.Build.VERSION.SDK_INT < 18) { - expListView.setIndicatorBounds(width - (AndroidUtils.dpToPx(getContext(), 50)), - width - (AndroidUtils.dpToPx(getContext(), 10))); - } else { - expListView.setIndicatorBoundsRelative(width - (AndroidUtils.dpToPx(getContext(), 50)), - width - (AndroidUtils.dpToPx(getContext(), 10))); - } - expListView.setOnGroupClickListener(new OnGroupClickListener() { - @Override - public boolean onGroupClick(ExpandableListView parent, View v, int groupPosition, long id) { - link = map.get(listDataHeader.get(groupPosition)); - sendResult(); - if (listDataChild.get(listDataHeader.get(groupPosition)) == null) { - dismiss(); - } - return false; - } - }); LinearLayout container = new LinearLayout(getContext()); container.addView(expListView); @@ -144,7 +125,7 @@ public class WikivoyageArticleContentsFragment extends MenuBottomSheetDialogFrag private Drawable itemChildIcon; ExpandableListAdapter(Context context, List listDataHeader, - LinkedHashMap> listChildData) { + LinkedHashMap> listChildData) { this.context = context; this.listDataHeader = listDataHeader; this.listDataChild = listChildData; @@ -158,7 +139,7 @@ public class WikivoyageArticleContentsFragment extends MenuBottomSheetDialogFrag @Override public Object getChild(int groupPosition, int childPosititon) { - return this.listDataChild.get(this.listDataHeader.get(groupPosition)).get(childPosititon); + return listDataChild.get(listDataHeader.get(groupPosition)).get(childPosititon); } @Override @@ -172,7 +153,7 @@ public class WikivoyageArticleContentsFragment extends MenuBottomSheetDialogFrag String childText = (String) getChild(groupPosition, childPosition); if (convertView == null) { convertView = LayoutInflater.from(context) - .inflate(R.layout.wikivoyage_contents_list_item, parent, false); + .inflate(R.layout.wikivoyage_contents_child_list_item, parent, false); } TextView txtListChild = (TextView) convertView.findViewById(R.id.item_label); txtListChild.setText(childText); @@ -181,6 +162,12 @@ public class WikivoyageArticleContentsFragment extends MenuBottomSheetDialogFrag : R.color.wikivoyage_contents_parent_icon_light)); txtListChild.setCompoundDrawablesWithIntrinsicBounds(itemChildIcon, null, null, null); + if (childPosition == listDataChild.get(listDataHeader.get(groupPosition)).size() - 1) { + convertView.setPadding(0, 0, 0, AndroidUtils.dpToPx(getContext(),7)); + } else { + convertView.setPadding(0, 0, 0, 0); + } + return convertView; } @@ -206,18 +193,30 @@ public class WikivoyageArticleContentsFragment extends MenuBottomSheetDialogFrag } @Override - public View getGroupView(int groupPosition, boolean isExpanded, + public View getGroupView(final int groupPosition, boolean isExpanded, View convertView, ViewGroup parent) { String headerTitle = (String) getGroup(groupPosition); if (convertView == null) { convertView = LayoutInflater.from(context) - .inflate(R.layout.wikivoyage_contents_list_item, parent, false); + .inflate(R.layout.wikivoyage_contents_group_list_item, parent, false); } + boolean light = getMyApplication().getSettings().isLightContent(); TextView lblListHeader = (TextView) convertView.findViewById(R.id.item_label); lblListHeader.setText(headerTitle); lblListHeader.setTextColor(getResolvedColor(isNightMode() ? R.color.wikivoyage_contents_parent_icon_dark : R.color.wikivoyage_contents_parent_icon_light)); lblListHeader.setCompoundDrawablesWithIntrinsicBounds(itemGroupIcon, null, null, null); - + lblListHeader.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + link = map.get(listDataHeader.get(groupPosition)); + sendResult(); + dismiss(); + } + }); + adjustIndicator(getMyApplication(), groupPosition, isExpanded, convertView, light); + if (isExpanded) { + convertView.findViewById(R.id.bottom_row_divider).setVisibility(View.GONE); + } return convertView; } @@ -231,4 +230,4 @@ public class WikivoyageArticleContentsFragment extends MenuBottomSheetDialogFrag return true; } } -} +} \ No newline at end of file From ed04363a5c104b6e3107e9d159f47ad4b30992d3 Mon Sep 17 00:00:00 2001 From: Chumva Date: Wed, 11 Apr 2018 18:49:07 +0300 Subject: [PATCH 2/8] delete unnecessary xml --- .../wikivoyage_contents_child_list_item.xml | 22 ------- .../wikivoyage_contents_group_list_item.xml | 53 ----------------- .../layout/wikivoyage_contents_list_item.xml | 57 ++++++++++++++----- .../WikivoyageArticleContentsFragment.java | 8 ++- 4 files changed, 49 insertions(+), 91 deletions(-) delete mode 100644 OsmAnd/res/layout/wikivoyage_contents_child_list_item.xml delete mode 100644 OsmAnd/res/layout/wikivoyage_contents_group_list_item.xml diff --git a/OsmAnd/res/layout/wikivoyage_contents_child_list_item.xml b/OsmAnd/res/layout/wikivoyage_contents_child_list_item.xml deleted file mode 100644 index 052251ff8a..0000000000 --- a/OsmAnd/res/layout/wikivoyage_contents_child_list_item.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/OsmAnd/res/layout/wikivoyage_contents_group_list_item.xml b/OsmAnd/res/layout/wikivoyage_contents_group_list_item.xml deleted file mode 100644 index a4f17169c2..0000000000 --- a/OsmAnd/res/layout/wikivoyage_contents_group_list_item.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/OsmAnd/res/layout/wikivoyage_contents_list_item.xml b/OsmAnd/res/layout/wikivoyage_contents_list_item.xml index 040a075af4..3f8fa47881 100644 --- a/OsmAnd/res/layout/wikivoyage_contents_list_item.xml +++ b/OsmAnd/res/layout/wikivoyage_contents_list_item.xml @@ -1,23 +1,54 @@ - + android:layout_height="1dp" + android:layout_marginBottom="@dimen/bottom_sheet_divider_margin_bottom" + android:background="?attr/wikivoyage_card_divider_color" /> + + + + + + + + + + \ No newline at end of file diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleContentsFragment.java b/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleContentsFragment.java index 425a75641d..f0d73dd116 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleContentsFragment.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleContentsFragment.java @@ -153,7 +153,7 @@ public class WikivoyageArticleContentsFragment extends MenuBottomSheetDialogFrag String childText = (String) getChild(groupPosition, childPosition); if (convertView == null) { convertView = LayoutInflater.from(context) - .inflate(R.layout.wikivoyage_contents_child_list_item, parent, false); + .inflate(R.layout.wikivoyage_contents_list_item, parent, false); } TextView txtListChild = (TextView) convertView.findViewById(R.id.item_label); txtListChild.setText(childText); @@ -161,7 +161,9 @@ public class WikivoyageArticleContentsFragment extends MenuBottomSheetDialogFrag ? R.color.wikivoyage_contents_parent_icon_dark : R.color.wikivoyage_contents_parent_icon_light)); txtListChild.setCompoundDrawablesWithIntrinsicBounds(itemChildIcon, null, null, null); - + convertView.findViewById(R.id.upper_row_divider).setVisibility(View.GONE); + convertView.findViewById(R.id.bottom_row_divider).setVisibility(View.GONE); + txtListChild.setTypeface(null); if (childPosition == listDataChild.get(listDataHeader.get(groupPosition)).size() - 1) { convertView.setPadding(0, 0, 0, AndroidUtils.dpToPx(getContext(),7)); } else { @@ -198,7 +200,7 @@ public class WikivoyageArticleContentsFragment extends MenuBottomSheetDialogFrag String headerTitle = (String) getGroup(groupPosition); if (convertView == null) { convertView = LayoutInflater.from(context) - .inflate(R.layout.wikivoyage_contents_group_list_item, parent, false); + .inflate(R.layout.wikivoyage_contents_list_item, parent, false); } boolean light = getMyApplication().getSettings().isLightContent(); TextView lblListHeader = (TextView) convertView.findViewById(R.id.item_label); From f680d192d1c32175653f5284fab8bbed3fd30870 Mon Sep 17 00:00:00 2001 From: Chumva Date: Wed, 11 Apr 2018 18:52:30 +0300 Subject: [PATCH 3/8] formatted some code --- .../article/WikivoyageArticleContentsFragment.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleContentsFragment.java b/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleContentsFragment.java index f0d73dd116..b385e0050d 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleContentsFragment.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleContentsFragment.java @@ -77,7 +77,7 @@ public class WikivoyageArticleContentsFragment extends MenuBottomSheetDialogFrag expListView.setOnChildClickListener(new ExpandableListView.OnChildClickListener() { @Override public boolean onChildClick(ExpandableListView parent, View v, - int groupPosition, int childPosition, long id) { + int groupPosition, int childPosition, long id) { link = map.get(listDataChild.get(listDataHeader.get(groupPosition)).get(childPosition)); sendResult(); dismiss(); @@ -125,7 +125,7 @@ public class WikivoyageArticleContentsFragment extends MenuBottomSheetDialogFrag private Drawable itemChildIcon; ExpandableListAdapter(Context context, List listDataHeader, - LinkedHashMap> listChildData) { + LinkedHashMap> listChildData) { this.context = context; this.listDataHeader = listDataHeader; this.listDataChild = listChildData; @@ -161,6 +161,7 @@ public class WikivoyageArticleContentsFragment extends MenuBottomSheetDialogFrag ? R.color.wikivoyage_contents_parent_icon_dark : R.color.wikivoyage_contents_parent_icon_light)); txtListChild.setCompoundDrawablesWithIntrinsicBounds(itemChildIcon, null, null, null); + convertView.findViewById(R.id.upper_row_divider).setVisibility(View.GONE); convertView.findViewById(R.id.bottom_row_divider).setVisibility(View.GONE); txtListChild.setTypeface(null); @@ -207,6 +208,7 @@ public class WikivoyageArticleContentsFragment extends MenuBottomSheetDialogFrag lblListHeader.setText(headerTitle); lblListHeader.setTextColor(getResolvedColor(isNightMode() ? R.color.wikivoyage_contents_parent_icon_dark : R.color.wikivoyage_contents_parent_icon_light)); lblListHeader.setCompoundDrawablesWithIntrinsicBounds(itemGroupIcon, null, null, null); + lblListHeader.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { From f0e894a537278cf06bd6971d6a1fcaaf32f6e526 Mon Sep 17 00:00:00 2001 From: Chumva Date: Thu, 12 Apr 2018 13:39:27 +0300 Subject: [PATCH 4/8] change click behaviour in expListView and style --- .../fragment_wikivoyage_article_dialog.xml | 11 --- .../layout/wikivoyage_contents_list_item.xml | 82 ++++++++++--------- .../WikivoyageArticleContentsFragment.java | 39 ++++++--- .../WikivoyageArticleDialogFragment.java | 2 + 4 files changed, 71 insertions(+), 63 deletions(-) diff --git a/OsmAnd/res/layout/fragment_wikivoyage_article_dialog.xml b/OsmAnd/res/layout/fragment_wikivoyage_article_dialog.xml index 3204f3f542..d173b861b8 100644 --- a/OsmAnd/res/layout/fragment_wikivoyage_article_dialog.xml +++ b/OsmAnd/res/layout/fragment_wikivoyage_article_dialog.xml @@ -69,17 +69,6 @@ android:layout_gravity="bottom|center_horizontal" android:orientation="vertical"> - - - - + xmlns:osmand="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:background="?attr/selectableItemBackground" + android:orientation="vertical"> - + - + - + + android:paddingLeft="@dimen/list_content_padding" + android:paddingRight="@dimen/list_content_padding" + android:scaleType="center" + tools:src="@drawable/ic_action_arrow_up"/> - + - + \ No newline at end of file diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleContentsFragment.java b/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleContentsFragment.java index b385e0050d..177dda31b0 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleContentsFragment.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleContentsFragment.java @@ -10,10 +10,10 @@ import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ExpandableListView; +import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; -import net.osmand.AndroidUtils; import net.osmand.plus.R; import net.osmand.plus.activities.OsmandBaseExpandableListAdapter; import net.osmand.plus.base.MenuBottomSheetDialogFragment; @@ -35,6 +35,8 @@ public class WikivoyageArticleContentsFragment extends MenuBottomSheetDialogFrag public static final int REQUEST_LINK_CODE = 0; + private ExpandableListView expListView; + private LinkedHashMap map; private String link; @@ -62,7 +64,7 @@ public class WikivoyageArticleContentsFragment extends MenuBottomSheetDialogFrag items.add(new TitleItem(getString(R.string.shared_string_contents))); - ExpandableListView expListView = new ExpandableListView(getContext()); + expListView = new ExpandableListView(getContext()); ExpandableListAdapter listAdapter = new ExpandableListAdapter(getContext(), listDataHeader, listDataChild); expListView.setAdapter(listAdapter); @@ -84,6 +86,15 @@ public class WikivoyageArticleContentsFragment extends MenuBottomSheetDialogFrag return false; } }); + expListView.setOnGroupClickListener(new ExpandableListView.OnGroupClickListener() { + @Override + public boolean onGroupClick(ExpandableListView parent, View v, int groupPosition, long id) { + link = map.get(listDataHeader.get(groupPosition)); + sendResult(); + dismiss(); + return false; + } + }); LinearLayout container = new LinearLayout(getContext()); container.addView(expListView); @@ -163,12 +174,11 @@ public class WikivoyageArticleContentsFragment extends MenuBottomSheetDialogFrag txtListChild.setCompoundDrawablesWithIntrinsicBounds(itemChildIcon, null, null, null); convertView.findViewById(R.id.upper_row_divider).setVisibility(View.GONE); - convertView.findViewById(R.id.bottom_row_divider).setVisibility(View.GONE); txtListChild.setTypeface(null); if (childPosition == listDataChild.get(listDataHeader.get(groupPosition)).size() - 1) { - convertView.setPadding(0, 0, 0, AndroidUtils.dpToPx(getContext(),7)); + convertView.findViewById(R.id.bottom_row_divider).setVisibility(View.VISIBLE); } else { - convertView.setPadding(0, 0, 0, 0); + convertView.findViewById(R.id.bottom_row_divider).setVisibility(View.GONE); } return convertView; @@ -196,8 +206,8 @@ public class WikivoyageArticleContentsFragment extends MenuBottomSheetDialogFrag } @Override - public View getGroupView(final int groupPosition, boolean isExpanded, - View convertView, ViewGroup parent) { + public View getGroupView(final int groupPosition, final boolean isExpanded, + View convertView, ViewGroup parent) { String headerTitle = (String) getGroup(groupPosition); if (convertView == null) { convertView = LayoutInflater.from(context) @@ -209,17 +219,22 @@ public class WikivoyageArticleContentsFragment extends MenuBottomSheetDialogFrag lblListHeader.setTextColor(getResolvedColor(isNightMode() ? R.color.wikivoyage_contents_parent_icon_dark : R.color.wikivoyage_contents_parent_icon_light)); lblListHeader.setCompoundDrawablesWithIntrinsicBounds(itemGroupIcon, null, null, null); - lblListHeader.setOnClickListener(new View.OnClickListener() { + adjustIndicator(getMyApplication(), groupPosition, isExpanded, convertView, light); + ImageView indicator = (ImageView) convertView.findViewById(R.id.explist_indicator); + indicator.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { - link = map.get(listDataHeader.get(groupPosition)); - sendResult(); - dismiss(); + if(isExpanded){ + expListView.collapseGroup(groupPosition); + } else { + expListView.expandGroup(groupPosition); + } } }); - adjustIndicator(getMyApplication(), groupPosition, isExpanded, convertView, light); if (isExpanded) { convertView.findViewById(R.id.bottom_row_divider).setVisibility(View.GONE); + } else { + convertView.findViewById(R.id.bottom_row_divider).setVisibility(View.VISIBLE); } return convertView; } diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleDialogFragment.java b/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleDialogFragment.java index 6edf4e53fa..875c9b3b6f 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleDialogFragment.java @@ -94,6 +94,8 @@ public class WikivoyageArticleDialogFragment extends WikivoyageBaseDialogFragmen } }); + View contents = (View) mainView.findViewById(R.id.bottom_bar); + AndroidUtils.setBackground(getContext(), contents, nightMode, R.drawable.bg_bottom_menu_light, R.drawable.bg_bottom_menu_dark); TextView contentsBtn = (TextView) mainView.findViewById(R.id.contents_button); contentsBtn.setCompoundDrawablesWithIntrinsicBounds( getActiveIcon(R.drawable.ic_action_contents), null, null, null From 3bec93ef853fd79b9859332b674ed5581ca695c0 Mon Sep 17 00:00:00 2001 From: Chumva Date: Thu, 12 Apr 2018 13:42:08 +0300 Subject: [PATCH 5/8] refactor xml --- .../fragment_wikivoyage_article_dialog.xml | 8 ++++---- .../layout/wikivoyage_contents_list_item.xml | 18 +++++++++--------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/OsmAnd/res/layout/fragment_wikivoyage_article_dialog.xml b/OsmAnd/res/layout/fragment_wikivoyage_article_dialog.xml index d173b861b8..3943bad0cd 100644 --- a/OsmAnd/res/layout/fragment_wikivoyage_article_dialog.xml +++ b/OsmAnd/res/layout/fragment_wikivoyage_article_dialog.xml @@ -83,7 +83,6 @@ android:background="?attr/selectableItemBackground" android:drawablePadding="@dimen/bottom_sheet_content_padding_small" android:ellipsize="end" - android:textAllCaps="true" android:gravity="center_vertical" android:letterSpacing="@dimen/text_button_letter_spacing" android:maxLines="1" @@ -92,12 +91,13 @@ android:paddingRight="@dimen/bottom_sheet_content_padding_small" android:paddingTop="@dimen/context_menu_padding_margin_tiny" android:text="@string/shared_string_contents" + android:textAllCaps="true" android:textColor="?attr/wikivoyage_active_color" android:textSize="@dimen/default_desc_text_size" osmand:typeface="@string/font_roboto_medium" tools:drawableLeft="@drawable/ic_action_list_header" tools:drawableTint="?attr/wikivoyage_active_color" - tools:ignore="UnusedAttribute"/> + tools:ignore="UnusedAttribute" /> + tools:text="Save" /> diff --git a/OsmAnd/res/layout/wikivoyage_contents_list_item.xml b/OsmAnd/res/layout/wikivoyage_contents_list_item.xml index 850b34e10f..5a8df25af2 100644 --- a/OsmAnd/res/layout/wikivoyage_contents_list_item.xml +++ b/OsmAnd/res/layout/wikivoyage_contents_list_item.xml @@ -34,15 +34,15 @@ tools:drawableStart="@drawable/ic_action_list_header" tools:text="@string/shared_string_contents" /> - + From 0dd527846a4bb27b2c743b5c8f6bdbbd6ee71f07 Mon Sep 17 00:00:00 2001 From: Chumva Date: Thu, 12 Apr 2018 13:47:10 +0300 Subject: [PATCH 6/8] delete textAllCaps --- OsmAnd/res/layout/fragment_wikivoyage_article_dialog.xml | 2 -- 1 file changed, 2 deletions(-) diff --git a/OsmAnd/res/layout/fragment_wikivoyage_article_dialog.xml b/OsmAnd/res/layout/fragment_wikivoyage_article_dialog.xml index 3943bad0cd..6356e4861b 100644 --- a/OsmAnd/res/layout/fragment_wikivoyage_article_dialog.xml +++ b/OsmAnd/res/layout/fragment_wikivoyage_article_dialog.xml @@ -91,7 +91,6 @@ android:paddingRight="@dimen/bottom_sheet_content_padding_small" android:paddingTop="@dimen/context_menu_padding_margin_tiny" android:text="@string/shared_string_contents" - android:textAllCaps="true" android:textColor="?attr/wikivoyage_active_color" android:textSize="@dimen/default_desc_text_size" osmand:typeface="@string/font_roboto_medium" @@ -115,7 +114,6 @@ android:paddingLeft="@dimen/bottom_sheet_content_padding_small" android:paddingRight="@dimen/bottom_sheet_content_margin" android:paddingTop="@dimen/context_menu_padding_margin_tiny" - android:textAllCaps="true" android:textColor="?attr/wikivoyage_active_color" android:textSize="@dimen/default_desc_text_size" osmand:typeface="@string/font_roboto_medium" From f5c985575894253bb3473525422904c07ba87dbc Mon Sep 17 00:00:00 2001 From: Chumva Date: Thu, 12 Apr 2018 14:01:06 +0300 Subject: [PATCH 7/8] shanged shadow --- OsmAnd/res/layout/fragment_wikivoyage_article_dialog.xml | 5 +++++ .../wikivoyage/article/WikivoyageArticleDialogFragment.java | 2 -- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/OsmAnd/res/layout/fragment_wikivoyage_article_dialog.xml b/OsmAnd/res/layout/fragment_wikivoyage_article_dialog.xml index 6356e4861b..787f1b54aa 100644 --- a/OsmAnd/res/layout/fragment_wikivoyage_article_dialog.xml +++ b/OsmAnd/res/layout/fragment_wikivoyage_article_dialog.xml @@ -69,6 +69,11 @@ android:layout_gravity="bottom|center_horizontal" android:orientation="vertical"> + + Date: Thu, 12 Apr 2018 14:28:29 +0300 Subject: [PATCH 8/8] disable standard expListView selector --- .../wikivoyage/article/WikivoyageArticleContentsFragment.java | 1 + 1 file changed, 1 insertion(+) diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleContentsFragment.java b/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleContentsFragment.java index 177dda31b0..6d0e9d6c5b 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleContentsFragment.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleContentsFragment.java @@ -71,6 +71,7 @@ public class WikivoyageArticleContentsFragment extends MenuBottomSheetDialogFrag Drawable transparent = ContextCompat.getDrawable(getContext(), R.color.color_transparent); expListView.setDivider(transparent); expListView.setGroupIndicator(transparent); + expListView.setSelector(transparent); expListView.setLayoutParams(new LinearLayout.LayoutParams( LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT)