Fix fabs on android 4
This commit is contained in:
parent
17412ef783
commit
5fa9664f05
3 changed files with 160 additions and 290 deletions
158
OsmAnd/res/layout/my_places_fabs.xml
Normal file
158
OsmAnd/res/layout/my_places_fabs.xml
Normal file
|
@ -0,0 +1,158 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:osmand="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<android.support.design.widget.FloatingActionButton
|
||||
android:id="@+id/menu_fab"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:contentDescription="@string/quick_action_new_action"
|
||||
android:src="@drawable/ic_action_plus"
|
||||
app:backgroundTint="@color/dashboard_blue"
|
||||
app:fabSize="normal"
|
||||
app:useCompatPadding="true"/>
|
||||
|
||||
<android.support.design.widget.FloatingActionButton
|
||||
android:id="@+id/waypoint_fab"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_above="@id/menu_fab"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginBottom="-16dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:contentDescription="@string/quick_action_new_action"
|
||||
android:src="@drawable/ic_action_marker_dark"
|
||||
android:visibility="gone"
|
||||
app:backgroundTint="@color/fab_green"
|
||||
app:fabSize="mini"
|
||||
app:useCompatPadding="true"
|
||||
tools:visibility="visible"/>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/waypoint_text_layout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="40dp"
|
||||
android:layout_alignBottom="@id/waypoint_fab"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:layout_toLeftOf="@id/waypoint_fab"
|
||||
android:layout_toStartOf="@id/waypoint_fab"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
<net.osmand.plus.widgets.TextViewEx
|
||||
android:id="@+id/waypoint_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:background="?attr/bg_card"
|
||||
android:gravity="center_vertical"
|
||||
android:padding="8dp"
|
||||
android:text="@string/add_waypoint"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
osmand:typeface="@string/font_roboto_medium"/>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<android.support.design.widget.FloatingActionButton
|
||||
android:id="@+id/route_fab"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_above="@id/waypoint_fab"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginBottom="-16dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:contentDescription="@string/quick_action_new_action"
|
||||
android:src="@drawable/ic_action_markers_dark"
|
||||
android:visibility="gone"
|
||||
app:backgroundTint="@color/fab_green"
|
||||
app:fabSize="mini"
|
||||
app:useCompatPadding="true"
|
||||
tools:visibility="visible"/>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/route_text_layout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="40dp"
|
||||
android:layout_alignBottom="@id/route_fab"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:layout_toLeftOf="@id/route_fab"
|
||||
android:layout_toStartOf="@id/route_fab"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
<net.osmand.plus.widgets.TextViewEx
|
||||
android:id="@+id/route_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:background="?attr/bg_card"
|
||||
android:gravity="center_vertical"
|
||||
android:padding="8dp"
|
||||
android:text="@string/add_route_points"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
osmand:typeface="@string/font_roboto_medium"/>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<android.support.design.widget.FloatingActionButton
|
||||
android:id="@+id/line_fab"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_above="@id/route_fab"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginBottom="-16dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:contentDescription="@string/quick_action_new_action"
|
||||
android:src="@drawable/ic_action_polygom_dark"
|
||||
android:visibility="gone"
|
||||
app:backgroundTint="@color/fab_green"
|
||||
app:fabSize="mini"
|
||||
app:useCompatPadding="true"
|
||||
tools:visibility="visible"/>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/line_text_layout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="40dp"
|
||||
android:layout_above="@id/route_fab"
|
||||
android:layout_alignBottom="@id/line_fab"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:layout_toLeftOf="@id/line_fab"
|
||||
android:layout_toStartOf="@id/line_fab"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
<net.osmand.plus.widgets.TextViewEx
|
||||
android:id="@+id/line_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:background="?attr/bg_card"
|
||||
android:gravity="center_vertical"
|
||||
android:padding="8dp"
|
||||
android:text="@string/add_line"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
osmand:typeface="@string/font_roboto_medium"/>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
</RelativeLayout>
|
|
@ -1,8 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:osmand="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/MainLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
@ -26,147 +23,6 @@
|
|||
android:background="@color/white_80_transparent"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<android.support.design.widget.FloatingActionButton
|
||||
android:id="@+id/menu_fab"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_margin="16dp"
|
||||
android:contentDescription="@string/quick_action_new_action"
|
||||
android:src="@drawable/ic_action_plus"
|
||||
app:backgroundTint="@color/dashboard_blue"
|
||||
app:fabSize="normal"/>
|
||||
|
||||
<android.support.design.widget.FloatingActionButton
|
||||
android:id="@+id/waypoint_fab"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_above="@id/menu_fab"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginEnd="24dp"
|
||||
android:layout_marginRight="24dp"
|
||||
android:contentDescription="@string/quick_action_new_action"
|
||||
android:src="@drawable/ic_action_marker_dark"
|
||||
android:visibility="gone"
|
||||
app:backgroundTint="@color/fab_green"
|
||||
app:fabSize="mini"
|
||||
tools:visibility="visible"/>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/waypoint_text_layout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="40dp"
|
||||
android:layout_above="@id/menu_fab"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginRight="16dp"
|
||||
android:layout_toLeftOf="@id/waypoint_fab"
|
||||
android:layout_toStartOf="@id/waypoint_fab"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
<net.osmand.plus.widgets.TextViewEx
|
||||
android:id="@+id/waypoint_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:background="?attr/bg_card"
|
||||
android:gravity="center_vertical"
|
||||
android:padding="8dp"
|
||||
android:text="@string/add_waypoint"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
osmand:typeface="@string/font_roboto_medium"/>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<android.support.design.widget.FloatingActionButton
|
||||
android:id="@+id/route_fab"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_above="@id/waypoint_fab"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:layout_marginEnd="24dp"
|
||||
android:layout_marginRight="24dp"
|
||||
android:contentDescription="@string/quick_action_new_action"
|
||||
android:src="@drawable/ic_action_markers_dark"
|
||||
android:visibility="gone"
|
||||
app:backgroundTint="@color/fab_green"
|
||||
app:fabSize="mini"
|
||||
tools:visibility="visible"/>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/route_text_layout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="40dp"
|
||||
android:layout_above="@id/waypoint_fab"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginRight="16dp"
|
||||
android:layout_toLeftOf="@id/route_fab"
|
||||
android:layout_toStartOf="@id/route_fab"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
<net.osmand.plus.widgets.TextViewEx
|
||||
android:id="@+id/route_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:background="?attr/bg_card"
|
||||
android:gravity="center_vertical"
|
||||
android:padding="8dp"
|
||||
android:text="@string/add_route_points"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
osmand:typeface="@string/font_roboto_medium"/>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<android.support.design.widget.FloatingActionButton
|
||||
android:id="@+id/line_fab"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_above="@id/route_fab"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:layout_marginEnd="24dp"
|
||||
android:layout_marginRight="24dp"
|
||||
android:contentDescription="@string/quick_action_new_action"
|
||||
android:src="@drawable/ic_action_polygom_dark"
|
||||
android:visibility="gone"
|
||||
app:backgroundTint="@color/fab_green"
|
||||
app:fabSize="mini"
|
||||
tools:visibility="visible"/>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/line_text_layout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="40dp"
|
||||
android:layout_above="@id/route_fab"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginRight="16dp"
|
||||
android:layout_toLeftOf="@id/line_fab"
|
||||
android:layout_toStartOf="@id/line_fab"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
<net.osmand.plus.widgets.TextViewEx
|
||||
android:id="@+id/line_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:background="?attr/bg_card"
|
||||
android:gravity="center_vertical"
|
||||
android:padding="8dp"
|
||||
android:text="@string/add_line"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
osmand:typeface="@string/font_roboto_medium"/>
|
||||
|
||||
</FrameLayout>
|
||||
<include layout="@layout/my_places_fabs"/>
|
||||
|
||||
</RelativeLayout>
|
|
@ -1,8 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:osmand="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
@ -22,147 +19,6 @@
|
|||
android:background="@color/white_80_transparent"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<android.support.design.widget.FloatingActionButton
|
||||
android:id="@+id/menu_fab"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_margin="16dp"
|
||||
android:contentDescription="@string/quick_action_new_action"
|
||||
android:src="@drawable/ic_action_plus"
|
||||
app:backgroundTint="@color/dashboard_blue"
|
||||
app:fabSize="normal"/>
|
||||
|
||||
<android.support.design.widget.FloatingActionButton
|
||||
android:id="@+id/waypoint_fab"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_above="@id/menu_fab"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginEnd="24dp"
|
||||
android:layout_marginRight="24dp"
|
||||
android:contentDescription="@string/quick_action_new_action"
|
||||
android:src="@drawable/ic_action_marker_dark"
|
||||
android:visibility="gone"
|
||||
app:backgroundTint="@color/fab_green"
|
||||
app:fabSize="mini"
|
||||
tools:visibility="visible"/>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/waypoint_text_layout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="40dp"
|
||||
android:layout_above="@id/menu_fab"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginRight="16dp"
|
||||
android:layout_toLeftOf="@id/waypoint_fab"
|
||||
android:layout_toStartOf="@id/waypoint_fab"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
<net.osmand.plus.widgets.TextViewEx
|
||||
android:id="@+id/waypoint_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:background="?attr/bg_card"
|
||||
android:gravity="center_vertical"
|
||||
android:padding="8dp"
|
||||
android:text="@string/add_waypoint"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
osmand:typeface="@string/font_roboto_medium"/>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<android.support.design.widget.FloatingActionButton
|
||||
android:id="@+id/route_fab"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_above="@id/waypoint_fab"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:layout_marginEnd="24dp"
|
||||
android:layout_marginRight="24dp"
|
||||
android:contentDescription="@string/quick_action_new_action"
|
||||
android:src="@drawable/ic_action_markers_dark"
|
||||
android:visibility="gone"
|
||||
app:backgroundTint="@color/fab_green"
|
||||
app:fabSize="mini"
|
||||
tools:visibility="visible"/>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/route_text_layout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="40dp"
|
||||
android:layout_above="@id/waypoint_fab"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginRight="16dp"
|
||||
android:layout_toLeftOf="@id/route_fab"
|
||||
android:layout_toStartOf="@id/route_fab"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
<net.osmand.plus.widgets.TextViewEx
|
||||
android:id="@+id/route_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:background="?attr/bg_card"
|
||||
android:gravity="center_vertical"
|
||||
android:padding="8dp"
|
||||
android:text="@string/add_route_points"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
osmand:typeface="@string/font_roboto_medium"/>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<android.support.design.widget.FloatingActionButton
|
||||
android:id="@+id/line_fab"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_above="@id/route_fab"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:layout_marginEnd="24dp"
|
||||
android:layout_marginRight="24dp"
|
||||
android:contentDescription="@string/quick_action_new_action"
|
||||
android:src="@drawable/ic_action_polygom_dark"
|
||||
android:visibility="gone"
|
||||
app:backgroundTint="@color/fab_green"
|
||||
app:fabSize="mini"
|
||||
tools:visibility="visible"/>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/line_text_layout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="40dp"
|
||||
android:layout_above="@id/route_fab"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginRight="16dp"
|
||||
android:layout_toLeftOf="@id/line_fab"
|
||||
android:layout_toStartOf="@id/line_fab"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
<net.osmand.plus.widgets.TextViewEx
|
||||
android:id="@+id/line_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:background="?attr/bg_card"
|
||||
android:gravity="center_vertical"
|
||||
android:padding="8dp"
|
||||
android:text="@string/add_line"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
osmand:typeface="@string/font_roboto_medium"/>
|
||||
|
||||
</FrameLayout>
|
||||
<include layout="@layout/my_places_fabs"/>
|
||||
|
||||
</RelativeLayout>
|
Loading…
Reference in a new issue