From 600bfd78f53f6ac982fe55f17962e6e51c5d5720 Mon Sep 17 00:00:00 2001 From: Dmitry Donskoy Date: Tue, 29 Jan 2019 15:11:54 +0300 Subject: [PATCH] [android] Added cancel btn --- android/res/layout/fragment_ugc_route_send_link.xml | 13 +++++++++++++ .../ugc/routes/SendLinkPlaceholderFragment.java | 5 ++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/android/res/layout/fragment_ugc_route_send_link.xml b/android/res/layout/fragment_ugc_route_send_link.xml index e21f0cfff8..d1dcfc9493 100644 --- a/android/res/layout/fragment_ugc_route_send_link.xml +++ b/android/res/layout/fragment_ugc_route_send_link.xml @@ -40,4 +40,17 @@ android:layout_marginTop="@dimen/margin_base_plus" android:text="@string/send_a_link_btn" android:textAppearance="@style/MwmTextAppearance.Body1.Light"/> + diff --git a/android/src/com/mapswithme/maps/ugc/routes/SendLinkPlaceholderFragment.java b/android/src/com/mapswithme/maps/ugc/routes/SendLinkPlaceholderFragment.java index b8b4ed88ea..4555e871e2 100644 --- a/android/src/com/mapswithme/maps/ugc/routes/SendLinkPlaceholderFragment.java +++ b/android/src/com/mapswithme/maps/ugc/routes/SendLinkPlaceholderFragment.java @@ -51,7 +51,10 @@ public class SendLinkPlaceholderFragment extends NoToolbarBaseMwmAuthFragment im { View root = inflater.inflate(R.layout.fragment_ugc_route_send_link, container, false); View closeBtn = root.findViewById(R.id.close_btn); - closeBtn.setOnClickListener(v -> getActivity().finish()); + View.OnClickListener finishClickListener = v -> getActivity().finish(); + closeBtn.setOnClickListener(finishClickListener); + View cancelBtn = root.findViewById(R.id.cancel_btn); + cancelBtn.setOnClickListener(finishClickListener); View sendMeLinkBtn = root.findViewById(R.id.send_me_link_btn); sendMeLinkBtn.setOnClickListener(v -> onSendMeLinkBtnClicked()); return root;