Upload button: disable/grey when folder is read-only

Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
This commit is contained in:
tobiasKaminsky 2020-01-14 16:29:09 +01:00
parent f68e9e06d7
commit 447cac9af9
No known key found for this signature in database
GPG key ID: 0E00D4D47D0C5AF7

View file

@ -757,11 +757,12 @@ public class ReceiveExternalFilesActivity extends FileActivity
if (mFile.canWrite()) {
btnChooseFolder.setEnabled(true);
ThemeUtils.tintDrawable(btnChooseFolder.getBackground(),
ThemeUtils.primaryColor(getAccount(), true, this));
btnChooseFolder.setBackgroundTintList(ColorStateList.valueOf(ThemeUtils.primaryColor(getAccount(),
true,
this)));
} else {
btnChooseFolder.setEnabled(false);
ThemeUtils.tintDrawable(btnChooseFolder.getBackground(), Color.GRAY);
btnChooseFolder.setBackgroundTintList(ColorStateList.valueOf(Color.GRAY));
}
if (getSupportActionBar() != null) {