Infinite 3 ani în urmă
părinte
comite
825868fccf

+ 1 - 0
app/build.gradle

@@ -52,6 +52,7 @@ dependencies {
     implementation platform('com.google.firebase:firebase-bom:28.2.1')
     implementation 'com.google.firebase:firebase-messaging'
     implementation 'com.github.GrenderG:Toasty:1.5.0'
+    implementation 'androidx.webkit:webkit:1.4.0'
 
 
 }

+ 6 - 2
app/src/main/AndroidManifest.xml

@@ -18,10 +18,14 @@
                 <category android:name="android.intent.category.LAUNCHER" />
             </intent-filter>
         </activity>
-        <activity android:name=".activities.MainActivity" />
+        <activity
+            android:name=".activities.MainActivity"
+            android:configChanges="uiMode" />
 
 
-        <service android:name=".services.NotificationService"  android:exported="true">
+        <service
+            android:name=".services.NotificationService"
+            android:exported="true">
             <intent-filter>
                 <action android:name="com.google.firebase.MESSAGING_EVENT" />
             </intent-filter>

+ 9 - 0
app/src/main/java/club/thepenguins/android/fragments/LinuxFragment.java

@@ -12,6 +12,8 @@ import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
 
+import com.facebook.shimmer.ShimmerFrameLayout;
+
 import org.jsoup.parser.Parser;
 
 import java.util.ArrayList;
