aggiornamento progetto a AGP 8.1

This commit is contained in:
Valerio Castellana 2023-02-13 17:46:57 +01:00
parent ad9795a3a3
commit b02eaf02a8
11 changed files with 47 additions and 53 deletions

6
.idea/kotlinc.xml generated Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="KotlinJpsPluginSettings">
<option name="version" value="1.8.0" />
</component>
</project>

View File

@ -1,6 +1,6 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="app_base" type="AndroidRunConfigurationType" factoryName="Android App" activateToolWindowBeforeRun="false">
<module name="WMS.app" />
<module name="WMS.app.main" />
<option name="DEPLOY" value="true" />
<option name="DEPLOY_APK_FROM_BUNDLE" value="false" />
<option name="DEPLOY_AS_INSTANT" value="false" />
@ -8,13 +8,12 @@
<option name="PM_INSTALL_OPTIONS" value="" />
<option name="ALL_USERS" value="false" />
<option name="ALWAYS_INSTALL_WITH_PM" value="false" />
<option name="CLEAR_APP_STORAGE" value="false" />
<option name="DYNAMIC_FEATURES_DISABLED_LIST" value="WMS.dynamic_vgalimenti" />
<option name="ACTIVITY_EXTRA_FLAGS" value="" />
<option name="MODE" value="default_activity" />
<option name="CLEAR_LOGCAT" value="true" />
<option name="SHOW_LOGCAT_AUTOMATICALLY" value="true" />
<option name="SKIP_NOOP_APK_INSTALLATIONS" value="true" />
<option name="FORCE_STOP_RUNNING_APP" value="true" />
<option name="INSPECTION_WITHOUT_ACTIVITY_RESTART" value="false" />
<option name="TARGET_SELECTION_MODE" value="SHOW_DIALOG" />
<option name="SELECTED_CLOUD_MATRIX_CONFIGURATION_ID" value="-1" />

View File

@ -1,6 +1,6 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="app_vglimenti" type="AndroidRunConfigurationType" factoryName="Android App" activateToolWindowBeforeRun="false">
<module name="WMS.app" />
<module name="WMS.app.main" />
<option name="DEPLOY" value="true" />
<option name="DEPLOY_APK_FROM_BUNDLE" value="false" />
<option name="DEPLOY_AS_INSTANT" value="false" />
@ -8,13 +8,12 @@
<option name="PM_INSTALL_OPTIONS" value="" />
<option name="ALL_USERS" value="false" />
<option name="ALWAYS_INSTALL_WITH_PM" value="false" />
<option name="CLEAR_APP_STORAGE" value="false" />
<option name="DYNAMIC_FEATURES_DISABLED_LIST" value="WMS.dynamic__base" />
<option name="ACTIVITY_EXTRA_FLAGS" value="" />
<option name="MODE" value="default_activity" />
<option name="CLEAR_LOGCAT" value="true" />
<option name="SHOW_LOGCAT_AUTOMATICALLY" value="true" />
<option name="SKIP_NOOP_APK_INSTALLATIONS" value="true" />
<option name="FORCE_STOP_RUNNING_APP" value="true" />
<option name="INSPECTION_WITHOUT_ACTIVITY_RESTART" value="false" />
<option name="TARGET_SELECTION_MODE" value="SHOW_DIALOG" />
<option name="SELECTED_CLOUD_MATRIX_CONFIGURATION_ID" value="-1" />

View File

