Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing Material Design Components (Views) dependency #13

Merged
merged 1 commit into from
Apr 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ dependencies {
implementation(libs.androidx.navigation.compose)

implementation(libs.mediafile)
implementation(libs.material)

// TODO replace with own implementation
implementation(libs.liveevent)
Expand All @@ -156,4 +155,4 @@ detekt {

hilt {
enableAggregatingTask = true
}
}
5 changes: 2 additions & 3 deletions app/src/debug/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@
<activity
android:name="com.javernaut.whatthecodec.compose.playground.ComposePlaygroundActivity"
android:exported="true"
android:windowSoftInputMode="adjustResize"
android:theme="@style/Theme.WhatTheCodec.NoActionBar" />
android:windowSoftInputMode="adjustResize" />
<activity
android:name=".settings.SettingsActivity"
android:exported="true"
tools:replace="android:exported" />
</application>

</manifest>
</manifest>
5 changes: 2 additions & 3 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
android:requestLegacyExternalStorage="true"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.WhatTheCodec.NoActionBar">
android:theme="@style/Theme.WhatTheCodecM3">
<activity
android:name="com.javernaut.whatthecodec.home.ui.RootActivity"
android:exported="true"
Expand All @@ -37,8 +37,7 @@
android:exported="false"
android:label="@string/settings_title"
android:parentActivityName="com.javernaut.whatthecodec.settings.SettingsActivity"
android:theme="@style/Theme.WhatTheCodecM3"
android:windowSoftInputMode="adjustResize" />
</application>

</manifest>
</manifest>
12 changes: 0 additions & 12 deletions app/src/main/res/values-night/colors.xml

This file was deleted.

13 changes: 0 additions & 13 deletions app/src/main/res/values/colors.xml

This file was deleted.

8 changes: 0 additions & 8 deletions app/src/main/res/values/styles.xml

This file was deleted.

14 changes: 0 additions & 14 deletions app/src/main/res/values/theme_colors.xml

This file was deleted.

31 changes: 2 additions & 29 deletions app/src/main/res/values/themes.xml
Original file line number Diff line number Diff line change
@@ -1,34 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>

<style name="Theme.WhatTheCodec" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryVariant</item>
<item name="colorPrimaryVariant">@color/colorPrimaryVariant</item>
<item name="colorOnPrimary">@color/colorOnPrimary</item>

<item name="colorSecondary">@color/colorSecondary</item>

<item name="colorSurface">@color/colorSurface</item>
<item name="colorOnSurface">@color/colorOnSurface</item>

<item name="android:colorBackground">@color/colorBackground</item>

<item name="buttonBarPositiveButtonStyle">@style/Widget.WhatTheCodec.Button.Bar</item>
<item name="buttonBarNeutralButtonStyle">@style/Widget.WhatTheCodec.Button.Bar</item>
<item name="buttonBarNegativeButtonStyle">@style/Widget.WhatTheCodec.Button.Bar</item>
</style>

<style name="Theme.WhatTheCodec.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>

<style name="ThemeOverlay.WhatTheCodec.Button" parent="">
<item name="colorPrimary">@color/colorSecondary</item>
</style>

<!-- TODO Check the implications of inheriting the AppCompat theme. Are colors setup necessary? -->
<!-- TODO Inherit from system theme once AppCompat is fully removed -->
<style name="Theme.WhatTheCodecM3" parent="Theme.AppCompat.DayNight.NoActionBar" />

</resources>
</resources>
1 change: 0 additions & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ detekt = "1.23.6"

[libraries]
mediafile = "io.github.javernaut:mediafile:1.1.0"
material = "com.google.android.material:material:1.11.0"
liveevent = "com.github.hadilq.liveevent:liveevent:1.2.0"

coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinx-coroutines" }
Expand Down