|
@@ -42,8 +42,7 @@ import com.owncloud.android.databinding.AccountItemBinding;
|
|
import com.owncloud.android.lib.common.OwnCloudAccount;
|
|
import com.owncloud.android.lib.common.OwnCloudAccount;
|
|
import com.owncloud.android.lib.common.utils.Log_OC;
|
|
import com.owncloud.android.lib.common.utils.Log_OC;
|
|
import com.owncloud.android.utils.DisplayUtils;
|
|
import com.owncloud.android.utils.DisplayUtils;
|
|
-import com.owncloud.android.utils.theme.ThemeColorUtils;
|
|
|
|
-import com.owncloud.android.utils.theme.ThemeDrawableUtils;
|
|
|
|
|
|
+import com.owncloud.android.utils.theme.newm3.ViewThemeUtils;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
@@ -70,8 +69,7 @@ public class UserListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolde
|
|
private final boolean showAddAccount;
|
|
private final boolean showAddAccount;
|
|
private final boolean showDotsMenu;
|
|
private final boolean showDotsMenu;
|
|
private boolean highlightCurrentlyActiveAccount;
|
|
private boolean highlightCurrentlyActiveAccount;
|
|
- private final ThemeColorUtils themeColorUtils;
|
|
|
|
- private final ThemeDrawableUtils themeDrawableUtils;
|
|
|
|
|
|
+ private final ViewThemeUtils viewThemeUtils;
|
|
|
|
|
|
public UserListAdapter(Context context,
|
|
public UserListAdapter(Context context,
|
|
UserAccountManager accountManager,
|
|
UserAccountManager accountManager,
|
|
@@ -80,8 +78,7 @@ public class UserListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolde
|
|
boolean showAddAccount,
|
|
boolean showAddAccount,
|
|
boolean showDotsMenu,
|
|
boolean showDotsMenu,
|
|
boolean highlightCurrentlyActiveAccount,
|
|
boolean highlightCurrentlyActiveAccount,
|
|
- ThemeColorUtils themeColorUtils,
|
|
|
|
- ThemeDrawableUtils themeDrawableUtils) {
|
|
|
|
|
|
+ final ViewThemeUtils viewThemeUtils) {
|
|
this.context = context;
|
|
this.context = context;
|
|
this.accountManager = accountManager;
|
|
this.accountManager = accountManager;
|
|
this.values = values;
|
|
this.values = values;
|
|
@@ -92,8 +89,7 @@ public class UserListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolde
|
|
this.clickListener = clickListener;
|
|
this.clickListener = clickListener;
|
|
this.showAddAccount = showAddAccount;
|
|
this.showAddAccount = showAddAccount;
|
|
this.showDotsMenu = showDotsMenu;
|
|
this.showDotsMenu = showDotsMenu;
|
|
- this.themeColorUtils = themeColorUtils;
|
|
|
|
- this.themeDrawableUtils = themeDrawableUtils;
|
|
|
|
|
|
+ this.viewThemeUtils = viewThemeUtils;
|
|
this.highlightCurrentlyActiveAccount = highlightCurrentlyActiveAccount;
|
|
this.highlightCurrentlyActiveAccount = highlightCurrentlyActiveAccount;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -112,7 +108,7 @@ public class UserListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolde
|
|
return new AccountViewHolderItem(AccountItemBinding.inflate(LayoutInflater.from(context),
|
|
return new AccountViewHolderItem(AccountItemBinding.inflate(LayoutInflater.from(context),
|
|
parent,
|
|
parent,
|
|
false),
|
|
false),
|
|
- themeDrawableUtils);
|
|
|
|
|
|
+ viewThemeUtils);
|
|
} else {
|
|
} else {
|
|
return new AddAccountViewHolderItem(
|
|
return new AddAccountViewHolderItem(
|
|
AccountActionBinding.inflate(LayoutInflater.from(context), parent, false));
|
|
AccountActionBinding.inflate(LayoutInflater.from(context), parent, false));
|
|
@@ -201,11 +197,11 @@ public class UserListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolde
|
|
private final AccountItemBinding binding;
|
|
private final AccountItemBinding binding;
|
|
private User user;
|
|
private User user;
|
|
|
|
|
|
- AccountViewHolderItem(@NonNull AccountItemBinding binding, ThemeDrawableUtils themeDrawableUtils) {
|
|
|
|
|
|
+ AccountViewHolderItem(@NonNull AccountItemBinding binding, final ViewThemeUtils viewThemeUtils) {
|
|
super(binding.getRoot());
|
|
super(binding.getRoot());
|
|
this.binding = binding;
|
|
this.binding = binding;
|
|
|
|
|
|
- themeDrawableUtils.tintDrawable(binding.ticker.getDrawable(), themeColorUtils.primaryColor(context, true));
|
|
|
|
|
|
+ viewThemeUtils.platform.tintPrimaryDrawable(context, binding.ticker.getDrawable());
|
|
|
|
|
|
binding.getRoot().setOnClickListener(this);
|
|
binding.getRoot().setOnClickListener(this);
|
|
if (showDotsMenu) {
|
|
if (showDotsMenu) {
|