@ -62,6 +62,7 @@ android {
}
android.buildFeatures.dataBinding true
android.buildFeatures.buildConfig true
compileOptions {
sourceCompatibility JavaVersion.VERSION_11

View File

@ -335,13 +335,11 @@ public class AccettazionePickingActivity extends BaseActivity implements Accetta
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle item selection
switch (item.getItemId()) {
case R.id.action_filter:
if (item.getItemId() == R.id.action_filter) {
showOrderByDialog();
return true;
default:
return super.onOptionsItemSelected(item);
}
return super.onOptionsItemSelected(item);
}
private void initVars() {

View File

@ -181,23 +181,16 @@ public class MainActivity extends BaseActivity
fragment = menuItem.getFragmentFactory().run();
this.adaptViewToFragment(fragment);
} else {
switch (id) {
case R.id.nav_home:
if (id == R.id.nav_home) {
this.pop();
break;
case R.id.nav_settings:
} else if (id == R.id.nav_settings) {
fragment = new MainSettingsFragment();
this.adaptViewToFragment(fragment);
break;
case R.id.nav_logout:
} else if (id == R.id.nav_logout) {
ServerStatusChecker.dispose();
this.mainContext.logout(() -> {
startLoginActivity();
});
break;
}
}
@ -226,7 +219,7 @@ public class MainActivity extends BaseActivity
for (MenuConfiguration.MenuItem menuItem : menuGroup.getItems()) {
if(menuService.isItemEnabled(menuItem)) {
if (menuService.isItemEnabled(menuItem)) {
subMenu
.add(menuGroup.getGroupId(), menuItem.getID(), 0, menuItem.getTitleText())
.setIcon(menuItem.getDrawerIcon());

View File

@ -19,8 +19,6 @@ import android.view.animation.Interpolator;
import android.widget.FrameLayout;
import android.widget.LinearLayout;
import it.integry.integrywmsnative.R;
public class ExpandableLayout extends FrameLayout {
public interface State {
int COLLAPSED = 0;
@ -56,11 +54,11 @@ public class ExpandableLayout extends FrameLayout {
super(context, attrs);
if (attrs != null) {
TypedArray a = getContext().obtainStyledAttributes(attrs, R.styleable.ExpandableLayout);
duration = a.getInt(R.styleable.ExpandableLayout_el_duration, DEFAULT_DURATION);
expansion = a.getBoolean(R.styleable.ExpandableLayout_el_expanded, false) ? 1 : 0;
orientation = a.getInt(R.styleable.ExpandableLayout_android_orientation, VERTICAL);
parallax = a.getFloat(R.styleable.ExpandableLayout_el_parallax, 1);
TypedArray a = getContext().obtainStyledAttributes(attrs, net.cachapa.expandablelayout.R.styleable.ExpandableLayout);
duration = a.getInt(net.cachapa.expandablelayout.R.styleable.ExpandableLayout_el_duration, DEFAULT_DURATION);
expansion = a.getBoolean(net.cachapa.expandablelayout.R.styleable.ExpandableLayout_el_expanded, false) ? 1 : 0;
orientation = a.getInt(net.cachapa.expandablelayout.R.styleable.ExpandableLayout_android_orientation, VERTICAL);
parallax = a.getFloat(net.cachapa.expandablelayout.R.styleable.ExpandableLayout_el_parallax, 1);
a.recycle();
state = expansion == 0 ? COLLAPSED : EXPANDED;

View File

@ -217,15 +217,15 @@ public class DialogInputQuantityV2View extends BaseDialogFragment implements Dia
switch (statoPartitaMag) {
case SCADUTO:
this.mBindings.inputDataScadLayout.setEndIconDrawable(R.drawable.ic_baseline_warning_24);
this.mBindings.inputDataScadLayout.setEndIconTintList(ColorStateList.valueOf(ContextCompat.getColor(requireContext(), R.color.warn_color)));
this.mBindings.inputDataScadLayout.setEndIconTintList(ColorStateList.valueOf(ContextCompat.getColor(requireContext(), com.tfb.fbtoast.R.color.warn_color)));
break;
case IN_SCADENZA:
this.mBindings.inputDataScadLayout.setEndIconDrawable(R.drawable.ic_baseline_warning_24);
this.mBindings.inputDataScadLayout.setEndIconTintList(ColorStateList.valueOf(ContextCompat.getColor(requireContext(), R.color.error_color)));
this.mBindings.inputDataScadLayout.setEndIconTintList(ColorStateList.valueOf(ContextCompat.getColor(requireContext(), com.tfb.fbtoast.R.color.error_color)));
break;
default:
this.mBindings.inputDataScadLayout.setEndIconDrawable(R.drawable.ic_check_white_24dp);
this.mBindings.inputDataScadLayout.setEndIconTintList(ColorStateList.valueOf(ContextCompat.getColor(requireContext(), R.color.success_color)));
this.mBindings.inputDataScadLayout.setEndIconTintList(ColorStateList.valueOf(ContextCompat.getColor(requireContext(), com.tfb.fbtoast.R.color.success_color)));
}
}

View File

@ -11,7 +11,6 @@ import androidx.fragment.app.DialogFragment;
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
import it.integry.integrywmsnative.R;
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
import it.integry.integrywmsnative.core.utility.UtilityString;
import it.integry.integrywmsnative.databinding.DialogYesNoBinding;
@ -42,13 +41,13 @@ public class DialogYesNoView extends DialogFragment {
var binding = DialogYesNoBinding.inflate(LayoutInflater.from(requireContext()));
binding.executePendingBindings();
if(UtilityString.isNullOrEmpty(title)) {
if (UtilityString.isNullOrEmpty(title)) {
binding.titleText.setVisibility(View.GONE);
binding.descriptionText.setTextAppearance(requireContext(), R.style.TextAppearance_Material3_BodyLarge);
binding.descriptionText.setTextAppearance(requireContext(), com.google.android.material.R.style.TextAppearance_Material3_BodyLarge);
} else {
binding.titleText.setText(title);
binding.titleText.setVisibility(View.VISIBLE);
binding.descriptionText.setTextAppearance(requireContext(), R.style.TextAppearance_Material3_BodyMedium);
binding.descriptionText.setTextAppearance(requireContext(), com.google.android.material.R.style.TextAppearance_Material3_BodyMedium);
}
binding.descriptionText.setText(description);

View File

@ -3,6 +3,7 @@
buildscript {
ext {
kotlin_version = '1.8.0'
agp_version = '8.1.0-alpha04'
}
repositories {
@ -10,7 +11,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.4.1'
classpath "com.android.tools.build:gradle:$agp_version"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.3.15'

View File

@ -1,6 +1,6 @@
#Wed Oct 14 10:44:19 CEST 2020
#Mon Feb 13 15:14:43 CET 2023
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
zipStoreBase=GRADLE_USER_HOME