mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 04:43:54 +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() {
|
private void addActionToTitle() {
|
||||||
title.setOnClickListener(view -> {
|
title.setOnLongClickListener(view -> {
|
||||||
Utils.copy("place", title.getText().toString(), getContext());
|
Utils.copy("place", title.getText().toString(), getContext());
|
||||||
Toast.makeText(getContext(), "Text copied to clipboard", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getContext(), R.string.text_copy, Toast.LENGTH_SHORT).show();
|
||||||
|
return true;
|
||||||
|
});
|
||||||
|
|
||||||
|
title.setOnClickListener(view -> {
|
||||||
bottomSheetListBehavior.setState(BottomSheetBehavior.STATE_HIDDEN);
|
bottomSheetListBehavior.setState(BottomSheetBehavior.STATE_HIDDEN);
|
||||||
if (bottomSheetDetailsBehavior.getState() == BottomSheetBehavior.STATE_COLLAPSED) {
|
if (bottomSheetDetailsBehavior.getState() == BottomSheetBehavior.STATE_COLLAPSED) {
|
||||||
bottomSheetDetailsBehavior.setState(BottomSheetBehavior.STATE_EXPANDED);
|
bottomSheetDetailsBehavior.setState(BottomSheetBehavior.STATE_EXPANDED);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue