forked from organicmaps/organicmaps
[editor] Limit website menu field for some types of amenity
Signed-off-by: Arthur-GYT <a.gayot@posteo.com>
This commit is contained in:
parent
4ce2c6ae78
commit
115782d817
2 changed files with 27 additions and 9 deletions
|
@ -426,23 +426,23 @@ public class EditorFragment extends BaseMwmFragment implements View.OnClickListe
|
|||
mEditPhoneLink = blockPhone.findViewById(R.id.edit_phone);
|
||||
mEditPhoneLink.setOnClickListener(this);
|
||||
mPhone.setOnClickListener(this);
|
||||
initBlock(view, Metadata.MetadataType.FMD_WEBSITE, R.id.block_website,
|
||||
View websiteBlock = initBlock(view, Metadata.MetadataType.FMD_WEBSITE, R.id.block_website,
|
||||
R.drawable.ic_website, R.string.website, InputType.TYPE_TEXT_VARIATION_URI);
|
||||
initBlock(view, Metadata.MetadataType.FMD_WEBSITE_MENU, R.id.block_website_menu,
|
||||
View websiteMenuBlock = initBlock(view, Metadata.MetadataType.FMD_WEBSITE_MENU, R.id.block_website_menu,
|
||||
R.drawable.ic_website_menu, R.string.website_menu, InputType.TYPE_TEXT_VARIATION_URI);
|
||||
initBlock(view, Metadata.MetadataType.FMD_EMAIL, R.id.block_email,
|
||||
View emailBlock = initBlock(view, Metadata.MetadataType.FMD_EMAIL, R.id.block_email,
|
||||
R.drawable.ic_email, R.string.email, InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS);
|
||||
initBlock(view, Metadata.MetadataType.FMD_CONTACT_FACEBOOK, R.id.block_facebook,
|
||||
View facebookContactBlock = initBlock(view, Metadata.MetadataType.FMD_CONTACT_FACEBOOK, R.id.block_facebook,
|
||||
R.drawable.ic_facebook_white, R.string.facebook, InputType.TYPE_TEXT_VARIATION_URI);
|
||||
initBlock(view, Metadata.MetadataType.FMD_CONTACT_INSTAGRAM, R.id.block_instagram,
|
||||
View instagramContactBlock = initBlock(view, Metadata.MetadataType.FMD_CONTACT_INSTAGRAM, R.id.block_instagram,
|
||||
R.drawable.ic_instagram_white, R.string.instagram, InputType.TYPE_TEXT_VARIATION_URI);
|
||||
initBlock(view, Metadata.MetadataType.FMD_CONTACT_TWITTER, R.id.block_twitter,
|
||||
View twitterContactBlock = initBlock(view, Metadata.MetadataType.FMD_CONTACT_TWITTER, R.id.block_twitter,
|
||||
R.drawable.ic_twitterx_white, R.string.twitter, InputType.TYPE_TEXT_VARIATION_URI);
|
||||
initBlock(view, Metadata.MetadataType.FMD_CONTACT_VK, R.id.block_vk,
|
||||
View vkContactBlock = initBlock(view, Metadata.MetadataType.FMD_CONTACT_VK, R.id.block_vk,
|
||||
R.drawable.ic_vk_white, R.string.vk, InputType.TYPE_TEXT_VARIATION_URI);
|
||||
initBlock(view, Metadata.MetadataType.FMD_CONTACT_LINE, R.id.block_line,
|
||||
View lineContactBlock = initBlock(view, Metadata.MetadataType.FMD_CONTACT_LINE, R.id.block_line,
|
||||
R.drawable.ic_line_white, R.string.editor_line_social_network, InputType.TYPE_TEXT_VARIATION_URI);
|
||||
initBlock(view, Metadata.MetadataType.FMD_OPERATOR, R.id.block_operator,
|
||||
View operatorBlock = initBlock(view, Metadata.MetadataType.FMD_OPERATOR, R.id.block_operator,
|
||||
R.drawable.ic_operator, R.string.editor_operator, 0);
|
||||
|
||||
View blockCuisine = view.findViewById(R.id.block_cuisine);
|
||||
|
@ -469,6 +469,15 @@ public class EditorFragment extends BaseMwmFragment implements View.OnClickListe
|
|||
mDetailsBlocks.put(Metadata.MetadataType.FMD_PHONE_NUMBER, blockPhone);
|
||||
mDetailsBlocks.put(Metadata.MetadataType.FMD_CUISINE, blockCuisine);
|
||||
mDetailsBlocks.put(Metadata.MetadataType.FMD_INTERNET, blockWifi);
|
||||
mDetailsBlocks.put(Metadata.MetadataType.FMD_WEBSITE, websiteBlock);
|
||||
mDetailsBlocks.put(Metadata.MetadataType.FMD_WEBSITE_MENU, websiteMenuBlock);
|
||||
mDetailsBlocks.put(Metadata.MetadataType.FMD_EMAIL, emailBlock);
|
||||
mDetailsBlocks.put(Metadata.MetadataType.FMD_CONTACT_FACEBOOK, facebookContactBlock);
|
||||
mDetailsBlocks.put(Metadata.MetadataType.FMD_CONTACT_INSTAGRAM, instagramContactBlock);
|
||||
mDetailsBlocks.put(Metadata.MetadataType.FMD_CONTACT_TWITTER, twitterContactBlock);
|
||||
mDetailsBlocks.put(Metadata.MetadataType.FMD_CONTACT_VK, vkContactBlock);
|
||||
mDetailsBlocks.put(Metadata.MetadataType.FMD_CONTACT_LINE, lineContactBlock);
|
||||
mDetailsBlocks.put(Metadata.MetadataType.FMD_OPERATOR, operatorBlock);
|
||||
}
|
||||
|
||||
private static TextInputEditText findInput(View blockWithInput)
|
||||
|
|
|
@ -209,6 +209,7 @@
|
|||
<type id="amenity-bar" group="food">
|
||||
<include group="poi_internet" />
|
||||
<include field="cuisine" />
|
||||
<include field="website_menu" />
|
||||
</type>
|
||||
<type id="amenity-bicycle_rental">
|
||||
<include field="website" />
|
||||
|
@ -229,6 +230,7 @@
|
|||
<type id="amenity-cafe" group="food">
|
||||
<include group="poi_internet" />
|
||||
<include field="cuisine" />
|
||||
<include field="website_menu" />
|
||||
</type>
|
||||
<type id="amenity-car_rental">
|
||||
<include group="poi_internet" />
|
||||
|
@ -267,6 +269,7 @@
|
|||
<type id="amenity-fast_food" group="food">
|
||||
<include group="poi_internet" />
|
||||
<include field="cuisine" />
|
||||
<include field="website_menu" />
|
||||
<include field="drive_through" />
|
||||
</type>
|
||||
<type id="amenity-ferry_terminal">
|
||||
|
@ -343,6 +346,7 @@
|
|||
<type id="amenity-pub" group="food">
|
||||
<include group="poi_internet" />
|
||||
<include field="cuisine" />
|
||||
<include field="website_menu" />
|
||||
</type>
|
||||
<type id="amenity-recycling-centre">
|
||||
<include group="poi" />
|
||||
|
@ -354,6 +358,7 @@
|
|||
<type id="amenity-restaurant" group="food">
|
||||
<include group="poi_internet" />
|
||||
<include field="cuisine" />
|
||||
<include field="website_menu" />
|
||||
</type>
|
||||
<type id="amenity-school" group="education">
|
||||
<include group="poi_internet" />
|
||||
|
@ -1051,6 +1056,8 @@
|
|||
</type>
|
||||
<type id="amenity-biergarten" group="food">
|
||||
<include group="poi_internet" />
|
||||
<include field="cuisine" />
|
||||
<include field="website_menu" />
|
||||
</type>
|
||||
<type id="amenity-community_centre">
|
||||
<include group="poi_internet" />
|
||||
|
@ -1074,6 +1081,7 @@
|
|||
</type>
|
||||
<type id="amenity-ice_cream" group="shop">
|
||||
<include group="poi_internet" />
|
||||
<include field="website_menu" />
|
||||
</type>
|
||||
<type id="amenity-nursing_home">
|
||||
<include group="poi_internet" />
|
||||
|
@ -1096,6 +1104,7 @@
|
|||
</type>
|
||||
<type id="amenity-food_court">
|
||||
<include group="poi_internet" />
|
||||
<include field="website_menu" />
|
||||
</type>
|
||||
<type id="amenity-language_school">
|
||||
<include group="poi_internet" />
|
||||
|
|
Loading…
Add table
Reference in a new issue