Merge pull request #4588 from osmandapp/align_text_in_widgets
Align text in widgets
This commit is contained in:
commit
192da495ba
1 changed files with 78 additions and 67 deletions
|
@ -1,46 +1,46 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/widget_bg"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/btn_left_round"
|
||||
android:minWidth="@dimen/map_minwidth_widget"
|
||||
android:orientation="vertical" >
|
||||
android:orientation="vertical">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal" >
|
||||
android:layout_gravity="center_horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/widget_top_icon_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center"
|
||||
android:layout_marginTop="2dp"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/color_black"
|
||||
android:textSize="@dimen/map_widget_text_size"
|
||||
android:visibility="gone" />
|
||||
android:visibility="gone"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/widget_top_icon"
|
||||
android:layout_width="@dimen/map_widget_image"
|
||||
android:layout_height="@dimen/map_widget_image"
|
||||
android:layout_marginTop="2dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="2dp"
|
||||
android:gravity="center"
|
||||
android:src="@drawable/ic_action_test_light"
|
||||
android:visibility="gone" />
|
||||
android:visibility="gone"/>
|
||||
</FrameLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/widget_bottom_layout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/map_widget_height"
|
||||
android:id="@+id/widget_bottom_layout"
|
||||
|
||||
android:orientation="horizontal" >
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/widget_icon"
|
||||
|
@ -50,70 +50,81 @@
|
|||
android:layout_marginLeft="@dimen/map_widget_icon_margin"
|
||||
android:layout_marginRight="@dimen/map_widget_icon_margin"
|
||||
android:gravity="center"
|
||||
android:src="@drawable/ic_action_test_light" />
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom"
|
||||
android:layout_marginBottom="@dimen/map_widget_text_bottom_margin"
|
||||
android:layout_marginLeft="@dimen/map_widget_icon_margin"
|
||||
android:layout_marginRight="@dimen/map_widget_icon_margin"
|
||||
android:layout_weight="1" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/widget_text_shadow"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:minWidth="10dp"
|
||||
tools:text="1048"
|
||||
android:textColor="@color/color_white"
|
||||
android:textSize="@dimen/map_widget_text_size" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/widget_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:minWidth="10dp"
|
||||
tools:text="1048"
|
||||
android:textColor="@color/color_black"
|
||||
android:textSize="@dimen/map_widget_text_size" />
|
||||
</FrameLayout>
|
||||
android:src="@drawable/ic_action_test_light"/>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom"
|
||||
android:layout_marginBottom="@dimen/map_widget_text_small_bottom_margin"
|
||||
android:layout_marginLeft="4dp"
|
||||
android:layout_marginRight="4dp" >
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:layout_marginLeft="@dimen/map_widget_icon_margin"
|
||||
android:layout_marginRight="4dp"
|
||||
android:layout_marginStart="@dimen/map_widget_icon_margin">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/widget_text_small_shadow"
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
tools:text="km"
|
||||
android:textColor="@color/color_white"
|
||||
android:textSize="@dimen/map_widget_text_size_small" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/widget_text_small"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/widget_text_shadow"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/map_widget_icon_margin"
|
||||
android:layout_marginRight="@dimen/map_widget_icon_margin"
|
||||
android:maxLines="1"
|
||||
android:minWidth="10dp"
|
||||
android:textColor="@color/color_white"
|
||||
android:textSize="@dimen/map_widget_text_size"
|
||||
tools:text="1048"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/widget_text_small_shadow"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignBaseline="@+id/widget_text_shadow"
|
||||
android:layout_marginLeft="4dp"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_toEndOf="@+id/widget_text_shadow"
|
||||
android:layout_toRightOf="@+id/widget_text_shadow"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/color_white"
|
||||
android:textSize="@dimen/map_widget_text_size_small"
|
||||
tools:text="km"/>
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
tools:text="km"
|
||||
android:textColor="@color/color_black"
|
||||
android:textSize="@dimen/map_widget_text_size_small" />
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/widget_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/map_widget_icon_margin"
|
||||
android:layout_marginRight="@dimen/map_widget_icon_margin"
|
||||
android:maxLines="1"
|
||||
android:minWidth="10dp"
|
||||
android:textColor="@color/color_black"
|
||||
android:textSize="@dimen/map_widget_text_size"
|
||||
tools:text="1048"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/widget_text_small"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignBaseline="@+id/widget_text"
|
||||
android:layout_marginLeft="4dp"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_toEndOf="@+id/widget_text"
|
||||
android:layout_toRightOf="@+id/widget_text"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/color_black"
|
||||
android:textSize="@dimen/map_widget_text_size_small"
|
||||
tools:text="km"/>
|
||||
</RelativeLayout>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
Loading…
Reference in a new issue