Эх сурвалжийг харах

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

Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
tobiasKaminsky 5 жил өмнө
parent
commit
447cac9af9

+ 4 - 3
src/main/java/com/owncloud/android/ui/activity/ReceiveExternalFilesActivity.java

@@ -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) {