Updated libraries
This commit is contained in:
parent
334b540721
commit
b15236580b
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CompilerConfiguration">
|
||||
<bytecodeTargetLevel target="11" />
|
||||
<bytecodeTargetLevel target="17" />
|
||||
</component>
|
||||
</project>
|
@ -7,11 +7,11 @@
|
||||
<deviceKey>
|
||||
<Key>
|
||||
<type value="VIRTUAL_DEVICE_PATH" />
|
||||
<value value="$USER_HOME$/.android/avd/Pixel_5_API_29.avd" />
|
||||
<value value="$USER_HOME$/.android/avd/Pixel_XL_Android_12.avd" />
|
||||
</Key>
|
||||
</deviceKey>
|
||||
</Target>
|
||||
</targetSelectedWithDropDown>
|
||||
<timeTargetWasSelectedWithDropDown value="2023-02-15T07:23:10.782369Z" />
|
||||
<timeTargetWasSelectedWithDropDown value="2024-02-16T05:59:01.340872Z" />
|
||||
</component>
|
||||
</project>
|
@ -26,5 +26,5 @@
|
||||
</option>
|
||||
</component>
|
||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="11" project-jdk-type="JavaSDK" />
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_17_PREVIEW" project-jdk-name="11" project-jdk-type="JavaSDK" />
|
||||
</project>
|
@ -18,12 +18,12 @@
|
||||
apply plugin: 'com.android.application'
|
||||
|
||||
android {
|
||||
compileSdkVersion 33
|
||||
compileSdkVersion 34
|
||||
|
||||
defaultConfig {
|
||||
applicationId "it.danieleverducci.nextcloudmaps"
|
||||
minSdkVersion 23
|
||||
targetSdkVersion 33
|
||||
targetSdkVersion 34
|
||||
versionCode 8
|
||||
versionName "0.3.6"
|
||||
|
||||
@ -55,28 +55,34 @@ repositories {
|
||||
dependencies {
|
||||
implementation fileTree(dir: "libs", include: ["*.jar"])
|
||||
|
||||
implementation 'com.android.support:design:31.0.0'
|
||||
implementation 'androidx.appcompat:appcompat:1.3.1'
|
||||
implementation 'androidx.recyclerview:recyclerview:1.2.1'
|
||||
implementation 'com.android.support:design:34.0.0'
|
||||
implementation 'androidx.appcompat:appcompat:1.6.1'
|
||||
implementation 'androidx.recyclerview:recyclerview:1.3.2'
|
||||
implementation "androidx.cardview:cardview:1.0.0"
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.1.0'
|
||||
implementation "androidx.preference:preference:1.1.1"
|
||||
|
||||
testImplementation 'junit:junit:4.13.2'
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
||||
implementation "androidx.preference:preference:1.2.1"
|
||||
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
|
||||
|
||||
// Retrofif2
|
||||
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
|
||||
implementation 'com.squareup.retrofit2:converter-gson:2.6.1'
|
||||
|
||||
// Nextcloud SSO
|
||||
implementation "com.github.nextcloud:Android-SingleSignOn:0.6.1"
|
||||
implementation "com.github.nextcloud:Android-SingleSignOn:1.0.0"
|
||||
|
||||
// OSMDroid
|
||||
implementation 'org.osmdroid:osmdroid-android:6.1.10'
|
||||
implementation 'org.osmdroid:osmdroid-android:6.1.18'
|
||||
|
||||
//Threeten-Backport (ports Java 8 Date API on Java 6+)
|
||||
implementation 'org.threeten:threetenbp:1.5.1'
|
||||
|
||||
// https://mvnrepository.com/artifact/commons-io/commons-io
|
||||
implementation 'commons-io:commons-io:2.11.0'
|
||||
|
||||
configurations.all {
|
||||
resolutionStrategy {
|
||||
force 'commons-io:commons-io:2.11.0'
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -20,6 +20,8 @@ package it.danieleverducci.nextcloudmaps.activity.login;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.ProgressBar;
|
||||
@ -45,6 +47,7 @@ import it.danieleverducci.nextcloudmaps.api.API;
|
||||
import it.danieleverducci.nextcloudmaps.api.ApiProvider;
|
||||
|
||||
public class LoginActivity extends NextcloudMapsStyledActivity {
|
||||
private static final String TAG = "LoginActivity";
|
||||
|
||||
protected ProgressBar progress;
|
||||
protected Button button;
|
||||
@ -63,18 +66,25 @@ public class LoginActivity extends NextcloudMapsStyledActivity {
|
||||
openAccountChooser();
|
||||
});
|
||||
|
||||
Handler h = new Handler();
|
||||
h.post(() -> {
|
||||
try {
|
||||
ssoAccount = SingleAccountHelper.getCurrentSingleSignOnAccount(getApplicationContext());
|
||||
SingleAccountHelper.setCurrentAccount(getApplicationContext(), ssoAccount.name);
|
||||
SingleAccountHelper.applyCurrentAccount(getApplicationContext(), ssoAccount.name);
|
||||
accountAccessDone();
|
||||
} catch (NextcloudFilesAppAccountNotFoundException | NoCurrentAccountSelectedException e) {
|
||||
Log.e(TAG, "Autologin: " + e.toString());
|
||||
}
|
||||
});
|
||||
}
|
||||
private void openAccountChooser() {
|
||||
try {
|
||||
AccountImporter.pickNewAccount(this);
|
||||
} catch (NextcloudFilesAppNotInstalledException | AndroidGetAccountsPermissionNotGranted e) {
|
||||
UiExceptionManager.showDialogForException(this, e);
|
||||
|
||||
Log.e(TAG, "openAccountChooser: " + e.toString());
|
||||
progress.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
@ -98,7 +108,7 @@ public class LoginActivity extends NextcloudMapsStyledActivity {
|
||||
@Override
|
||||
public void accountAccessGranted(SingleSignOnAccount account) {
|
||||
Context l_context = getApplicationContext();
|
||||
SingleAccountHelper.setCurrentAccount(l_context, account.name);
|
||||
SingleAccountHelper.applyCurrentAccount(l_context, account.name);
|
||||
|
||||
accountAccessDone();
|
||||
}
|
||||
|
@ -41,7 +41,6 @@ import androidx.lifecycle.ViewModelProvider;
|
||||
import androidx.preference.PreferenceManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import androidx.recyclerview.widget.StaggeredGridLayoutManager;
|
||||
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
|
||||
|
||||
import com.google.android.material.card.MaterialCardView;
|
||||
import com.google.android.material.floatingactionbutton.FloatingActionButton;
|
||||
@ -69,6 +68,7 @@ import static it.danieleverducci.nextcloudmaps.activity.main.GeofavoriteAdapter.
|
||||
import static it.danieleverducci.nextcloudmaps.activity.main.GeofavoriteAdapter.SORT_BY_CREATED;
|
||||
import static it.danieleverducci.nextcloudmaps.activity.main.GeofavoriteAdapter.SORT_BY_TITLE;
|
||||
import androidx.lifecycle.Observer;
|
||||
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
|
||||
|
||||
public class MainActivity extends NextcloudMapsStyledActivity implements OnSortingOrderListener {
|
||||
|
||||
@ -299,7 +299,7 @@ public class MainActivity extends NextcloudMapsStyledActivity implements OnSorti
|
||||
|
||||
private void switch_account() {
|
||||
ApiProvider.logout();
|
||||
SingleAccountHelper.setCurrentAccount(this, null);
|
||||
SingleAccountHelper.applyCurrentAccount(this, null);
|
||||
Intent intent = new Intent(MainActivity.this, LoginActivity.class);
|
||||
startActivity(intent);
|
||||
finish();
|
||||
|
@ -168,7 +168,8 @@
|
||||
android:layout_height="wrap_content"
|
||||
app:fabSize="mini"
|
||||
android:src="@drawable/ic_add_map"
|
||||
app:backgroundTint="@color/defaultBrand"/>
|
||||
app:backgroundTint="@color/defaultBrand"
|
||||
app:tint="@color/white"/>
|
||||
|
||||
<!-- Add from current position FAB -->
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
@ -179,7 +180,8 @@
|
||||
android:layout_height="wrap_content"
|
||||
app:fabSize="mini"
|
||||
android:src="@drawable/ic_add_gps"
|
||||
app:backgroundTint="@color/defaultBrand"/>
|
||||
app:backgroundTint="@color/defaultBrand"
|
||||
app:tint="@color/white"/>
|
||||
|
||||
<!-- Main FAB -->
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
@ -189,6 +191,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_add"
|
||||
app:backgroundTint="@color/defaultBrand"/>
|
||||
app:backgroundTint="@color/defaultBrand"
|
||||
app:tint="@color/white"/>
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
@ -17,7 +17,8 @@
|
||||
|
||||
<resources>
|
||||
<!-- Base application theme. -->
|
||||
<style name="BaseTheme" parent="Theme.AppCompat.DayNight.NoActionBar">
|
||||
<!--<style name="BaseTheme" parent="Theme.AppCompat.DayNight.NoActionBar">-->
|
||||
<style name="BaseTheme" parent="Theme.MaterialComponents.DayNight.NoActionBar">
|
||||
<item name="colorAccent">@color/defaultBrand</item>
|
||||
<item name="colorControlNormal">?attr/colorAccent</item>
|
||||
<item name="windowActionModeOverlay">true</item>
|
||||
|
Loading…
Reference in New Issue
Block a user