Update wikivoyage search card design
This commit is contained in:
parent
28e35dc196
commit
8b39c43115
4 changed files with 55 additions and 27 deletions
12
OsmAnd/res/drawable/wikivoyage_search_card_bg.xml
Normal file
12
OsmAnd/res/drawable/wikivoyage_search_card_bg.xml
Normal file
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item>
|
||||
<nine-patch android:src="@drawable/bg_card_shadow_cr3dp"/>
|
||||
</item>
|
||||
<item>
|
||||
<shape>
|
||||
<solid android:color="?attr/wikivoyage_card_bg_color"/>
|
||||
<corners android:radius="3dp"/>
|
||||
</shape>
|
||||
</item>
|
||||
</layer-list>
|
|
@ -55,42 +55,54 @@
|
|||
android:text="@string/shared_string_options"
|
||||
android:textColor="?attr/wikivoyage_active_color"
|
||||
android:textSize="@dimen/default_desc_text_size"
|
||||
osmand:typeface="@string/font_roboto_medium"/>
|
||||
osmand:typeface="@string/font_roboto_medium"
|
||||
tools:ignore="UnusedAttribute"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</android.support.v7.widget.Toolbar>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/text_margin_small"
|
||||
android:layout_marginRight="@dimen/text_margin_small"
|
||||
android:background="@drawable/wikivoyage_search_card_bg">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/search_button"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dashboard_map_toolbar"
|
||||
android:background="?attr/bg_color"
|
||||
android:layout_height="@dimen/bottom_sheet_list_item_height"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/search_hint"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginLeft="@dimen/content_padding"
|
||||
android:layout_marginStart="@dimen/content_padding"
|
||||
android:layout_weight="1"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center_vertical"
|
||||
android:maxLines="1"
|
||||
android:text="@string/search_poi_category_hint"
|
||||
android:textColor="?attr/searchbar_text_hint"
|
||||
android:textSize="@dimen/default_list_text_size_large"/>
|
||||
android:text="@string/wikivoyage_search_hint"
|
||||
android:textSize="@dimen/default_list_text_size"
|
||||
tools:textColor="?attr/searchbar_text_hint"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/search_icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="16dp"
|
||||
android:layout_marginLeft="@dimen/content_padding_small"
|
||||
android:layout_marginRight="@dimen/content_padding_small"
|
||||
android:contentDescription="@string/shared_string_search"
|
||||
tools:src="@drawable/ic_action_search_dark"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<net.osmand.plus.LockableViewPager
|
||||
android:id="@+id/view_pager"
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
3. All your modified/created strings are in the top of the file (to make easier find what\'s translated).
|
||||
PLEASE: Have a look at http://code.google.com/p/osmand/wiki/UIConsistency, it may really improve your and our work :-) Thx - Hardy
|
||||
-->
|
||||
<string name="wikivoyage_search_hint">Search: Country, City, Province</string>
|
||||
<string name="shared_string_read">Read</string>
|
||||
<string name="saved_articles">Saved articles</string>
|
||||
<string name="shared_string_explore">Explore</string>
|
||||
|
|
|
@ -15,6 +15,7 @@ import android.view.MenuItem;
|
|||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import net.osmand.AndroidUtils;
|
||||
import net.osmand.plus.LockableViewPager;
|
||||
|
@ -40,8 +41,10 @@ public class WikivoyageExploreDialogFragment extends WikivoyageBaseDialogFragmen
|
|||
|
||||
setupToolbar((Toolbar) mainView.findViewById(R.id.toolbar));
|
||||
|
||||
int searchColorId = nightMode ? R.color.icon_color : R.color.ctx_menu_title_color_dark;
|
||||
((TextView) mainView.findViewById(R.id.search_hint)).setTextColor(getResolvedColor(searchColorId));
|
||||
((ImageView) mainView.findViewById(R.id.search_icon))
|
||||
.setImageDrawable(getContentIcon(R.drawable.ic_action_search_dark));
|
||||
.setImageDrawable(getIcon(R.drawable.ic_action_search_dark, searchColorId));
|
||||
|
||||
mainView.findViewById(R.id.search_button).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue