Browse Source

add dark/light theming for activities headline

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
Andy Scherzinger 5 years ago
parent
commit
a518885612

+ 0 - 1
src/main/java/com/owncloud/android/ui/activities/StickyHeaderItemDecoration.java

@@ -99,7 +99,6 @@ public class StickyHeaderItemDecoration extends RecyclerView.ItemDecoration {
         int headerPosition = adapter.getHeaderPositionForItem(itemPosition);
         int layoutId = adapter.getHeaderLayout(itemPosition);
         View header = LayoutInflater.from(parent.getContext()).inflate(layoutId, parent, false);
-        header.setBackgroundColor(Color.WHITE);
         adapter.bindHeaderData(header, headerPosition);
         return header;
     }

+ 24 - 4
src/main/res/layout/activity_list_item_header.xml

@@ -1,16 +1,36 @@
 <?xml version="1.0" encoding="utf-8"?>
+<!--
+  Nextcloud Android client application
+
+  Copyright (C) 2019 Sevastyan Savanyuk
+
+  This program is free software; you can redistribute it and/or
+  modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
+  License as published by the Free Software Foundation; either
+  version 3 of the License, or any later version.
+
+  This program is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU AFFERO GENERAL PUBLIC LICENSE for more details.
+
+  You should have received a copy of the GNU Affero General Public
+  License along with this program.  If not, see <http://www.gnu.org/licenses/>.
+-->
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:orientation="vertical" android:layout_width="match_parent"
-    android:layout_height="wrap_content">
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:orientation="vertical"
+    android:background="@color/bg_default">
 
     <TextView
         android:id="@+id/title_header"
         android:layout_width="match_parent"
         android:layout_height="60dp"
-        android:layout_marginLeft="@dimen/standard_list_item_size"
         android:layout_marginStart="@dimen/standard_list_item_size"
+        android:layout_marginLeft="@dimen/standard_list_item_size"
         android:layout_marginTop="10dp"
         android:text="@string/placeholder_filename"
-        android:textSize="@dimen/activity_list_item_title_header_text_size"/>
+        android:textSize="@dimen/activity_list_item_title_header_text_size" />
 
 </LinearLayout>