mirror of
https://github.com/nextcloud/android.git
synced 2024-11-23 21:55:48 +03:00
make use of AndroidX implementation due to deprecated standard sdk implementation
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
parent
38859e5bce
commit
8971dc1442
4 changed files with 8 additions and 7 deletions
|
@ -456,7 +456,7 @@ public abstract class DrawerActivity extends ToolbarActivity implements DisplayU
|
||||||
case R.id.nav_logout:
|
case R.id.nav_logout:
|
||||||
mCheckedMenuItem = -1;
|
mCheckedMenuItem = -1;
|
||||||
menuItem.setChecked(false);
|
menuItem.setChecked(false);
|
||||||
UserInfoActivity.openAccountRemovalConfirmationDialog(getAccount(), getFragmentManager(), true);
|
UserInfoActivity.openAccountRemovalConfirmationDialog(getAccount(), getSupportFragmentManager(), true);
|
||||||
break;
|
break;
|
||||||
case R.id.drawer_menu_account_add:
|
case R.id.drawer_menu_account_add:
|
||||||
boolean isProviderOrOwnInstallationVisible = getResources()
|
boolean isProviderOrOwnInstallationVisible = getResources()
|
||||||
|
|
|
@ -22,7 +22,6 @@ package com.owncloud.android.ui.activity;
|
||||||
|
|
||||||
import android.accounts.Account;
|
import android.accounts.Account;
|
||||||
import android.accounts.AccountManager;
|
import android.accounts.AccountManager;
|
||||||
import android.app.AlertDialog;
|
|
||||||
import android.app.ProgressDialog;
|
import android.app.ProgressDialog;
|
||||||
import android.content.ContentResolver;
|
import android.content.ContentResolver;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
@ -39,6 +38,8 @@ import com.owncloud.android.utils.FileStorageUtils;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
|
||||||
|
import androidx.appcompat.app.AlertDialog;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Bartosz Przybylski
|
* @author Bartosz Przybylski
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -27,8 +27,6 @@ import android.accounts.Account;
|
||||||
import android.accounts.AccountManager;
|
import android.accounts.AccountManager;
|
||||||
import android.app.AlertDialog;
|
import android.app.AlertDialog;
|
||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
import android.app.DialogFragment;
|
|
||||||
import android.app.FragmentManager;
|
|
||||||
import android.content.ContentResolver;
|
import android.content.ContentResolver;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.graphics.PorterDuff;
|
import android.graphics.PorterDuff;
|
||||||
|
@ -81,6 +79,8 @@ import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.annotation.StringRes;
|
import androidx.annotation.StringRes;
|
||||||
import androidx.core.graphics.drawable.DrawableCompat;
|
import androidx.core.graphics.drawable.DrawableCompat;
|
||||||
|
import androidx.fragment.app.DialogFragment;
|
||||||
|
import androidx.fragment.app.FragmentManager;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
import butterknife.BindString;
|
import butterknife.BindString;
|
||||||
import butterknife.BindView;
|
import butterknife.BindView;
|
||||||
|
@ -174,7 +174,7 @@ public class UserInfoActivity extends FileActivity {
|
||||||
onBackPressed();
|
onBackPressed();
|
||||||
break;
|
break;
|
||||||
case R.id.delete_account:
|
case R.id.delete_account:
|
||||||
openAccountRemovalConfirmationDialog(account, getFragmentManager(), false);
|
openAccountRemovalConfirmationDialog(account, getSupportFragmentManager(), false);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
retval = super.onOptionsItemSelected(item);
|
retval = super.onOptionsItemSelected(item);
|
||||||
|
|
|
@ -19,7 +19,6 @@
|
||||||
|
|
||||||
package com.owncloud.android.ui.dialog;
|
package com.owncloud.android.ui.dialog;
|
||||||
|
|
||||||
import android.app.AlertDialog;
|
|
||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.view.ActionMode;
|
import android.view.ActionMode;
|
||||||
|
@ -34,6 +33,7 @@ import java.util.ArrayList;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.appcompat.app.AlertDialog;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dialog requiring confirmation before removing a collection of given OCFiles.
|
* Dialog requiring confirmation before removing a collection of given OCFiles.
|
||||||
|
@ -133,7 +133,7 @@ public class RemoveFilesDialogFragment extends ConfirmationDialogFragment implem
|
||||||
|
|
||||||
int color = ThemeUtils.primaryAccentColor(getActivity());
|
int color = ThemeUtils.primaryAccentColor(getActivity());
|
||||||
|
|
||||||
androidx.appcompat.app.AlertDialog alertDialog = (androidx.appcompat.app.AlertDialog) getDialog();
|
AlertDialog alertDialog = (AlertDialog) getDialog();
|
||||||
|
|
||||||
alertDialog.getButton(AlertDialog.BUTTON_POSITIVE).setTextColor(color);
|
alertDialog.getButton(AlertDialog.BUTTON_POSITIVE).setTextColor(color);
|
||||||
alertDialog.getButton(AlertDialog.BUTTON_NEGATIVE).setTextColor(color);
|
alertDialog.getButton(AlertDialog.BUTTON_NEGATIVE).setTextColor(color);
|
||||||
|
|
Loading…
Reference in a new issue