瀏覽代碼

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

Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
tobiasKaminsky 5 年之前
父節點
當前提交
447cac9af9
共有 1 個文件被更改,包括 4 次插入3 次删除
  1. 4 3
      src/main/java/com/owncloud/android/ui/activity/ReceiveExternalFilesActivity.java

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