diff --git a/OsmAnd/res/layout/fragment_wikivoyage_search_dialog.xml b/OsmAnd/res/layout/fragment_wikivoyage_search_dialog.xml index 3916a346df..03ef56bd66 100644 --- a/OsmAnd/res/layout/fragment_wikivoyage_search_dialog.xml +++ b/OsmAnd/res/layout/fragment_wikivoyage_search_dialog.xml @@ -29,6 +29,7 @@ + android:layout_height="match_parent" + android:scrollbars="vertical"/> diff --git a/OsmAnd/res/layout/wikivoyage_search_list_item.xml b/OsmAnd/res/layout/wikivoyage_search_list_item.xml index 09d3095579..420febfba8 100644 --- a/OsmAnd/res/layout/wikivoyage_search_list_item.xml +++ b/OsmAnd/res/layout/wikivoyage_search_list_item.xml @@ -1,70 +1,64 @@ + android:background="?attr/wikivoyage_card_bg_color" + android:orientation="vertical"> + android:layout_height="wrap_content" + android:background="?attr/selectableItemBackground" + android:minHeight="@dimen/bottom_sheet_selected_item_title_height" + android:paddingLeft="@dimen/content_padding" + android:paddingRight="@dimen/content_padding"> - + android:layout_gravity="center_vertical" + android:layout_marginEnd="@dimen/content_padding" + android:layout_marginRight="@dimen/content_padding" + tools:src="@drawable/ic_action_placeholder_city"/> + + + + + + + - - - - - - - - - - - - - - - - - - - - - + android:layout_height="1dp" + android:layout_marginLeft="@dimen/bottom_sheet_selected_item_title_height" + android:layout_marginStart="@dimen/bottom_sheet_selected_item_title_height" + android:background="?attr/wikivoyage_card_divider_color" + android:focusable="false"/> diff --git a/OsmAnd/res/values/attrs.xml b/OsmAnd/res/values/attrs.xml index 9e6304792f..dcf46a1d84 100644 --- a/OsmAnd/res/values/attrs.xml +++ b/OsmAnd/res/values/attrs.xml @@ -67,6 +67,7 @@ + diff --git a/OsmAnd/res/values/styles.xml b/OsmAnd/res/values/styles.xml index c1f61c518c..9e4e5d219f 100644 --- a/OsmAnd/res/values/styles.xml +++ b/OsmAnd/res/values/styles.xml @@ -199,6 +199,7 @@ @color/wikivoyage_bg_light @color/wikivoyage_card_bg_light + @color/wikivoyage_card_divider_light @color/wikivoyage_app_bar_light @color/wikivoyage_app_bar_text_light @color/wikivoyage_active_light @@ -389,6 +390,7 @@ @color/wikivoyage_bg_dark @color/wikivoyage_card_bg_dark + @color/wikivoyage_card_divider_dark @color/wikivoyage_app_bar_dark @color/wikivoyage_app_bar_text_dark @color/wikivoyage_active_dark diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/search/SearchRecyclerViewAdapter.java b/OsmAnd/src/net/osmand/plus/wikivoyage/search/SearchRecyclerViewAdapter.java index 607b5dea6f..7eda185ae9 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/search/SearchRecyclerViewAdapter.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/search/SearchRecyclerViewAdapter.java @@ -6,8 +6,11 @@ import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; +import android.widget.ImageView; import android.widget.TextView; +import net.osmand.plus.IconsCache; +import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; import net.osmand.plus.wikivoyage.data.WikivoyageSearchResult; @@ -16,6 +19,8 @@ import java.util.List; public class SearchRecyclerViewAdapter extends RecyclerView.Adapter { + private IconsCache iconsCache; + private List items = new ArrayList<>(); private View.OnClickListener onItemClickListener; @@ -24,6 +29,10 @@ public class SearchRecyclerViewAdapter extends RecyclerView.Adapter