|
3 | 3 | import android.animation.ObjectAnimator; |
4 | 4 | import android.animation.TypeEvaluator; |
5 | 5 | import android.animation.ValueAnimator; |
| 6 | +import android.content.ClipData; |
| 7 | +import android.content.ClipboardManager; |
| 8 | +import android.content.Context; |
6 | 9 | import android.content.Intent; |
7 | 10 | import android.graphics.Bitmap; |
8 | 11 | import android.graphics.Color; |
|
27 | 30 | import android.widget.LinearLayout; |
28 | 31 | import android.widget.ProgressBar; |
29 | 32 | import android.widget.TextView; |
| 33 | +import android.widget.Toast; |
30 | 34 |
|
31 | 35 | import com.google.gson.Gson; |
32 | 36 | import com.google.gson.reflect.TypeToken; |
@@ -489,6 +493,19 @@ public void onSlide(@NonNull View bottomSheet, float slideOffset) { |
489 | 493 | commonsButtonText.setVisibility(View.GONE); |
490 | 494 | directionsButtonText.setVisibility(View.GONE); |
491 | 495 | } |
| 496 | + title.setOnLongClickListener(view -> { |
| 497 | + Utils.copy("place",title.getText().toString(),getContext()); |
| 498 | + Toast.makeText(getContext(),"Text copied to clipboard",Toast.LENGTH_SHORT).show(); |
| 499 | + return true; |
| 500 | + } |
| 501 | + ); |
| 502 | + title.setOnClickListener(view -> { |
| 503 | + if (bottomSheetDetailsBehavior.getState() == BottomSheetBehavior.STATE_COLLAPSED) { |
| 504 | + bottomSheetDetailsBehavior.setState(BottomSheetBehavior.STATE_EXPANDED); |
| 505 | + } else { |
| 506 | + bottomSheetDetailsBehavior.setState(BottomSheetBehavior.STATE_COLLAPSED); |
| 507 | + } |
| 508 | + }); |
492 | 509 | } |
493 | 510 |
|
494 | 511 | /** |
|
0 commit comments