mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 12:23:58 +01:00
Copy place name on long click (#3609)
* Copy place name on long click * Remove hard coded string
This commit is contained in:
parent
e859c71905
commit
a0f8790d8f
1 changed files with 6 additions and 2 deletions
|
|
@ -578,9 +578,13 @@ public class NearbyParentFragment extends CommonsDaggerSupportFragment
|
|||
*
|
||||
*/
|
||||
private void addActionToTitle() {
|
||||
title.setOnLongClickListener(view -> {
|
||||
Utils.copy("place", title.getText().toString(), getContext());
|
||||
Toast.makeText(getContext(), R.string.text_copy, Toast.LENGTH_SHORT).show();
|
||||
return true;
|
||||
});
|
||||
|
||||
title.setOnClickListener(view -> {
|
||||
Utils.copy("place", title.getText().toString(), getContext());
|
||||
Toast.makeText(getContext(), "Text copied to clipboard", Toast.LENGTH_SHORT).show();
|
||||
bottomSheetListBehavior.setState(BottomSheetBehavior.STATE_HIDDEN);
|
||||
if (bottomSheetDetailsBehavior.getState() == BottomSheetBehavior.STATE_COLLAPSED) {
|
||||
bottomSheetDetailsBehavior.setState(BottomSheetBehavior.STATE_EXPANDED);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue