瀏覽代碼

Fixed bug relative to inflating (due to < API 21)

This reverts commit a92725f8a7bdd6977e93bd61f811ee01eaeb2bb1.

Signed-off-by: Kilian Périsset <kilian.perisset@infomaniak.com>
Kilian Périsset 5 年之前
父節點
當前提交
9c6105e94c

+ 1 - 1
src/main/java/com/owncloud/android/ui/adapter/NotificationListAdapter.java

@@ -170,7 +170,7 @@ public class NotificationListAdapter extends RecyclerView.Adapter<NotificationLi
                 button.setStrokeColor(ColorStateList.valueOf(resources.getColor(R.color.grey_200)));
                 button.setStrokeWidth(3);
 
-                button.setBackgroundColor(resources.getColor(android.R.color.transparent));
+                button.setBackgroundColor(resources.getColor(R.color.transparent));
                 button.setTextColor(primaryColor);
                 button.setTypeface(button.getTypeface(), Typeface.BOLD);
             }

+ 1 - 1
src/main/java/com/owncloud/android/ui/fragment/FileDetailSharingFragment.java

@@ -210,7 +210,7 @@ public class FileDetailSharingFragment extends Fragment implements ShareeListAda
         // todo extract
         internalLinkIcon.getBackground().setColorFilter(getResources().getColor(R.color.grey_db),
                                                         PorterDuff.Mode.SRC_IN);
-        internalLinkIcon.getDrawable().mutate().setColorFilter(getResources().getColor(android.R.color.black),
+        internalLinkIcon.getDrawable().mutate().setColorFilter(getResources().getColor(R.color.black),
                                                                PorterDuff.Mode.SRC_IN);
 
         if (file.isFolder()) {

+ 1 - 1
src/main/res/layout-land/account_setup.xml

@@ -196,7 +196,7 @@
                 android:id="@+id/scanQR"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
-                android:background="@android:color/transparent"
+                android:background="@color/transparent"
                 android:contentDescription="@string/scanQR_description"
                 android:src="@drawable/qrcode_scan" />
 

+ 1 - 1
src/main/res/layout/account_setup.xml

@@ -197,7 +197,7 @@
                 android:id="@+id/scanQR"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
-                android:background="@android:color/transparent"
+                android:background="@color/transparent"
                 android:contentDescription="@string/scanQR_description"
                 android:src="@drawable/qrcode_scan"
                 android:theme="@style/Button.Login" />

+ 2 - 2
src/main/res/layout/synced_folders_item_header.xml

@@ -69,7 +69,7 @@
             android:id="@+id/syncStatusButton"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:background="@android:color/transparent"
+            android:background="@color/transparent"
             android:clickable="true"
             android:contentDescription="@string/sync_status_button"
             android:focusable="true"
@@ -80,7 +80,7 @@
             android:id="@+id/settingsButton"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:background="@android:color/transparent"
+            android:background="@color/transparent"
             android:clickable="true"
             android:contentDescription="@string/synced_folder_settings_button"
             android:focusable="true"

+ 2 - 2
src/main/res/layout/toolbar_user_information.xml

@@ -92,7 +92,7 @@
                         android:shadowDx="0.5"
                         android:shadowDy="0"
                         android:shadowRadius="2"
-                        android:textColor="@android:color/white"
+                        android:textColor="@color/white"
                         android:textSize="@dimen/drawer_header_text"
                         android:textStyle="bold"
                         tools:text="Max Mustermann"/>
@@ -108,7 +108,7 @@
                         android:shadowDx="0.5"
                         android:shadowDy="0"
                         android:shadowRadius="2"
-                        android:textColor="@android:color/white"
+                        android:textColor="@color/white"
                         android:textSize="@dimen/drawer_header_subtext"
                         tools:text="max@127.0.0.1/nextcloud"/>
                 </LinearLayout>

+ 1 - 1
src/main/res/layout/uploader_layout.xml

@@ -35,7 +35,7 @@
 		<ListView android:id="@android:id/list"
 			android:layout_width="fill_parent"
 			android:layout_height="fill_parent"
-            android:divider="@android:color/transparent"
+            android:divider="@color/transparent"
             android:dividerHeight="0dip">
 		</ListView>
 

+ 1 - 1
src/main/res/values-night/colors.xml

@@ -40,6 +40,6 @@
     <color name="bg_fallback_highlight">#737373</color>
     <color name="switch_thumb_color_unchecked">#2a2a2a</color>
     <color name="switch_track_color_unchecked">#B3FFFFFF</color>
-    <color name="drawer_active_item_background">@android:color/white</color>
+    <color name="drawer_active_item_background">@color/white</color>
 
 </resources>

+ 9 - 4
src/main/res/values/colors.xml

@@ -20,14 +20,19 @@
 <resources>
 
     <color name="list_selector_focused_pressed">#00ddff</color>
+
     <color name="list_item_lastmod_and_filesize_text">@color/secondary_text_color</color>
-    <color name="text_color">@android:color/black</color>
+    <color name="black">#000000</color>
+    <color name="white">#ffffff</color>
+    <color name="text_color">#000000</color>
+    <color name="text_color_inverse">#ffffff</color>
     <color name="disabled_text">#ff888888</color>
     <color name="list_divider_background">#eee</color>
     <color name="fg_contrast">#656565</color>
     <color name="fg_inverse">#FFFFFF</color>
     <color name="filelist_icon_background">#DDDDDD</color>
     <color name="dark_background_text_color">#EEEEEE</color>
+    <color name="transparent">#00000000</color>
     <color name="secondary_text_color">#a0a0a0</color>
     <color name="highlight_textColor_Warning">#e53935</color>
 
@@ -44,9 +49,9 @@
     <color name="infolevel_warning">#e9322d</color>
 
     <!-- Colors -->
-    <color name="login_btn_tint">@android:color/white</color>
-    <color name="login_btn_stroke">@android:color/white</color>
-    <color name="bg_default">@android:color/white</color>
+    <color name="login_btn_tint">#ffffff</color>
+    <color name="login_btn_stroke">#ffffff</color>
+    <color name="bg_default">#FFFFFF</color>
     <color name="background_color_inverse">#000000</color>
     <color name="primary_button_background_color">@color/color_accent</color>
     <color name="primary_button_text_color">#ffffff</color>

+ 5 - 5
src/main/res/values/styles.xml

@@ -115,8 +115,8 @@
 	<style name="ProgressDialogTheme" parent="ownCloud.Dialog">
 		<item name="colorAccent">@color/color_accent</item>
 		<item name="android:textColorPrimary">@color/primary</item>
-		<item name="android:windowFrame">@android:color/transparent</item>
-		<item name="android:windowBackground">@android:color/transparent</item>
+		<item name="android:windowFrame">@color/transparent</item>
+		<item name="android:windowBackground">@color/transparent</item>
 		<item name="android:windowTitleBackgroundStyle">@drawable/process_dialog_background</item>
 	</style>
 
@@ -136,13 +136,13 @@
 	</style>
 
     <style name="OutlinedButton" parent="Widget.MaterialComponents.Button.OutlinedButton">
-        <item name="colorAccent">@android:color/transparent</item>
+        <item name="colorAccent">@color/transparent</item>
         <item name="android:textColor">@color/primary_dark</item>
         <item name="android:textAllCaps">false</item>
     </style>
 
     <style name="OutlineLoginButton" parent="Widget.MaterialComponents.Button.OutlinedButton">
-        <item name="colorAccent">@android:color/transparent</item>
+        <item name="colorAccent">@color/transparent</item>
         <item name="android:textColor">@color/fg_inverse</item>
         <item name="android:textAllCaps">false</item>
         <item name="strokeColor">@color/login_btn_stroke</item>
@@ -242,7 +242,7 @@
 
 	<style name="NavigationView_ItemTextAppearance">
 		<item name="android:ellipsize">end</item>
-		<item name="android:listDivider">@android:color/transparent</item>
+		<item name="android:listDivider">@color/transparent</item>
         <!-- Color of text and icon when selected -->
         <item name="colorPrimary">@color/drawer_active_item_background</item>
 	</style>