mirror of
https://github.com/xoureldeen/Vectras-VM-Android.git
synced 2026-07-09 17:28:54 +00:00
3.7.9
- MainActivity interface has been improved. - Bugs fixed.
This commit is contained in:
parent
0369bb823c
commit
d5b32c90fa
8 changed files with 69 additions and 43 deletions
|
|
@ -12,8 +12,8 @@ android {
|
|||
applicationId "com.vectras.vm"
|
||||
minSdk minApi
|
||||
targetSdk targetApi
|
||||
versionCode 82
|
||||
versionName "3.7.8"
|
||||
versionCode 83
|
||||
versionName "3.7.9"
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
multiDexEnabled true
|
||||
|
||||
|
|
@ -79,7 +79,7 @@ android {
|
|||
dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
implementation 'androidx.appcompat:appcompat:1.7.1'
|
||||
implementation 'com.google.android.material:material:1.14.0-alpha08'
|
||||
implementation 'com.google.android.material:material:1.14.0-alpha09'
|
||||
implementation "androidx.annotation:annotation:1.9.1"
|
||||
implementation "androidx.core:core-ktx:1.17.0"
|
||||
implementation "androidx.drawerlayout:drawerlayout:1.2.0"
|
||||
|
|
@ -103,12 +103,12 @@ dependencies {
|
|||
implementation 'com.airbnb.android:lottie:6.7.1'
|
||||
implementation 'org.apache.commons:commons-compress:1.28.0'
|
||||
// implementation 'com.google.firebase:firebase-crashlytics-buildtools:3.0.6'
|
||||
implementation 'androidx.activity:activity-ktx:1.12.2'
|
||||
implementation 'androidx.activity:activity-ktx:1.12.3'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.2.1'
|
||||
implementation 'androidx.preference:preference-ktx:1.2.1'
|
||||
implementation "androidx.documentfile:documentfile:1.1.0"
|
||||
implementation 'androidx.core:core-ktx:1.17.0'
|
||||
implementation 'androidx.activity:activity-ktx:1.12.2'
|
||||
implementation 'androidx.activity:activity-ktx:1.12.3'
|
||||
compileOnly project(':shell-loader:stub')
|
||||
implementation project(":terminal-view")
|
||||
|
||||
|
|
|
|||
|
|
@ -730,6 +730,7 @@ public class VMCreatorActivity extends AppCompatActivity {
|
|||
}
|
||||
|
||||
private void thumbnailProcessing() {
|
||||
if (isFinishing() || isDestroyed()) return;
|
||||
if (!thumbnailPath.isEmpty()) {
|
||||
binding.ivAddThubnail.setImageResource(R.drawable.edit_24px);
|
||||
File imgFile = new File(thumbnailPath);
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ import android.view.Menu;
|
|||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.activity.EdgeToEdge;
|
||||
import androidx.activity.OnBackPressedCallback;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.appcompat.app.ActionBarDrawerToggle;
|
||||
|
|
@ -139,16 +140,17 @@ public class MainActivity extends AppCompatActivity implements RomStoreFragment.
|
|||
RomStoreFragment.romStoreCallToHomeListener = this;
|
||||
SoftwareStoreFragment.softwareStoreCallToHomeListener = this;
|
||||
|
||||
// EdgeToEdge.enable(this);
|
||||
EdgeToEdge.enable(this);
|
||||
binding = ActivityMainBinding.inflate(getLayoutInflater());
|
||||
bindingContent = binding.maincontent;
|
||||
setContentView(binding.getRoot());
|
||||
isActivate = true;
|
||||
|
||||
// UIUtils.setOnApplyWindowInsetsListenerTop(bindingContent.main);
|
||||
// UIUtils.setOnApplyWindowInsetsListenerLeftOnly(binding.navView);
|
||||
UIUtils.setOnApplyWindowInsetsListenerBottomOnly(binding.rvSearch);
|
||||
UIUtils.setOnApplyWindowInsetsListenerBottomOnly(binding.lnSearchempty);
|
||||
UIUtils.setOnApplyWindowInsetsListenerHorizontal(bindingContent.main);
|
||||
UIUtils.setOnApplyWindowInsetsListenerBottomOnly(bindingContent.containerView);
|
||||
UIUtils.setOnApplyWindowInsetsListenerNavigationView(binding.navView);
|
||||
UIUtils.setOnApplyWindowInsetsListenerBottom(binding.rvSearch);
|
||||
UIUtils.setOnApplyWindowInsetsListenerBottom(binding.lnSearchempty);
|
||||
|
||||
initialize(bundle);
|
||||
}
|
||||
|
|
@ -435,8 +437,6 @@ public class MainActivity extends AppCompatActivity implements RomStoreFragment.
|
|||
}
|
||||
|
||||
private void setupDrawer() {
|
||||
binding.drawerLayout.setScrimColor(Color.parseColor("#40000000")); //25%
|
||||
|
||||
//Setting Navigation View Item Selected Listener to handle the item click of the navigation menu
|
||||
// This method will trigger on item Click of navigation menu
|
||||
binding.navView.setNavigationItemSelectedListener(menuItem -> {
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ import android.util.Log;
|
|||
import android.view.Display;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
|
|
@ -494,7 +495,7 @@ public class UIUtils {
|
|||
});
|
||||
}
|
||||
|
||||
public static void setOnApplyWindowInsetsListenerHorizontalOnly(View _view) {
|
||||
public static void setOnApplyWindowInsetsListenerHorizontal(View _view) {
|
||||
int originalPaddingLeft = _view.getPaddingLeft();
|
||||
int originalPaddingTop = _view.getPaddingTop();
|
||||
int originalPaddingRight = _view.getPaddingRight();
|
||||
|
|
@ -507,6 +508,24 @@ public class UIUtils {
|
|||
});
|
||||
}
|
||||
|
||||
public static void setOnApplyWindowInsetsListenerNavigationView(View _view) {
|
||||
int originalPaddingLeft = _view.getPaddingLeft();
|
||||
int originalPaddingTop = _view.getPaddingTop();
|
||||
int originalPaddingRight = _view.getPaddingRight();
|
||||
int originalPaddingBottom = _view.getPaddingBottom();
|
||||
|
||||
|
||||
ViewCompat.setOnApplyWindowInsetsListener(_view, (v, insets) -> {
|
||||
Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars() | WindowInsetsCompat.Type.displayCutout() | WindowInsetsCompat.Type.ime());
|
||||
v.setPadding(systemBars.left + originalPaddingLeft , originalPaddingTop, originalPaddingRight, originalPaddingBottom);
|
||||
|
||||
ViewGroup.MarginLayoutParams lp = (ViewGroup.MarginLayoutParams) v.getLayoutParams();
|
||||
lp.bottomMargin = systemBars.bottom;
|
||||
v.setLayoutParams(lp);
|
||||
return insets;
|
||||
});
|
||||
}
|
||||
|
||||
public static boolean isUsingThemeNightMode() {
|
||||
int nightMode = AppCompatDelegate.getDefaultNightMode();
|
||||
return nightMode == AppCompatDelegate.MODE_NIGHT_YES;
|
||||
|
|
|
|||
|
|
@ -1,18 +1,34 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.drawerlayout.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/drawer_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:keepScreenOn="true"
|
||||
android:background="?attr/colorSurface"
|
||||
tools:openDrawer="start"
|
||||
tools:context=".main.MainActivity" >
|
||||
android:layout_height="match_parent">
|
||||
<androidx.drawerlayout.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/drawer_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:keepScreenOn="true"
|
||||
android:background="?attr/colorSurface"
|
||||
tools:openDrawer="start"
|
||||
tools:context=".main.MainActivity" >
|
||||
|
||||
<include
|
||||
android:id="@+id/maincontent"
|
||||
layout="@layout/activity_main_content"/>
|
||||
<include
|
||||
android:id="@+id/maincontent"
|
||||
layout="@layout/activity_main_content"/>
|
||||
|
||||
<!--Place NavigationView here to avoid interaction errors affected by other objects and cause unwanted effects to other objects.-->
|
||||
<com.google.android.material.navigation.NavigationView
|
||||
android:id="@+id/nav_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="start"
|
||||
app:headerLayout="@layout/nav_header_main"
|
||||
app:menu="@menu/home_drawer_menu" />
|
||||
|
||||
</androidx.drawerlayout.widget.DrawerLayout>
|
||||
|
||||
<com.google.android.material.search.SearchView
|
||||
android:id="@+id/searchview"
|
||||
|
|
@ -50,14 +66,4 @@
|
|||
android:paddingVertical="8dp"
|
||||
android:clipToPadding="false"/>
|
||||
</com.google.android.material.search.SearchView>
|
||||
|
||||
<!--Place NavigationView here to avoid interaction errors affected by other objects and cause unwanted effects to other objects.-->
|
||||
<com.google.android.material.navigation.NavigationView
|
||||
android:id="@+id/nav_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="start"
|
||||
app:headerLayout="@layout/nav_header_main"
|
||||
app:menu="@menu/home_drawer_menu" />
|
||||
|
||||
</androidx.drawerlayout.widget.DrawerLayout>
|
||||
</FrameLayout>
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:fitsSystemWindows="true"
|
||||
tools:context=".main.MainActivity">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
|
|
@ -53,9 +52,10 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/create"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginBottom="80dp"
|
||||
android:translationY="-56dp"
|
||||
app:layout_anchor="@id/bottom_navigation"
|
||||
app:layout_anchorGravity="top|end"
|
||||
app:icon="@drawable/add_24px"
|
||||
app:layout_behavior="com.google.android.material.behavior.HideViewOnScrollBehavior"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
|
|
|||
|
|
@ -12,8 +12,8 @@
|
|||
|
||||
<string name="desktopInstructions">To use External Mouse:\n\tDisable Mouse Acceleration inside the Guest OS.\n\t\tFor DSL use command: xset m 1\n"\t\tFor Other OSes disable \"Enhance pointer Precision\" or choose Mouse \"usb-tablet\" from Vectras main options.\n\tPlug in or Pair your USB/Bluetooth Mouse and press OK\n\tMove your mouse pointer to all desktop sides to calibrate.\n"</string>
|
||||
|
||||
<string name="navigation_drawer_open">drawer open</string>
|
||||
<string name="navigation_drawer_close">drawer close</string>
|
||||
<string name="navigation_drawer_open">Drawer open</string>
|
||||
<string name="navigation_drawer_close">Drawer close</string>
|
||||
<string name="address_caption">Address</string>
|
||||
<string name="reset">Reset</string>
|
||||
<string name="shutdown">Shut down</string>
|
||||
|
|
|
|||
|
|
@ -5,11 +5,11 @@
|
|||
"url": "https://github.com/xoureldeen/Vectras-VM-Android/releases",
|
||||
"Message": "<h2>3.7.0</h2>\nBugs fixed.",
|
||||
"cancellable": true,
|
||||
"versionCodeBeta":"82",
|
||||
"versionNameBeta":"3.7.8",
|
||||
"versionNameBetas":"3.0.0,3.1.0,3.2.1,3.2.2,3.2.3,3.2.4,3.2.5,3.2.6,3.2.7,3.2.8,3.2.9,3.2.10,3.3.1,3.3.2,3.3.3,3.3.4,3.3.5,3.3.6,3.3.7,3.3.8,3.3.9,3.4.1,3.4.2,3.4.3,3.4.4,3.4.5,3.4.6,3.4.7,3.4.8,3.4.9,3.5.1,3.5.2,3.5.3,3.5.4,3.5.5,3.5.6,3.5.7,3.5.8,3.5.9,3.6.1,3.6.2,3.6.3,3.6.4,3.6.5,3.6.6,3.6.7,3.6.8,3.6.9,3.7.1,3.7.2,3.7.3,3.7.4,3.7.5,3.7.6,3.7.7,3.7.8",
|
||||
"versionCodeBeta":"83",
|
||||
"versionNameBeta":"3.7.9",
|
||||
"versionNameBetas":"3.0.0,3.1.0,3.2.1,3.2.2,3.2.3,3.2.4,3.2.5,3.2.6,3.2.7,3.2.8,3.2.9,3.2.10,3.3.1,3.3.2,3.3.3,3.3.4,3.3.5,3.3.6,3.3.7,3.3.8,3.3.9,3.4.1,3.4.2,3.4.3,3.4.4,3.4.5,3.4.6,3.4.7,3.4.8,3.4.9,3.5.1,3.5.2,3.5.3,3.5.4,3.5.5,3.5.6,3.5.7,3.5.8,3.5.9,3.6.1,3.6.2,3.6.3,3.6.4,3.6.5,3.6.6,3.6.7,3.6.8,3.6.9,3.7.1,3.7.2,3.7.3,3.7.4,3.7.5,3.7.6,3.7.7,3.7.8,3.7.9",
|
||||
"sizeBeta": "45 MB",
|
||||
"urlBeta": "https://github.com/AnBui2004/Vectras-VM-Emu-Android/releases",
|
||||
"MessageBeta": "<h2>3.7.8</h2>Bugs fixed.",
|
||||
"MessageBeta": "<h2>3.7.9</h2>Bugs fixed.",
|
||||
"cancellableBeta": true
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue