summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorByteHamster <info@bytehamster.com>2021-02-12 21:00:39 +0100
committerByteHamster <info@bytehamster.com>2021-02-12 21:00:39 +0100
commit010ed376cd4b8935736dec6a3be052f93ed18b20 (patch)
tree3c34bd6af92ba87a794e2f4eb1e6a5b15a8a8ee2 /core
parent87b149b7647d61f52a57f67a2519e248bf1e7880 (diff)
downloadAntennaPod-010ed376cd4b8935736dec6a3be052f93ed18b20.zip
Move basic views to new module
Diffstat (limited to 'core')
-rw-r--r--core/build.gradle1
-rw-r--r--core/src/main/java/de/danoeh/antennapod/core/util/ThemeUtils.java25
-rw-r--r--core/src/main/java/de/danoeh/antennapod/core/util/playback/PlaybackController.java2
-rw-r--r--core/src/main/res/values/attrs.xml8
4 files changed, 2 insertions, 34 deletions
diff --git a/core/build.gradle b/core/build.gradle
index 1b1eb0a2f..29cef1cef 100644
--- a/core/build.gradle
+++ b/core/build.gradle
@@ -72,6 +72,7 @@ android {
dependencies {
implementation project(':ui:app-start-intent')
+ implementation project(':ui:common')
annotationProcessor "androidx.annotation:annotation:$annotationVersion"
implementation "androidx.appcompat:appcompat:$appcompatVersion"
diff --git a/core/src/main/java/de/danoeh/antennapod/core/util/ThemeUtils.java b/core/src/main/java/de/danoeh/antennapod/core/util/ThemeUtils.java
deleted file mode 100644
index 44b31f0be..000000000
--- a/core/src/main/java/de/danoeh/antennapod/core/util/ThemeUtils.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package de.danoeh.antennapod.core.util;
-
-import android.content.Context;
-import androidx.annotation.AttrRes;
-import androidx.annotation.ColorInt;
-import android.util.TypedValue;
-import androidx.annotation.DrawableRes;
-
-public class ThemeUtils {
- private ThemeUtils() {
-
- }
-
- public static @ColorInt int getColorFromAttr(Context context, @AttrRes int attr) {
- TypedValue typedValue = new TypedValue();
- context.getTheme().resolveAttribute(attr, typedValue, true);
- return typedValue.data;
- }
-
- public static @DrawableRes int getDrawableFromAttr(Context context, @AttrRes int attr) {
- TypedValue typedValue = new TypedValue();
- context.getTheme().resolveAttribute(attr, typedValue, true);
- return typedValue.resourceId;
- }
-}
diff --git a/core/src/main/java/de/danoeh/antennapod/core/util/playback/PlaybackController.java b/core/src/main/java/de/danoeh/antennapod/core/util/playback/PlaybackController.java
index e1b4c967c..ae8d1a45e 100644
--- a/core/src/main/java/de/danoeh/antennapod/core/util/playback/PlaybackController.java
+++ b/core/src/main/java/de/danoeh/antennapod/core/util/playback/PlaybackController.java
@@ -32,8 +32,8 @@ import de.danoeh.antennapod.core.service.playback.PlaybackServiceMediaPlayer;
import de.danoeh.antennapod.core.service.playback.PlayerStatus;
import de.danoeh.antennapod.core.storage.DBTasks;
import de.danoeh.antennapod.core.util.Optional;
-import de.danoeh.antennapod.core.util.ThemeUtils;
import de.danoeh.antennapod.core.util.playback.Playable.PlayableUtils;
+import de.danoeh.antennapod.ui.common.ThemeUtils;
import io.reactivex.Maybe;
import io.reactivex.MaybeOnSubscribe;
import io.reactivex.Observable;
diff --git a/core/src/main/res/values/attrs.xml b/core/src/main/res/values/attrs.xml
index cceacf99e..91ecae93d 100644
--- a/core/src/main/res/values/attrs.xml
+++ b/core/src/main/res/values/attrs.xml
@@ -64,12 +64,4 @@
<attr name="ic_notifications" format="reference"/>
<attr name="seek_background" format="color" />
<attr name="ic_share" format="reference"/>
-
- <declare-styleable name="SquareImageView">
- <attr name="direction" format="enum">
- <enum name="width" value="0"/>
- <enum name="height" value="1"/>
- <enum name="minimum" value="2"/>
- </attr>
- </declare-styleable>
</resources>