@@ -44,6 +46,8 @@ public class LinuxFragment extends Fragment {
     private PostRecyclerAdapter adapter;
     public static List<Posts> mListPost;
     private SwipeRefreshLayout swipeContainer;
+    private ShimmerFrameLayout loader;
+
 
     public LinuxFragment() {
         // Required empty public constructor
@@ -76,6 +80,8 @@ public class LinuxFragment extends Fragment {
 
 
         recyclerView = rootView.findViewById(R.id.recycler_view);
+        loader = (ShimmerFrameLayout) rootView.findViewById(R.id.shimmer_view_container);
+
 
         LayoutManager = new LinearLayoutManager(rootView.getContext(), LinearLayoutManager.VERTICAL, false);
         recyclerView.setLayoutManager(LayoutManager);
@@ -118,6 +124,8 @@ public class LinuxFragment extends Fragment {
     private void getRetrofit() {
 
         swipeContainer.setRefreshing(true);
+        loader.setVisibility(View.VISIBLE);
+        loader.startShimmer();
 
         Retrofit retrofit = new Retrofit.Builder()
                 .baseUrl(Constants.BaseUrl)
@@ -140,6 +148,7 @@ public class LinuxFragment extends Fragment {
                 }
                 adapter.notifyDataSetChanged();
                 swipeContainer.setRefreshing(false);
+                loader.setVisibility(View.GONE);
 
             }
 

+ 12 - 0
app/src/main/java/club/thepenguins/android/fragments/PostFragment.java

@@ -1,17 +1,21 @@
 package club.thepenguins.android.fragments;
 
 import android.content.Context;
+import android.content.res.Configuration;
 import android.os.Bundle;
 
 import androidx.fragment.app.Fragment;
 import androidx.recyclerview.widget.LinearLayoutManager;
 import androidx.recyclerview.widget.RecyclerView;
+import androidx.webkit.WebSettingsCompat;
+import androidx.webkit.WebViewFeature;
 
 import android.os.Handler;
 import android.util.Log;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
+import android.webkit.WebSettings;
 import android.webkit.WebView;
 import android.widget.TextView;
 import android.widget.Toast;
@@ -151,6 +155,14 @@ public class PostFragment extends Fragment {
 
                     myWebView.loadDataWithBaseURL(null, newHtmlString, "text/html", "UTF-8", null);
                     myWebView.getSettings().setJavaScriptEnabled(true);
+
+                    int nightModeFlags = getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK;
+                    if (nightModeFlags == Configuration.UI_MODE_NIGHT_YES) {
+
+                        if (WebViewFeature.isFeatureSupported(WebViewFeature.FORCE_DARK)) {
+                            WebSettingsCompat.setForceDark(myWebView.getSettings(), WebSettingsCompat.FORCE_DARK_ON);
+                        }
+                    }
                     loader.setVisibility(View.GONE);
                     textView.setVisibility(View.VISIBLE);
                     recyclerView.setVisibility(View.VISIBLE);

+ 9 - 12
app/src/main/res/layout/activity_main.xml

@@ -11,21 +11,19 @@
     android:layout_height="match_parent">
 
 
-
-
     <LinearLayout
         android:layout_width="match_parent"
         android:layout_height="match_parent"
         android:orientation="vertical">
+
         <androidx.cardview.widget.CardView
             android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            >
+            android:layout_height="wrap_content">
 
-        <include
-            layout="@layout/toolbar"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content" />
+            <include
+                layout="@layout/toolbar"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content" />
         </androidx.cardview.widget.CardView>
 
         <FrameLayout
@@ -35,7 +33,6 @@
             app:layout_behavior="@string/appbar_scrolling_view_behavior" />
 
 
-
     </LinearLayout>
 
     <com.google.android.material.navigation.NavigationView
@@ -43,9 +40,9 @@
         android:layout_width="wrap_content"
         android:layout_height="match_parent"
         android:layout_gravity="start"
-        android:background="@android:color/white"
-        app:menu="@menu/drawer_view"
-        app:headerLayout="@layout/nav_header"/>
+        android:background="@color/backgroundColor"
+        app:headerLayout="@layout/nav_header"
+        app:menu="@menu/drawer_view" />
 
 
 </androidx.drawerlayout.widget.DrawerLayout>

+ 2 - 1
app/src/main/res/layout/activity_splash.xml

@@ -4,6 +4,7 @@
     xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
+    android:background="@color/backgroundColor"
     tools:context=".activities.SplashActivity">
 
     <LinearLayout
@@ -22,7 +23,7 @@
             android:fontFamily="@font/unifrakturcook"
             android:gravity="center"
             android:text="P"
-            android:textColor="@color/black"
+            android:textColor="@color/textColor"
             android:textSize="128sp"
             android:textStyle="bold" />
 

+ 54 - 55
app/src/main/res/layout/comment_item.xml

@@ -14,84 +14,83 @@
         android:orientation="horizontal">
 
         <ImageView
-            android:layout_marginTop="5dp"
-            android:layout_marginStart="5dp"
+            android:id="@+id/commenterImage"
             android:layout_width="40dp"
             android:layout_height="40dp"
-            android:id="@+id/commenterImage"
-            android:src="@color/shimmer_placeholder"
-            />
-
-
-
-    <RelativeLayout
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        >
+            android:layout_marginStart="5dp"
+            android:layout_marginTop="5dp"
+            android:src="@color/shimmer_placeholder" />
 
 
-        <LinearLayout
+        <RelativeLayout
             android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:gravity="center_vertical"
-            android:orientation="vertical"
-            >
+            android:layout_height="wrap_content">
+
 
             <LinearLayout
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:orientation="horizontal">
+                android:gravity="center_vertical"
+                android:orientation="vertical">
 
-                <TextView
-                    android:id="@+id/author"
-                    android:layout_width="wrap_content"
+                <LinearLayout
+                    android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="5dp"
-                    android:gravity="left"
-                    android:text="Commenter"
-                    android:textColor="@color/black"
-                    android:textSize="16sp"
-                    android:textStyle="bold" />
-
-                <TextView
-                    android:layout_width="wrap_content"
+                    android:orientation="horizontal">
+
+                    <TextView
+                        android:id="@+id/author"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginStart="5dp"
+                        android:gravity="left"
+                        android:text="Commenter"
+                        android:textColor="@color/textColor"
+                        android:textSize="16sp"
+                        android:textStyle="bold" />
+
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:gravity="right"
+                        android:padding="5dp"
+                        android:text="says:"
+                        android:textColor="@color/textColor"
+                        android:textSize="15sp" />
+
+
+                </LinearLayout>
+
+                <LinearLayout
+                    android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:gravity="right"
-                    android:padding="5dp"
-                    android:text="says:"
-                    android:textSize="15sp" />
+                    android:orientation="horizontal">
 
 
-            </LinearLayout>
-
-            <LinearLayout
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:orientation="horizontal">
+                    <TextView
+                        android:id="@+id/commentTime"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:gravity="right"
+                        android:padding="5dp"
+                        android:text="Time"
+                        android:textColor="@color/textColor"
+                        android:textSize="15sp" />
 
+                </LinearLayout>
 
                 <TextView
-                    android:id="@+id/commentTime"
+                    android:id="@+id/comment"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:gravity="right"
-                    android:padding="5dp"
-                    android:text="Time"
-                    android:textSize="15sp" />
+                    android:layout_marginStart="5dp"
+                    android:layout_marginBottom="10dp"
+                    android:textColor="@color/textColor" />
 
             </LinearLayout>
 
-            <TextView
-                android:id="@+id/comment"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_marginBottom="10dp"
-                android:layout_marginStart="5dp"/>
-
-        </LinearLayout>
-
 
-    </RelativeLayout>
+        </RelativeLayout>
     </LinearLayout>
 
 </androidx.cardview.widget.CardView>

+ 14 - 14
app/src/main/res/layout/fragment_author_post.xml

@@ -5,26 +5,26 @@
     android:layout_height="match_parent"
     tools:context=".fragments.AuthorPostFragment">
 
-        <RelativeLayout
+    <RelativeLayout
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:background="@color/backgroundColor">
+
+        <androidx.swiperefreshlayout.widget.SwipeRefreshLayout
+            android:id="@+id/swiperefreshauthor"
             android:layout_width="match_parent"
-            android:layout_height="match_parent"
-            android:background="@color/purple_200">
+            android:layout_height="match_parent">
+
 
-            <androidx.swiperefreshlayout.widget.SwipeRefreshLayout
-                android:id="@+id/swiperefreshauthor"
+            <androidx.recyclerview.widget.RecyclerView
+                android:id="@+id/recycler_view_author"
                 android:layout_width="match_parent"
                 android:layout_height="match_parent">
 
+            </androidx.recyclerview.widget.RecyclerView>
+        </androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
 
-                <androidx.recyclerview.widget.RecyclerView
-                    android:id="@+id/recycler_view_author"
-                    android:layout_width="match_parent"
-                    android:layout_height="match_parent">
-
-                </androidx.recyclerview.widget.RecyclerView>
-            </androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
-
-        </RelativeLayout>
+    </RelativeLayout>
 
 
 </FrameLayout>

+ 37 - 5
app/src/main/res/layout/fragment_linux.xml

@@ -1,20 +1,51 @@
 <?xml version="1.0" encoding="utf-8"?>
 <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
     xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     tools:context=".fragments.LinuxFragment">
 
 
-    <RelativeLayout
+    <androidx.swiperefreshlayout.widget.SwipeRefreshLayout
+        android:id="@+id/swiperefresh"
         android:layout_width="match_parent"
         android:layout_height="match_parent">
 
-        <androidx.swiperefreshlayout.widget.SwipeRefreshLayout
-            android:id="@+id/swiperefresh"
+        <RelativeLayout
             android:layout_width="match_parent"
             android:layout_height="match_parent">
 
+            <com.facebook.shimmer.ShimmerFrameLayout
+                android:id="@+id/shimmer_view_container"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                app:shimmer_auto_start="false">
+
+                <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:orientation="vertical">
+
+                    <include layout="@layout/shimmer_placeholder_layout" />
+
+                    <include layout="@layout/shimmer_placeholder_layout" />
+
+                    <include layout="@layout/shimmer_placeholder_layout" />
+
+                    <include layout="@layout/shimmer_placeholder_layout" />
+
+                    <include layout="@layout/shimmer_placeholder_layout" />
+
+                    <include layout="@layout/shimmer_placeholder_layout" />
+
+                    <include layout="@layout/shimmer_placeholder_layout" />
+
+                </LinearLayout>
+
+
+            </com.facebook.shimmer.ShimmerFrameLayout>
+
 
             <androidx.recyclerview.widget.RecyclerView
                 android:id="@+id/recycler_view"
@@ -22,8 +53,9 @@
                 android:layout_height="match_parent">
 
             </androidx.recyclerview.widget.RecyclerView>
-        </androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
+        </RelativeLayout>
+
+    </androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
 
-    </RelativeLayout>
 
 </FrameLayout>

+ 1 - 1
app/src/main/res/layout/fragment_post.xml

@@ -46,7 +46,7 @@
                 android:layout_height="wrap_content"
                 android:layout_below="@+id/webview"
                 android:layout_margin="10dp"
-                android:textColor="@color/black"
+                android:textColor="@color/textColor"
                 android:textSize="25sp"
                 android:visibility="gone" />
 

+ 3 - 2
app/src/main/res/layout/nav_header.xml

@@ -4,7 +4,7 @@
 
     android:layout_height="192dp"
 
-    android:background="@color/white"
+    android:background="@color/backgroundColor"
 
     android:gravity="bottom"
 
@@ -23,9 +23,10 @@
 
         android:fontFamily="@font/unifrakturcook"
         android:text="The Penguins Club"
+
         android:textAppearance="@style/TextAppearance.AppCompat.Body1"
 
-        android:textColor="@android:color/black"
+        android:textColor="@color/textColor"
 
         android:textSize="30sp" />
 

+ 2 - 1
app/src/main/res/layout/notification.xml

@@ -30,7 +30,7 @@
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:text="Title"
-            android:textColor="#000"
+            android:textColor="@color/textColor"
             android:textStyle="bold" />
 
         <TextView
@@ -38,6 +38,7 @@
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:text="Message"
+            android:textColor="@color/textColor"
             android:textSize="15sp" />
 
     </LinearLayout>

+ 5 - 1
app/src/main/res/layout/post_item.xml

@@ -36,6 +36,7 @@
                 android:layout_marginBottom="5dp"
                 android:gravity="left"
                 android:padding="5dp"
+                android:textColor="@color/textColor"
                 android:textSize="20sp"
                 android:textStyle="bold" />
 
@@ -50,6 +51,7 @@
                     android:layout_marginStart="5dp"
                     android:gravity="left"
                     android:text="Author:"
+                    android:textColor="@color/textColor"
                     android:textSize="16sp"
                     android:textStyle="bold" />
 
@@ -60,6 +62,7 @@
                     android:gravity="right"
                     android:padding="5dp"
                     android:text="Name"
+                    android:textColor="@color/textColor"
                     android:textSize="15sp" />
 
             </LinearLayout>
@@ -72,7 +75,8 @@
                 android:gravity="left"
                 android:lineSpacingExtra="2dp"
                 android:maxLines="5"
-                android:padding="5dp" />
+                android:padding="5dp"
+                android:textColor="@color/textColor" />
 
         </LinearLayout>
 

+ 2 - 3
app/src/main/res/layout/toolbar.xml

@@ -10,7 +10,7 @@
 
     android:layout_height="wrap_content"
 
-    android:background="@color/white"
+    android:background="@color/backgroundColor"
 
     android:fitsSystemWindows="true"
 
@@ -20,7 +20,6 @@
     app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
 
 
-
     <TextView
         android:id="@+id/toolbar_title"
         android:layout_width="wrap_content"
@@ -28,7 +27,7 @@
         android:layout_gravity="center"
         android:fontFamily="@font/unifrakturcook"
         android:text="The Penguins Club"
-        android:textColor="@color/black"
+        android:textColor="@color/textColor"
         android:textSize="25sp" />
 
 </androidx.appcompat.widget.Toolbar>

+ 19 - 0
app/src/main/res/values-night-v29/themes.xml

@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources xmlns:tools="http://schemas.android.com/tools">
+
+    <style name="Theme.PenguinsRead" parent="Theme.MaterialComponents.DayNight.NoActionBar">
+        <!-- Primary brand color. -->
+        <item name="colorPrimary">#ff00ff</item>
+        <item name="colorPrimaryVariant">@color/black</item>
+        <item name="colorOnPrimary">@color/black</item>
+        <!-- Secondary brand color. -->
+        <item name="colorSecondary">@color/white</item>
+        <item name="colorSecondaryVariant">@color/white</item>
+        <item name="colorOnSecondary">@color/colorPrimary</item>
+        <!-- Status bar color. -->
+        <item name="android:statusBarColor" tools:targetApi="l">@color/white</item>
+        <item name="drawerArrowStyle">@style/DrawerIconNight</item>
+        <item name="android:forceDarkAllowed">false</item>
+        <!-- Customize your theme here. -->
+    </style>
+</resources>

+ 13 - 0
app/src/main/res/values-night/colors.xml

@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+    <color name="colorPrimary">#3F51B5</color>
+    <color name="colorPrimaryDark">#303F9F</color>
+    <color name="colorAccent">#F77000</color>
+    <color name="daynight_textcolor">#FF8222</color>
+    <color name="switchColor">#F77000</color>
+    <color name="backgroundColor">#000000</color>
+    <color name="textColor">#FFFFFF</color>
+    <color name="shimmer_placeholder">#dddddd</color>
+    <color name="black">#FF000000</color>
+    <color name="white">#FFFFFFFF</color>
+</resources>

+ 27 - 0
app/src/main/res/values-night/styles.xml

@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+    <!-- Base application theme. values-night.xml -->
+    <style name="AppTheme" parent="Theme.MaterialComponents.DayNight.NoActionBar">
+        <!-- Customize your theme here. -->
+        <item name="colorPrimary">@color/white</item>
+        <item name="colorPrimaryDark">@color/white</item>
+        <item name="colorAccent">@color/colorAccent</item>
+        <item name="android:textColorPrimary">@color/textColor</item>
+        <item name="colorControlNormal">@color/white</item>
+    </style>
+
+    <style name="MyDialog" parent="Theme.AppCompat.DayNight.Dialog.Alert" />
+
+    <style name="MySwitch">
+        <item name="colorControlActivated">@color/switchColor</item>
+    </style>
+
+    <style name="DrawerArrowStyle" parent="@style/Widget.AppCompat.DrawerArrowToggle">
+        <item name="spinBars">true</item>
+        <item name="color">@android:color/white</item>
+    </style>
+
+    <style name="DrawerIconNight" parent="Widget.AppCompat.DrawerArrowToggle">
+        <item name="color">@color/white</item>
+    </style>
+</resources>

+ 9 - 8
app/src/main/res/values-night/themes.xml

@@ -1,17 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
 <resources xmlns:tools="http://schemas.android.com/tools">
-    <!-- Base application theme. -->
+
     <style name="Theme.PenguinsRead" parent="Theme.MaterialComponents.DayNight.NoActionBar">
         <!-- Primary brand color. -->
-        <item name="colorPrimary">@color/purple_500</item>
-        <item name="colorPrimaryVariant">@color/purple_700</item>
+        <item name="colorPrimary">#ff00ff</item>
+        <item name="colorPrimaryVariant">@color/black</item>
         <item name="colorOnPrimary">@color/black</item>
         <!-- Secondary brand color. -->
-        <item name="colorSecondary">@color/teal_200</item>
-        <item name="colorSecondaryVariant">@color/teal_700</item>
-        <item name="colorOnSecondary">@color/black</item>
-        <item name="drawerArrowStyle">@style/DrawerIconDay</item>
+        <item name="colorSecondary">@color/white</item>
+        <item name="colorSecondaryVariant">@color/white</item>
+        <item name="colorOnSecondary">@color/colorPrimary</item>
         <!-- Status bar color. -->
-        <item name="android:statusBarColor" tools:targetApi="l">@color/black</item>
+        <item name="android:statusBarColor" tools:targetApi="l">@color/white</item>
+        <item name="drawerArrowStyle">@style/DrawerIconNight</item>
         <!-- Customize your theme here. -->
     </style>
 </resources>

+ 20 - 0
app/src/main/res/values-v29/themes.xml

@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources xmlns:tools="http://schemas.android.com/tools">
+
+    <style name="Theme.PenguinsRead" parent="Theme.MaterialComponents.DayNight.NoActionBar">
+        <!-- Primary brand color. -->
+        <item name="colorPrimary">#ff00ff</item>
+        <item name="colorPrimaryVariant">@color/black</item>
+        <item name="colorOnPrimary">@color/black</item>
+        <!-- Secondary brand color. -->
+        <item name="colorSecondary">@color/white</item>
+        <item name="colorSecondaryVariant">@color/white</item>
+        <item name="colorOnSecondary">@color/colorPrimary</item>
+        <!-- Status bar color. -->
+        <item name="android:statusBarColor" tools:targetApi="l">@color/white</item>
+        <item name="android:forceDarkAllowed">false</item>
+        <item name="drawerArrowStyle">@style/DrawerIconDay</item>
+
+        <!-- Customize your theme here. -->
+    </style>
+</resources>

+ 9 - 8
app/src/main/res/values/colors.xml

@@ -1,13 +1,14 @@
 <?xml version="1.0" encoding="utf-8"?>
 <resources>
-    <color name="purple_200">#FFBB86FC</color>
-    <color name="purple_500">#FF6200EE</color>
-    <color name="purple_700">#FF3700B3</color>
-    <color name="teal_200">#FF03DAC5</color>
-    <color name="teal_700">#FF018786</color>
+    <color name="colorPrimary">#3F51B5</color>
+    <color name="colorPrimaryDark">#303F9F</color>
+    <color name="colorAccent">#FF4081</color>
+    <color name="daynight_textcolor">#0044cc</color>
+    <color name="switchColor">#911DEE</color>
+    <color name="shimmer_placeholder">#dddddd</color>
+    <color name="backgroundColor">#FCFCFC</color>
+    <color name="textColor">#000000</color>
     <color name="black">#FF000000</color>
     <color name="white">#FFFFFFFF</color>
-    <color name="preloadColor">#B9B5BD</color>
-    <color name="shimmer_placeholder">#dddddd</color>
-    <color name="colorPrimaryDark">#000000</color>
+
 </resources>

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

@@ -1,13 +1,25 @@
 <?xml version="1.0" encoding="utf-8"?>
 <resources>
-    <style name="BaseTheme" parent="Theme.AppCompat.Light.NoActionBar">
-        <item name="colorControlNormal">@color/black</item>
+
+    <!-- Base application theme. -->
+    <style name="AppTheme" parent="Theme.MaterialComponents.DayNight.NoActionBar">
+        <!-- Customize your theme here. -->
+        <item name="colorPrimary">@color/colorPrimary</item>
+        <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
+        <item name="colorAccent">@color/colorAccent</item>
+        <item name="android:textColorPrimary">@color/textColor</item>
+        <item name="drawerArrowStyle">@style/DrawerArrowStyle</item>
+    </style>
+
+    <style name="MyDialog" parent="Theme.AppCompat.Light.Dialog.Alert" />
+
+    <style name="MySwitch">
+        <item name="colorControlActivated">@color/switchColor</item>
     </style>
 
     <style name="DrawerIconDay" parent="Widget.AppCompat.DrawerArrowToggle">
         <item name="color">@color/black</item>
     </style>
-    <style name="DrawerIconNight" parent="Widget.AppCompat.DrawerArrowToggle">
-        <item name="color">@color/white</item>
-    </style>
+
+
 </resources>

+ 9 - 8
app/src/main/res/values/themes.xml

@@ -1,17 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
 <resources xmlns:tools="http://schemas.android.com/tools">
     <!-- Base application theme. -->
     <style name="Theme.PenguinsRead" parent="Theme.MaterialComponents.DayNight.NoActionBar">
         <!-- Primary brand color. -->
-        <item name="colorPrimary">@color/purple_500</item>
-        <item name="colorPrimaryVariant">@color/purple_700</item>
-        <item name="colorOnPrimary">@color/white</item>
+        <item name="colorPrimary">#ff00ff</item>
+        <item name="colorPrimaryVariant">@color/black</item>
+        <item name="colorOnPrimary">@color/black</item>
         <!-- Secondary brand color. -->
-        <item name="colorSecondary">@color/teal_200</item>
-        <item name="colorSecondaryVariant">@color/teal_700</item>
-        <item name="colorOnSecondary">@color/black</item>
-        <item name="drawerArrowStyle">@style/DrawerIconDay</item>
+        <item name="colorSecondary">@color/white</item>
+        <item name="colorSecondaryVariant">@color/white</item>
+        <item name="colorOnSecondary">@color/colorPrimary</item>
         <!-- Status bar color. -->
-        <item name="android:statusBarColor" tools:targetApi="l">@color/black</item>
+        <item name="android:statusBarColor" tools:targetApi="l">@color/white</item>
+        <item name="drawerArrowStyle">@style/DrawerIconDay</item>
         <!-- Customize your theme here. -->
     </style>
 </resources>