forked from organicmaps/organicmaps
Merge pull request #1098 from yunikkk/fix-search-item
[android] Fixed layout for search item.
This commit is contained in:
commit
072cac5e24
1 changed files with 70 additions and 62 deletions
|
@ -1,71 +1,79 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?selectableItemBackground"
|
||||
android:minHeight="@dimen/search_item_height"
|
||||
android:padding="@dimen/margin_base"
|
||||
tools:background="#20FF0000">
|
||||
<TextView
|
||||
android:id="@+id/closed"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:background="@drawable/search_closed_marker"
|
||||
android:paddingBottom="@dimen/margin_eighth"
|
||||
android:paddingLeft="@dimen/margin_half"
|
||||
android:paddingRight="@dimen/margin_half"
|
||||
android:paddingTop="@dimen/margin_eighth"
|
||||
android:text="@string/closed"
|
||||
android:textAppearance="@style/MwmTextAppearance.Body4.Light"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/distance"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_below="@id/closed"
|
||||
android:gravity="bottom"
|
||||
android:textAppearance="@style/MwmTextAppearance.Body3"
|
||||
android:textColor="@color/base_blue_light"
|
||||
tools:text="500 km \u2022 \u2605\u2606\u2606\u2606\u2606"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?selectableItemBackground"
|
||||
android:minHeight="@dimen/search_item_height"
|
||||
android:padding="@dimen/margin_base"
|
||||
tools:background="#20FF0000">
|
||||
<TextView
|
||||
android:id="@+id/closed"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:textAppearance="@style/MwmTextAppearance.Body4.Light"
|
||||
android:text="@string/closed"
|
||||
android:background="@drawable/search_closed_marker"
|
||||
android:paddingLeft="@dimen/margin_half"
|
||||
android:paddingRight="@dimen/margin_half"
|
||||
android:paddingTop="@dimen/margin_eighth"
|
||||
android:paddingBottom="@dimen/margin_eighth"/>
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_toLeftOf="@id/closed"
|
||||
android:layout_toStartOf="@id/closed"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="2"
|
||||
android:textAppearance="@style/MwmTextAppearance.Body1"
|
||||
tools:text="Long long title that wraps to multiple lines"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/distance"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_below="@id/closed"
|
||||
android:gravity="bottom"
|
||||
android:textAppearance="@style/MwmTextAppearance.Body3"
|
||||
android:textColor="@color/base_blue_light"
|
||||
tools:text="500 km \u2022 \u2605\u2606\u2606\u2606\u2606"/>
|
||||
android:id="@+id/description"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_below="@id/title"
|
||||
android:layout_marginTop="@dimen/margin_quarter"
|
||||
android:layout_toLeftOf="@id/distance"
|
||||
android:layout_toStartOf="@id/distance"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="@style/MwmTextAppearance.Body3"
|
||||
tools:text="Hotel \u2022 \u2605\u2605\u2605\u2605\u2605"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_toLeftOf="@id/closed"
|
||||
android:textAppearance="@style/MwmTextAppearance.Body1"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="2"
|
||||
tools:text="Long long title that wraps to multiple lines"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/description"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_below="@id/title"
|
||||
android:layout_toRightOf="@id/distance"
|
||||
android:layout_marginTop="@dimen/margin_quarter"
|
||||
android:textAppearance="@style/MwmTextAppearance.Body3"
|
||||
android:singleLine="true"
|
||||
tools:text="Hotel \u2022 \u2605\u2605\u2605\u2605\u2605"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/region"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_below="@id/description"
|
||||
android:layout_toRightOf="@id/distance"
|
||||
android:layout_marginTop="@dimen/margin_quarter"
|
||||
android:textAppearance="@style/MwmTextAppearance.Body3"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="end"
|
||||
tools:text="Russia, Moscow & Central, Moscow"/>
|
||||
android:id="@+id/region"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_below="@id/description"
|
||||
android:layout_marginTop="@dimen/margin_quarter"
|
||||
android:layout_toLeftOf="@id/distance"
|
||||
android:layout_toStartOf="@id/distance"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="@style/MwmTextAppearance.Body3"
|
||||
tools:text="Russia, Moscow & Central, Moscow"/>
|
||||
</RelativeLayout>
|
||||
|
|
Loading…
Add table
Reference in a new issue