Updated layouts. Created styles.

This commit is contained in:
Denis 2014-11-06 18:12:28 +02:00
parent 29b6cd520b
commit 37ec1ff1ce
3 changed files with 94 additions and 25 deletions

View file

@ -6,6 +6,7 @@
android:padding="8dp"
android:layout_height="match_parent"
android:background="@drawable/background">
<LinearLayout android:id="@+id/search"
android:orientation="vertical"
android:layout_width="fill_parent"
@ -13,9 +14,54 @@
android:background="@color/color_white"
android:layout_marginBottom="8dp">
<TextView android:text="@string/tip_search"
android:layout_width="wrap_content"
android:layout_gravity="center_horizontal"
android:gravity="center_vertical"
android:textColor="@color/color_black"
android:textSize="16sp"
android:layout_height="30dp"/>
<LinearLayout android:orientation="horizontal"
android:layout_width="fill_parent"
android:gravity="center_horizontal"
android:layout_height="wrap_content"/>
android:background="@color/group_background"
android:layout_height="80dp">
<Button android:id="@+id/poi"
android:text="@string/poi"
android:drawableTop="@drawable/ic_action_info_light"
android:layout_marginRight="1dp"
style="@style/DashboardSearchButton"/>
<Button android:id="@+id/address"
android:text="@string/address"
android:layout_marginRight="1dp"
android:layout_marginLeft="1dp"
android:drawableTop="@drawable/ic_action_home_light"
style="@style/DashboardSearchButton"/>
<Button android:id="@+id/coord"
android:text="@string/coordinates"
android:layout_marginLeft="1dp"
android:drawableTop="@drawable/ic_action_marker_light"
style="@style/DashboardSearchButton"/>
</LinearLayout>
<LinearLayout android:orientation="horizontal"
android:layout_width="fill_parent"
android:background="@color/group_background"
android:layout_height="80dp">
<Button android:id="@+id/fav"
android:text="@string/my_favorites"
android:drawableTop="@drawable/ic_action_fav_light"
android:layout_marginRight="1dp"
style="@style/DashboardSearchButton"/>
<Button android:id="@+id/history"
android:text="@string/history"
android:drawableTop="@drawable/ic_action_fav_light"
android:layout_marginRight="1dp"
android:layout_marginLeft="1dp"
style="@style/DashboardSearchButton"/>
<Button android:id="@+id/transport"
android:text="@string/rendering_category_transport"
android:drawableTop="@drawable/ic_action_bus_light"
android:layout_marginLeft="1dp"
style="@style/DashboardSearchButton"/>
</LinearLayout>
</LinearLayout>
<LinearLayout android:id="@+id/home"
@ -25,15 +71,15 @@
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<ImageView android:id="@+id/home_img"
android:layout_gravity="center_vertical"
android:src="@drawable/ic_action_home_light"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<TextView android:text="@string/favorite_home_category"
android:layout_weight="1"
android:layout_width="0dp"
android:layout_height="wrap_content"/>
<Button android:text="@string/tip_navigation"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
style="@style/DashboardSubHeader"/>
<Button android:id="@+id/navigation"
android:text="@string/tip_navigation"
style="@style/DashboardGeneralButton"/>
</LinearLayout>
<LinearLayout android:orientation="vertical"
@ -44,21 +90,17 @@
<LinearLayout android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<TextView android:id="@+id/map_name"
android:text="@string/map_Button"
android:layout_width="0dp"
android:layout_height="fill_parent"
android:layout_weight="1"/>
<TextView android:text="@string/map_Button"
style="@style/DashboardSubHeader"/>
<Button android:id="@+id/show_on_map"
android:text="@string/search_shown_on_map"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
style="@style/DashboardGeneralButton"/>
</LinearLayout>
<net.osmand.plus.views.OsmAndMapSurfaceView
android:id="@+id/MapView"
android:layout_width="fill_parent"
android:layout_height="200dp"
android:layout_height="160dp"
android:contentDescription="@string/map_view"
android:visibility="gone" />
</LinearLayout>
@ -68,14 +110,11 @@
android:layout_marginBottom="8dp"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<TextView android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@string/my_data_Button"
android:layout_weight="1"/>
<TextView android:text="@string/my_data_Button"
style="@style/DashboardSubHeader"/>
<Button android:id="@+id/btn_show_all"
android:text="show all"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
android:text="@string/show_all"
style="@style/DashboardGeneralButton"/>
</LinearLayout>
<ListView android:id="@+id/list_favorites"

View file

@ -9,6 +9,8 @@
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="show_all">SHOW ALL</string>
<string name="coordinates">Coordinates</string>
<string name="wake_on_voice">Turn on the screen</string>
<string name="wake_on_voice_descr">Turn on the phone screen when approaching a turn</string>
<string name="select_impassable_road">Select on map</string>

View file

@ -7,8 +7,36 @@
<item name="android:windowContentOverlay">@null</item>
<item name="android:backgroundDimEnabled">false</item>
</style>
<style name="DashboardSubHeader">
<item name="android:layout_width">0dp</item>
<item name="android:layout_weight">1</item>
<item name="android:layout_height">fill_parent</item>
<item name="android:gravity">center_vertical</item>
<item name="android:textColor">@color/color_black</item>
<item name="android:layout_marginLeft">10dp</item>
<item name="android:textSize">16sp</item>
</style>
<style name="DashboardGeneralButton">
<item name="android:layout_marginRight">10dp</item>
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:textColor">@color/gpx_time_span_color</item>
<item name="android:background">@color/color_white</item>
</style>
<style name="DashboardSearchButton">
<item name="android:paddingTop">10dp</item>
<item name="android:layout_width">0dp</item>
<item name="android:layout_height">fill_parent</item>
<item name="android:layout_weight">1</item>
<item name="android:textSize">14sp</item>
<item name="android:textColor">@color/color_black</item>
<item name="android:background">@color/color_white</item>
<item name="android:layout_marginTop">2dp</item>
</style>
<style name="ListText">
<item name="android:textSize">20sp</item>
</style>