diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index a2ac707..552bd6c 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -83,12 +83,12 @@
android:name=".AboutActivity"
android:exported="true"
android:hardwareAccelerated="true"
- android:label="About App" />
+ android:label="@string/about_app" />
+ android:label="@string/store" />
" +
- "this version unstable and has alot of bugs
" +
- "don't forget to tell us on github issues or telegram bot
" +
- "telegram report bot
" +
- "github issues page
");
+ UIUtils.UIAlert(activity, getString(R.string.debug_testing_build_5), getString(R.string.welcome_to_debug_build_of_vectras_vm_br) +
+ getString(R.string.this_version_unstable_and_has_alot_of_bugs_br) +
+ getString(R.string.don_t_forget_to_tell_us_on_github_issues_or_telegram_bot_br) +
+ getString(R.string.a_href_https_t_me_vectras_protect_bot_telegram_report_bot_a_br) +
+ getString(R.string.a_href_https_github_com_epicstudios856_vectras_vm_android_issues_github_issues_page_a_br));
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(activity);
if (!prefs.getBoolean("tgDialog", false)) {
AlertDialog alertDialog;
alertDialog = new AlertDialog.Builder(activity, R.style.MainDialogTheme).create();
- alertDialog.setTitle("JOIN US ON TELEGRAM");
- alertDialog.setMessage("Join us on Telegram where we publish all the news and updates and receive your opinions and bugs");
- alertDialog.setButton(DialogInterface.BUTTON_POSITIVE, "JOIN", new DialogInterface.OnClickListener() {
+ alertDialog.setTitle(getString(R.string.join_us_on_telegram));
+ alertDialog.setMessage(getString(R.string.join_us_on_telegram_where_we_publish_all_the_news_and_updates_and_receive_your_opinions_and_bugs));
+ alertDialog.setButton(DialogInterface.BUTTON_POSITIVE, getString(R.string.join), new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
String tg = "https://t.me/vectras_os";
Intent f = new Intent(Intent.ACTION_VIEW);
@@ -617,12 +617,12 @@ public class MainActivity extends AppCompatActivity {
return;
}
});
- alertDialog.setButton(DialogInterface.BUTTON_NEUTRAL, "CANCEL", new DialogInterface.OnClickListener() {
+ alertDialog.setButton(DialogInterface.BUTTON_NEUTRAL, getString(R.string.cancel), new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
return;
}
});
- alertDialog.setButton(DialogInterface.BUTTON_NEGATIVE, "DONT SHOW AGAIN", new DialogInterface.OnClickListener() {
+ alertDialog.setButton(DialogInterface.BUTTON_NEGATIVE, getString(R.string.dont_show_again), new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(activity);
SharedPreferences.Editor edit = prefs.edit();
diff --git a/app/src/main/java/com/vectras/vm/SetupQemuActivity.java b/app/src/main/java/com/vectras/vm/SetupQemuActivity.java
index e6dbad0..a0e45a3 100644
--- a/app/src/main/java/com/vectras/vm/SetupQemuActivity.java
+++ b/app/src/main/java/com/vectras/vm/SetupQemuActivity.java
@@ -6,6 +6,7 @@ import static android.content.Intent.ACTION_VIEW;
import com.termux.app.TermuxService;
import static com.vectras.vm.utils.UIUtils.UIAlert;
+import android.annotation.SuppressLint;
import android.app.Activity;
import android.app.ProgressDialog;
import android.content.Context;
@@ -316,6 +317,7 @@ public class SetupQemuActivity extends AppCompatActivity implements View.OnClick
String tarPath;
// Function to append text and automatically scroll to bottom
+ @SuppressLint("SetTextI18n")
private void appendTextAndScroll(String textToAdd) {
ScrollView scrollView = findViewById(R.id.scrollView);
@@ -331,29 +333,29 @@ public class SetupQemuActivity extends AppCompatActivity implements View.OnClick
if (textToAdd.contains("Starting setup...")) {
title.setText("Getting ready for you...");
- textviewsettingup.setText("Getting ready for you...\nPlease don't disconnect the network.");
+ textviewsettingup.setText(R.string.getting_ready_for_you_please_don_t_disconnect_the_network);
} else if (textToAdd.contains("Installing packages...")) {
- title.setText("It won't take long...");
- textviewsettingup.setText("Completed 10%\nIt won't take long...");
+ title.setText(R.string.it_won_t_take_long);
+ textviewsettingup.setText(R.string.completed_10_it_won_t_take_long);
} else if (textToAdd.contains("(50/")) {
- textviewsettingup.setText("Completed 20%\nIt won't take long...");
+ textviewsettingup.setText(R.string.completed_20_it_won_t_take_long);
} else if (textToAdd.contains("100/")) {
- textviewsettingup.setText("Completed 30%\nIt won't take long...");
+ textviewsettingup.setText(R.string.completed_30_it_won_t_take_long);
} else if (textToAdd.contains("150/")) {
- textviewsettingup.setText("Completed 40%\nIt won't take long...");
+ textviewsettingup.setText(R.string.completed_40_it_won_t_take_long);
} else if (textToAdd.contains("200/")) {
- textviewsettingup.setText("Completed 50%\nIt won't take long...");
+ textviewsettingup.setText(R.string.completed_50_it_won_t_take_long);
} else if (textToAdd.contains("Downloading Qemu...")) {
- title.setText("Don't disconnect...");
- textviewsettingup.setText("Completed 75%\nDon't disconnect...");
+ title.setText(R.string.don_t_disconnect);
+ textviewsettingup.setText(R.string.completed_75_don_t_disconnect);
} else if (textToAdd.contains("Installing Qemu...")) {
- title.setText("Keep it up...");
- textviewsettingup.setText("Completed 80%\nKeep it up...");
+ title.setText(R.string.keep_it_up);
+ textviewsettingup.setText(R.string.completed_80_keep_it_up);
} else if (textToAdd.contains("qemu-system")) {
- textviewsettingup.setText("Completed 95%\nKeep it up...");
+ textviewsettingup.setText(R.string.completed_95_keep_it_up);
} else if (textToAdd.contains("Just a sec...")) {
- title.setText("Almost there.");
- textviewsettingup.setText("Almost there.");
+ title.setText(R.string.almost_there);
+ textviewsettingup.setText(getString(R.string.almost_there));
}
// Scroll to the bottom
@@ -678,10 +680,10 @@ public class SetupQemuActivity extends AppCompatActivity implements View.OnClick
}
alertDialog = new AlertDialog.Builder(activity, R.style.MainDialogTheme).create();
- alertDialog.setTitle("BOOTSTRAP REQUIRED!");
- alertDialog.setMessage("You can choose between auto download and setup or manual setup by choosing bootstrap file.");
+ alertDialog.setTitle(getString(R.string.bootstrap_required));
+ alertDialog.setMessage(getString(R.string.you_can_choose_between_auto_download_and_setup_or_manual_setup_by_choosing_bootstrap_file));
alertDialog.setCancelable(false);
- alertDialog.setButton(DialogInterface.BUTTON_POSITIVE, "AUTO SETUP", new DialogInterface.OnClickListener() {
+ alertDialog.setButton(DialogInterface.BUTTON_POSITIVE, getString(R.string.auto_setup), new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
//startDownload();
if (AppConfig.getSetupFiles().contains("arm64-v8a") || AppConfig.getSetupFiles().contains("x86_64")) {
@@ -692,7 +694,7 @@ public class SetupQemuActivity extends AppCompatActivity implements View.OnClick
return;
}
});
- alertDialog.setButton(DialogInterface.BUTTON_NEGATIVE, "MANUAL SETUP", new DialogInterface.OnClickListener() {
+ alertDialog.setButton(DialogInterface.BUTTON_NEGATIVE, getString(R.string.manual_setup), new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
Intent intent = new Intent(ACTION_OPEN_DOCUMENT);
intent.addCategory(Intent.CATEGORY_OPENABLE);
diff --git a/app/src/main/java/com/vectras/vm/SplashActivity.java b/app/src/main/java/com/vectras/vm/SplashActivity.java
index f876a42..28ccbca 100644
--- a/app/src/main/java/com/vectras/vm/SplashActivity.java
+++ b/app/src/main/java/com/vectras/vm/SplashActivity.java
@@ -35,6 +35,7 @@ import androidx.appcompat.app.AppCompatDelegate;
import androidx.core.app.ActivityCompat;
import androidx.core.app.NotificationCompat;
import androidx.core.content.ContextCompat;
+import androidx.preference.PreferenceManager;
import com.vectras.qemu.MainSettingsManager;
import com.vectras.vm.utils.FileUtils;
@@ -85,15 +86,17 @@ public class SplashActivity extends AppCompatActivity implements Runnable {
setupFiles();
- updateLocale(MainSettingsManager.getLang(activity));
+ updateLocale();
}
- private void updateLocale(String languageCode) {
+ private void updateLocale() {
+ SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this);
+ String languageCode = sharedPreferences.getString("language", "en");
+
Locale locale = new Locale(languageCode);
Locale.setDefault(locale);
Configuration config = new Configuration();
config.setLocale(locale);
-
getResources().updateConfiguration(config, getResources().getDisplayMetrics());
}
diff --git a/app/src/main/java/com/vectras/vm/StartVM.java b/app/src/main/java/com/vectras/vm/StartVM.java
index f5dc847..824b373 100644
--- a/app/src/main/java/com/vectras/vm/StartVM.java
+++ b/app/src/main/java/com/vectras/vm/StartVM.java
@@ -202,7 +202,7 @@ public class StartVM {
params.add("gtk");
}
- params.add("-full-screen");
+ //params.add("-full-screen");
params.add("-qmp");
params.add("tcp:localhost:4444,server,nowait");
diff --git a/app/src/main/java/com/vectras/vm/VectrasApp.java b/app/src/main/java/com/vectras/vm/VectrasApp.java
index 1d13499..4cb5290 100644
--- a/app/src/main/java/com/vectras/vm/VectrasApp.java
+++ b/app/src/main/java/com/vectras/vm/VectrasApp.java
@@ -1,6 +1,7 @@
package com.vectras.vm;
import static androidx.core.app.ActivityCompat.shouldShowRequestPermissionRationale;
+import static androidx.core.content.ContextCompat.getString;
import android.Manifest;
import android.app.Activity;
@@ -443,16 +444,16 @@ public class VectrasApp extends Application {
} else {
if (request) {
AlertDialog alertDialog = new AlertDialog.Builder(activity, R.style.MainDialogTheme).create();
- alertDialog.setTitle("Allow permissions");
- alertDialog.setMessage("You need to grant permission to access the storage before use.");
+ alertDialog.setTitle(activity.getString(R.string.allow_permissions));
+ alertDialog.setMessage(activity.getString(R.string.you_need_to_grant_permission_to_access_the_storage_before_use));
alertDialog.setCancelable(false);
- alertDialog.setButton(DialogInterface.BUTTON_POSITIVE, "Allow", new DialogInterface.OnClickListener() {
+ alertDialog.setButton(DialogInterface.BUTTON_POSITIVE, getContext().getString(R.string.allow), new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
if (activity.shouldShowRequestPermissionRationale(android.Manifest.permission.WRITE_EXTERNAL_STORAGE)) {
Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
intent.setData(Uri.parse("package:" + activity.getPackageName()));
activity.startActivity(intent);
- Toast.makeText(activity, "Find and allow access to storage in Settings.", Toast.LENGTH_LONG).show();
+ Toast.makeText(activity, R.string.find_and_allow_access_to_storage_in_settings, Toast.LENGTH_LONG).show();
} else {
ActivityCompat.requestPermissions(activity, new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE}, 1000);
}
diff --git a/app/src/main/java/com/vectras/vm/x11/X11Activity.java b/app/src/main/java/com/vectras/vm/x11/X11Activity.java
index 812af6d..dcba615 100644
--- a/app/src/main/java/com/vectras/vm/x11/X11Activity.java
+++ b/app/src/main/java/com/vectras/vm/x11/X11Activity.java
@@ -368,6 +368,7 @@ public class X11Activity extends AppCompatActivity implements View.OnApplyWindow
ImageButton shutdownBtn = findViewById(R.id.shutdownBtn);
ImageButton settingBtn = findViewById(R.id.btnSettings);
+ ImageButton btnFit = findViewById(R.id.btnFit);
ImageButton keyboardBtn = findViewById(R.id.kbdBtn);
ImageButton controllersBtn = findViewById(R.id.btnMode);
ImageButton upBtn = findViewById(R.id.upBtn);
@@ -393,7 +394,27 @@ public class X11Activity extends AppCompatActivity implements View.OnApplyWindow
ImageButton leftGameBtn = findViewById(R.id.leftGameBtn);
ImageButton rightGameBtn = findViewById(R.id.rightGameBtn);
ImageButton enterGameBtn = findViewById(R.id.enterGameBtn);
+
qmpBtn = findViewById(R.id.btnQmp);
+
+ final boolean[] isFullScreen = {false};
+ btnFit.setOnClickListener(view -> {
+ sendKey(KEYCODE_CTRL_LEFT, false);
+ sendKey(KEYCODE_ALT_LEFT, false);
+ sendKey(KEYCODE_F, false);
+ sendKey(KEYCODE_CTRL_LEFT, true);
+ sendKey(KEYCODE_ALT_LEFT, true);
+ sendKey(KEYCODE_F, true);
+
+ if (isFullScreen[0]) {
+ btnFit.setImageDrawable(getResources().getDrawable(R.drawable.close_fullscreen_24px));
+ isFullScreen[0] = false;
+ } else {
+ btnFit.setImageDrawable(getResources().getDrawable(R.drawable.open_in_full_24px));
+ isFullScreen[0] = true;
+ }
+ });
+
upGameBtn.setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
@@ -586,16 +607,15 @@ public class X11Activity extends AppCompatActivity implements View.OnApplyWindow
newFragment.show(ft, "Controllers");
}
});
- settingBtn.setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- final Dialog alertDialog = new Dialog(activity, R.style.MainDialogTheme);
- alertDialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
- alertDialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
- alertDialog.setContentView(R.layout.dialog_setting);
- alertDialog.show();
- }
- });
+ findViewById(R.id.btnSettings)
+ .setOnClickListener(
+ (l) ->
+ startActivity(
+ new Intent(this, LoriePreferences.class) {
+ {
+ setAction(Intent.ACTION_MAIN);
+ }
+ }));
upBtn.setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
diff --git a/app/src/main/res/drawable/close_fullscreen_24px.xml b/app/src/main/res/drawable/close_fullscreen_24px.xml
new file mode 100644
index 0000000..623b055
--- /dev/null
+++ b/app/src/main/res/drawable/close_fullscreen_24px.xml
@@ -0,0 +1,10 @@
+
+
+
diff --git a/app/src/main/res/drawable/open_in_full_24px.xml b/app/src/main/res/drawable/open_in_full_24px.xml
new file mode 100644
index 0000000..b774523
--- /dev/null
+++ b/app/src/main/res/drawable/open_in_full_24px.xml
@@ -0,0 +1,10 @@
+
+
+
diff --git a/app/src/main/res/layout/activity_setup_qemu.xml b/app/src/main/res/layout/activity_setup_qemu.xml
index 33269e0..5d53b20 100644
--- a/app/src/main/res/layout/activity_setup_qemu.xml
+++ b/app/src/main/res/layout/activity_setup_qemu.xml
@@ -83,14 +83,14 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="8dp"
- android:text="Start setup"
+ android:text="@string/start_setup"
android:textSize="18sp" />
+ android:text="@string/do_you_want_to_set_it_up_automatically_or_select_the_bootstrap_file_manually" />
+ android:text="@string/auto_setup" />
+ android:text="@string/manual" />
+ android:text="@string/getting_ready_for_you" />
+ android:text="@string/something_went_wrong_during_setup_would_you_like_to_try_again" />
+ android:text="@string/try_again" />
+ android:text="@string/show_log" />
@@ -194,7 +194,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="8dp"
- android:text="Show advanced setup" />
+ android:text="@string/show_advanced_setup" />
+
+
cancel
cancel
Back to the Display
+ x11 ui environment.
+ X11
+ Rom Options
+ About App
+ JOIN US ON TELEGRAM
+ Join us on Telegram where we publish all the news and updates and receive your opinions and bugs
+ JOIN
+ DONT SHOW AGAIN
+ ]]>
+ DEBUG TESTING BUILD 5
+ ]]>
+ ]]>
+ telegram report bot
]]>
+ github issues page
]]>
+ Getting ready for you...\nPlease don\'t disconnect the network.
+ It won\'t take long...
+ Completed 10%\nIt won\'t take long...
+ Completed 20%\nIt won\'t take long...
+ Completed 30%\nIt won\'t take long...
+ Completed 40%\nIt won\'t take long...
+ Completed 50%\nIt won\'t take long...
+ Don\'t disconnect...
+ Completed 75%\nDon\'t disconnect...
+ Keep it up...
+ Completed 80%\nKeep it up...
+ Completed 95%\nKeep it up...
+ Almost there.
+ Show advanced setup
+ Allow permissions
+ You need to grant permission to access the storage before use.
+ Find and allow access to storage in Settings.
+ Do you want to set it up automatically or select the bootstrap file manually?
+ Auto setup
+ Manual
+ Getting ready for you...
+ Failed!
+ Something went wrong during setup. Would you like to try again?
+ Show log
+ BOOTSTRAP REQUIRED!
+ You can choose between auto download and setup or manual setup by choosing bootstrap file.
+ MANUAL SETUP
diff --git a/app/src/main/res/xml/headers_preference.xml b/app/src/main/res/xml/headers_preference.xml
index 99760a3..56d0ec5 100644
--- a/app/src/main/res/xml/headers_preference.xml
+++ b/app/src/main/res/xml/headers_preference.xml
@@ -26,4 +26,10 @@
android:title="@string/vnc"
android:summary="@string/vnc_ui_environment"
app:iconSpaceReserved="false" />
+
diff --git a/app/src/main/res/xml/settings.xml b/app/src/main/res/xml/settings.xml
index aaf53fe..2159646 100644
--- a/app/src/main/res/xml/settings.xml
+++ b/app/src/main/res/xml/settings.xml
@@ -3,7 +3,7 @@