updated translate dialog

This commit is contained in:
gdlbo
2022-07-31 13:34:22 +03:00
parent 271b1cdfee
commit 2e2e890875
3 changed files with 12 additions and 0 deletions
@@ -1,5 +1,7 @@
package ru.vtosters.lite.ui.dialogs; package ru.vtosters.lite.ui.dialogs;
import static ru.vtosters.lite.utils.AndroidUtils.sendToast;
import android.app.AlertDialog; import android.app.AlertDialog;
import android.content.Context; import android.content.Context;
import android.os.Handler; import android.os.Handler;
@@ -31,6 +33,12 @@ public class Translate {
alertDialog.setPositiveButton("Закрыть", (dialog, which) -> { alertDialog.setPositiveButton("Закрыть", (dialog, which) -> {
dialog.cancel(); dialog.cancel();
}); });
alertDialog.setNeutralButton("Скопировать", (dialog, which) -> {
android.content.ClipboardManager clipboard = (android.content.ClipboardManager) context.getSystemService(Context.CLIPBOARD_SERVICE);
android.content.ClipData clip = android.content.ClipData.newPlainText("Copied Text", text);
clipboard.setPrimaryClip(clip);
sendToast("Скопировано в буфер обмена");
});
var alert = alertDialog.create(); var alert = alertDialog.create();
alert.show(); alert.show();
} }
+2
View File
@@ -5795,4 +5795,6 @@
<string name="getdonate">Поддержи проект донатом и получи бонусы</string> <string name="getdonate">Поддержи проект донатом и получи бонусы</string>
<string name="wallpapers">Обои</string> <string name="wallpapers">Обои</string>
<string name="translator">Перевести</string>
</resources> </resources>
+2
View File
@@ -5954,6 +5954,8 @@ May look like a fake leaving the online"</string>
<string name="wallpapers">Wallpapers</string> <string name="wallpapers">Wallpapers</string>
<string name="translator">Translate</string>
<string name="vkiddisable">Disable protection</string> <string name="vkiddisable">Disable protection</string>
<string name="vkidsumm">VK has started blocking the use of third-party applications, so for the stable operation of all parts of the application, it is necessary to disable Protection from suspicious applications \n\nVK ID -> Security and Login -> Protection from suspicious applications</string> <string name="vkidsumm">VK has started blocking the use of third-party applications, so for the stable operation of all parts of the application, it is necessary to disable Protection from suspicious applications \n\nVK ID -> Security and Login -> Protection from suspicious applications</string>
</resources> </resources>