Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fling fix #20933

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions OsmAnd/res/layout/edit_poi_add_item.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content">

<net.osmand.plus.widgets.ButtonEx
android:id="@+id/addTagButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_marginLeft="12dp"
android:layout_marginTop="16dp"
android:text="@string/add_tag"
android:textSize="@dimen/default_sub_text_size"
app:typefaceWeight="medium" />

</LinearLayout>
24 changes: 24 additions & 0 deletions OsmAnd/res/layout/edit_poi_add_opening_hours_item.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?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"
android:layout_width="match_parent"
android:layout_height="wrap_content">

<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/openingHoursImageView"
style="@style/edit_poi_imageview_style"
android:layout_marginTop="@dimen/content_padding_small"
app:srcCompat="@drawable/ic_action_time"
app:tint="?android:textColorSecondary" />

<net.osmand.plus.widgets.ButtonEx
android:id="@+id/addOpeningHoursButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="72dp"
android:layout_marginLeft="72dp"
android:text="@string/add_opening_hours"
android:textSize="@dimen/default_sub_text_size"
app:typefaceWeight="medium" />

</RelativeLayout>
112 changes: 112 additions & 0 deletions OsmAnd/res/layout/edit_poi_basic_info_item.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:theme="?attr/new_app_theme">

<net.osmand.plus.widgets.TextViewEx
android:id="@+id/contactInfoTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/content_padding"
android:layout_marginTop="18dp"
android:text="@string/contact_info"
android:textColor="?android:textColorPrimary"
app:typefaceWeight="medium"
android:layout_marginStart="@dimen/content_padding" />

<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/streetImageView"
style="@style/edit_poi_imageview_style"
android:layout_below="@id/contactInfoTextView"
app:srcCompat="@drawable/ic_action_street_name"
app:tint="?android:textColorSecondary" />

<EditText
android:id="@+id/streetEditText"
style="@style/create_poi_text_field"
android:layout_below="@id/contactInfoTextView"
android:hint="@string/street_name"
android:inputType="textMultiLine"
tools:text="testText" />

<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/houseNumberImageView"
style="@style/edit_poi_imageview_style"
android:layout_below="@id/streetEditText"
app:srcCompat="@drawable/ic_action_building_number"
app:tint="?android:textColorSecondary" />

<EditText
android:id="@+id/houseNumberEditText"
style="@style/create_poi_text_field"
android:layout_below="@id/streetEditText"
android:hint="@string/building_number"
android:inputType="text" />

<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/phoneImageView"
style="@style/edit_poi_imageview_style"
android:layout_below="@id/houseNumberEditText"
app:srcCompat="@drawable/ic_action_call_dark"
app:tint="?android:textColorSecondary" />

<EditText
android:id="@+id/phoneEditText"
style="@style/create_poi_text_field"
android:layout_below="@id/houseNumberEditText"
android:hint="@string/phone"
android:inputType="phone" />

<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/webSiteImageView"
style="@style/edit_poi_imageview_style"
android:layout_below="@id/phoneEditText"
app:srcCompat="@drawable/ic_world_globe_dark"
app:tint="?android:textColorSecondary" />

<EditText
android:id="@+id/webSiteEditText"
style="@style/create_poi_text_field"
android:layout_below="@id/phoneEditText"
android:hint="@string/website"
android:inputType="textUri" />

<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/descriptionImageView"
style="@style/edit_poi_imageview_style"
android:layout_below="@id/webSiteEditText"
app:srcCompat="@drawable/ic_action_description"
app:tint="?android:textColorSecondary" />

<EditText
android:id="@+id/descriptionEditText"
style="@style/create_poi_text_field"
android:layout_width="match_parent"
android:layout_below="@id/webSiteEditText"
android:hint="@string/shared_string_description"
android:inputType="textMultiLine" />

