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:
Andy Scherzinger 2019-01-23 16:11:38 +01:00
parent 38859e5bce
commit 8971dc1442
No known key found for this signature in database
GPG key ID: 6CADC7E3523C308B
4 changed files with 8 additions and 7 deletions

View file

@ -456,7 +456,7 @@ public abstract class DrawerActivity extends ToolbarActivity implements DisplayU
case R.id.nav_logout:
mCheckedMenuItem = -1;
menuItem.setChecked(false);
UserInfoActivity.openAccountRemovalConfirmationDialog(getAccount(), getFragmentManager(), true);
UserInfoActivity.openAccountRemovalConfirmationDialog(getAccount(), getSupportFragmentManager(), true);
break;
case R.id.drawer_menu_account_add:
boolean isProviderOrOwnInstallationVisible = getResources()

View file

@ -22,7 +22,6 @@ package com.owncloud.android.ui.activity;
import android.accounts.Account;
import android.accounts.AccountManager;
import android.app.AlertDialog;
import android.app.ProgressDialog;
import android.content.ContentResolver;
import android.content.Context;
@ -39,6 +38,8 @@ import com.owncloud.android.utils.FileStorageUtils;
import java.io.File;
import androidx.appcompat.app.AlertDialog;
/**
* @author Bartosz Przybylski
*/

View file

@ -27,8 +27,6 @@ import android.accounts.Account;
import android.accounts.AccountManager;
import android.app.AlertDialog;
import android.app.Dialog;
import android.app.DialogFragment;
import android.app.FragmentManager;
import android.content.ContentResolver;
import android.content.Intent;
import android.graphics.PorterDuff;
@ -81,6 +79,8 @@ import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.StringRes;
import androidx.core.graphics.drawable.DrawableCompat;
import androidx.fragment.app.DialogFragment;
import androidx.fragment.app.FragmentManager;
import androidx.recyclerview.widget.RecyclerView;
import butterknife.BindString;
import butterknife.BindView;
@ -174,7 +174,7 @@ public class UserInfoActivity extends FileActivity {
onBackPressed();
break;
case R.id.delete_account:
openAccountRemovalConfirmationDialog(account, getFragmentManager(), false);
openAccountRemovalConfirmationDialog(account, getSupportFragmentManager(), false);
break;
default:
retval = super.onOptionsItemSelected(item);

View file

@ -19,7 +19,6 @@
package com.owncloud.android.ui.dialog;
import android.app.AlertDialog;
import android.app.Dialog;
import android.os.Bundle;
import android.view.ActionMode;
@ -34,6 +33,7 @@ import java.util.ArrayList;
import java.util.Collection;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AlertDialog;
/**
* 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());
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_NEGATIVE).setTextColor(color);