From 4dd2cd4335f5c7ff40453f06c758f0f9e5a0558d Mon Sep 17 00:00:00 2001 From: Ashutosh Gangwar Date: Fri, 7 May 2021 15:32:57 +0530 Subject: [PATCH] add styling attributes, conventionally handle day-night modes --- .../sakout/aboutpage/sample/MainActivity.java | 1 - app/src/main/res/values/styles.xml | 2 +- .../mehdi/sakout/aboutpage/AboutPage.java | 99 ++++++------------- .../sakout/aboutpage/AboutPageUtils.java | 52 +++++++--- library/src/main/res/layout/about_page.xml | 1 + library/src/main/res/values-night/styles.xml | 4 + library/src/main/res/values/attrs.xml | 10 ++ library/src/main/res/values/colors.xml | 1 + library/src/main/res/values/styles.xml | 48 +++++++-- 9 files changed, 131 insertions(+), 87 deletions(-) create mode 100644 library/src/main/res/values-night/styles.xml create mode 100644 library/src/main/res/values/attrs.xml diff --git a/app/src/main/java/mehdi/sakout/aboutpage/sample/MainActivity.java b/app/src/main/java/mehdi/sakout/aboutpage/sample/MainActivity.java index 5ed39e6..0398c46 100644 --- a/app/src/main/java/mehdi/sakout/aboutpage/sample/MainActivity.java +++ b/app/src/main/java/mehdi/sakout/aboutpage/sample/MainActivity.java @@ -20,7 +20,6 @@ protected void onCreate(Bundle savedInstanceState) { View aboutPage = new AboutPage(this) .isRTL(false) - .enableDarkMode(false) .setImage(R.drawable.dummy_image) .addItem(new Element().setTitle("Version 6.2")) .addItem(adsElement) diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index 5885930..5acce3c 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -1,7 +1,7 @@ - + + + + - + + + + + + + + \ No newline at end of file