<net.osmand.plus.widgets.TextViewEx
android:id="@+id/openHoursTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/descriptionEditText"
android:layout_marginStart="@dimen/content_padding"
android:layout_marginLeft="@dimen/content_padding"
android:layout_marginTop="18dp"
android:layout_marginBottom="@dimen/content_padding"
android:text="@string/opening_hours"
android:textColor="?android:textColorPrimary"
app:typefaceWeight="medium" />

</RelativeLayout>

</LinearLayout>
96 changes: 96 additions & 0 deletions OsmAnd/res/layout/edit_poi_description_item.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="14dp"
android:layout_marginRight="14dp"
android:layout_marginTop="14dp"
android:background="?attr/bg_card"
android:orientation="vertical"
android:layout_marginStart="14dp"
android:layout_marginEnd="14dp">

<LinearLayout
android:layout_width="match_parent"
android:minHeight="44dp"
android:layout_height="wrap_content"
android:gravity="center">

<net.osmand.plus.widgets.TextViewEx
android:layout_width="120dp"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:text="@string/tag_poi_name"
android:textColor="?android:attr/textColorPrimary"
android:textSize="@dimen/default_desc_text_size"
android:textStyle="normal"
android:layout_marginEnd="16dp"
android:layout_marginStart="16dp" />

<View
android:layout_width="1dp"
android:layout_height="match_parent"
android:background="?attr/dashboard_divider"/>

<net.osmand.plus.widgets.TextViewEx
android:id="@+id/nameTextView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginTop="4dp"
android:layout_marginBottom="4dp"
android:textColor="?android:attr/textColorPrimary"
android:textSize="@dimen/default_desc_text_size"
app:typefaceWeight="medium"
tools:text="very very very long poi name"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp" />
</LinearLayout>

<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?attr/dashboard_divider"/>

<LinearLayout
android:layout_width="match_parent"
android:minHeight="44dp"
android:layout_height="wrap_content"
android:gravity="center">

<net.osmand.plus.widgets.TextViewEx
android:id="@+id/amenityTagTextView"
android:layout_width="120dp"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:text="@string/tag_poi_amenity"
android:textColor="?android:attr/textColorPrimary"
android:textSize="@dimen/default_desc_text_size"
android:textStyle="normal"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp" />

<View
android:layout_width="1dp"
android:layout_height="match_parent"
android:background="?attr/dashboard_divider"/>

<net.osmand.plus.widgets.TextViewEx
android:id="@+id/amenityTextView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:textColor="?android:attr/textColorPrimary"
android:textSize="@dimen/default_desc_text_size"
app:typefaceWeight="medium"
tools:text="landmark"
android:layout_marginEnd="16dp"
android:layout_marginStart="16dp" />
</LinearLayout>
</LinearLayout>
8 changes: 4 additions & 4 deletions OsmAnd/res/layout/fragment_edit_poi.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
app:contentInsetRight="0dp"
app:contentInsetStart="@dimen/divider_color_light_margin_start" />

<ScrollView
<androidx.core.widget.NestedScrollView
android:id="@+id/scroll_view"
android:layout_width="match_parent"
android:layout_height="0dp"
Expand Down Expand Up @@ -131,13 +131,13 @@
app:tabTextColor="@android:color/darker_gray" />
</com.google.android.material.appbar.AppBarLayout>

<net.osmand.plus.plugins.osmedit.EditPoiViewPager
<androidx.viewpager2.widget.ViewPager2
android:id="@+id/viewpager"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
android:layout_height="match_parent"/>
</LinearLayout>

</ScrollView>
</androidx.core.widget.NestedScrollView>

<View
android:id="@+id/buttonDivider"
Expand Down
10 changes: 10 additions & 0 deletions OsmAnd/res/layout/fragment_edit_poi_advanced_new.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.recyclerview.widget.RecyclerView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:theme="?attr/new_app_theme"
android:id="@+id/content_recycler_view">


</androidx.recyclerview.widget.RecyclerView>
2 changes: 1 addition & 1 deletion OsmAnd/res/layout/list_item_poi_tag.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">

<LinearLayout
Expand Down
Loading
Loading