Merge pull request #8058 from nextcloud/fixScreenshotColorTests
Fix screenshot tests on TestActivity
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 5 KiB After Width: | Height: | Size: 4.7 KiB |
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.8 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 49 KiB |
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 49 KiB |
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 48 KiB |
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 48 KiB |
|
@ -1,5 +1,4 @@
|
|||
/*
|
||||
*
|
||||
* Nextcloud Android client application
|
||||
*
|
||||
* @author Tobias Kaminsky
|
||||
|
@ -104,9 +103,11 @@ class TestActivity :
|
|||
if (!this::storage.isInitialized) {
|
||||
storage = FileDataStorageManager(account, contentResolver)
|
||||
|
||||
val ocCapability = OCCapability()
|
||||
ocCapability.versionMayor = OwnCloudVersion.nextcloud_20.majorVersionNumber
|
||||
storage.saveCapabilities(ocCapability)
|
||||
if (!storage.capabilityExistsForAccount(account.name)) {
|
||||
val ocCapability = OCCapability()
|
||||
ocCapability.versionMayor = OwnCloudVersion.nextcloud_20.majorVersionNumber
|
||||
storage.saveCapabilities(ocCapability)
|
||||
}
|
||||
}
|
||||
|
||||
return storage
|
||||
|
|
|
@ -2126,6 +2126,15 @@ public class FileDataStorageManager {
|
|||
return capability;
|
||||
}
|
||||
|
||||
public boolean capabilityExistsForAccount(String accountName) {
|
||||
Cursor cursor = getCapabilityCursorForAccount(accountName);
|
||||
|
||||
boolean exists = cursor.moveToFirst();
|
||||
cursor.close();
|
||||
|
||||
return exists;
|
||||
}
|
||||
|
||||
private OCCapability createCapabilityInstance(Cursor cursor) {
|
||||
OCCapability capability = null;
|
||||
if (cursor != null) {
|
||||
|
|
|
@ -194,10 +194,11 @@ public class SendShareDialog extends BottomSheetDialogFragment {
|
|||
}
|
||||
|
||||
private void themeShareButtonImage(ImageView shareImageView) {
|
||||
shareImageView.getBackground().setColorFilter(ThemeColorUtils.primaryColor(getContext(), true),
|
||||
shareImageView.getBackground().setColorFilter(ThemeColorUtils.primaryColor(getContext().getApplicationContext(),
|
||||
true),
|
||||
PorterDuff.Mode.SRC_IN);
|
||||
shareImageView.getDrawable().mutate().setColorFilter(ThemeColorUtils.fontColor(getContext()),
|
||||
PorterDuff.Mode.SRC_IN);
|
||||
shareImageView.getDrawable().mutate().setColorFilter(ThemeColorUtils.fontColor(getContext().getApplicationContext()),
|
||||
PorterDuff.Mode.SRC_IN);
|
||||
}
|
||||
|
||||
private void showResharingNotAllowedSnackbar() {
|
||||
|
|
|
@ -232,7 +232,7 @@ public class FileDetailFragment extends FileFragment implements OnClickListener,
|
|||
binding.tabLayout.addTab(binding.tabLayout.newTab().setText(R.string.drawer_item_activities).setIcon(R.drawable.ic_activity));
|
||||
binding.tabLayout.addTab(binding.tabLayout.newTab().setText(R.string.share_dialog_title).setIcon(R.drawable.shared_via_users));
|
||||
|
||||
ThemeLayoutUtils.colorTabLayout(getContext(), binding.tabLayout);
|
||||
ThemeLayoutUtils.colorTabLayout(getContext().getApplicationContext(), binding.tabLayout);
|
||||
|
||||
final FileDetailTabAdapter adapter = new FileDetailTabAdapter(getFragmentManager(), getFile(), user);
|
||||
binding.pager.setAdapter(adapter);
|
||||
|
|