Skip to content

Commit

Permalink
PP-389: New material theme (#241)
Browse files Browse the repository at this point in the history
* Initial theme replacement

This switches the app to using the new Palace theme.

Affects: https://ebce-lyrasis.atlassian.net/browse/PP-389

* Use new progress bar themes.

* Switch the PDF reader to using the Palace toolbar/theme

Affects: https://ebce-lyrasis.atlassian.net/browse/PP-530

* Use new tabbed button code.

* Update to latest audiobook snapshot.

* Update changelog.
  • Loading branch information
io7m authored Oct 23, 2023
1 parent a88ad63 commit 3f1ae64
Show file tree
Hide file tree
Showing 102 changed files with 407 additions and 1,618 deletions.
5 changes: 3 additions & 2 deletions README-CHANGES.xml
Original file line number Diff line number Diff line change
Expand Up @@ -337,9 +337,10 @@
<c:change date="2023-10-16T00:00:00+00:00" summary="Fixed crash when creating a library card."/>
</c:changes>
</c:release>
<c:release date="2023-10-19T11:00:16+00:00" is-open="true" ticket-system="org.nypl.jira" version="1.7.0">
<c:release date="2023-10-23T11:18:45+00:00" is-open="true" ticket-system="org.nypl.jira" version="1.7.0">
<c:changes>
<c:change date="2023-10-19T11:00:16+00:00" summary="Adjusted feed tabs navigation to keep the Catalog on the top of the screen."/>
<c:change date="2023-10-19T00:00:00+00:00" summary="Adjusted feed tabs navigation to keep the Catalog on the top of the screen."/>
<c:change date="2023-10-23T11:18:45+00:00" summary="Use a new Material 3 theme."/>
</c:changes>
</c:release>
</c:releases>
Expand Down
2 changes: 1 addition & 1 deletion org.thepalaceproject.android.platform
1 change: 0 additions & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,6 @@ include(":simplified-ui-errorpage")
include(":simplified-ui-images")
include(":simplified-ui-listeners-api")
include(":simplified-ui-navigation-tabs")
include(":simplified-ui-neutrality")
include(":simplified-ui-onboarding")
include(":simplified-ui-screen")
include(":simplified-ui-settings")
Expand Down
2 changes: 1 addition & 1 deletion simplified-app-palace/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,6 @@ dependencies {
implementation(project(":simplified-ui-images"))
implementation(project(":simplified-ui-listeners-api"))
implementation(project(":simplified-ui-navigation-tabs"))
implementation(project(":simplified-ui-neutrality"))
implementation(project(":simplified-ui-onboarding"))
implementation(project(":simplified-ui-screen"))
implementation(project(":simplified-ui-settings"))
Expand Down Expand Up @@ -562,6 +561,7 @@ dependencies {
implementation(libs.palace.readium2.ui.thread)
implementation(libs.palace.readium2.vanilla)
implementation(libs.palace.readium2.views)
implementation(libs.palace.theme)
implementation(libs.pandora.bottom.navigator)
implementation(libs.pdfium.android)
implementation(libs.picasso)
Expand Down
8 changes: 4 additions & 4 deletions simplified-app-palace/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
android:contentDescription="@string/app_name"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/PalaceTheme.NoActionBar"
android:theme="@style/PalaceTheme.WithoutActionBar"
android:usesCleartextTraffic="true"
tools:replace="android:allowBackup">

Expand Down Expand Up @@ -70,15 +70,15 @@
android:exported="false"
android:parentActivityName="org.librarysimplified.main.MainActivity"
android:screenOrientation="portrait"
android:theme="@style/PalaceTheme.NoActionBar" />
android:theme="@style/PalaceTheme.WithoutActionBar" />

<activity
android:name="org.librarysimplified.viewer.epub.readium2.Reader2Activity"
android:configChanges="orientation|keyboardHidden"
android:exported="false"
android:parentActivityName="org.librarysimplified.main.MainActivity"
android:screenOrientation="portrait"
android:theme="@style/PalaceTheme.NoActionBar" />
android:theme="@style/PalaceTheme.WithoutActionBar" />

<activity
android:name="org.librarysimplified.viewer.pdf.pdfjs.PdfReaderActivity"
Expand All @@ -94,7 +94,7 @@
android:label="@string/app_name"
android:parentActivityName="org.librarysimplified.main.MainActivity"
android:screenOrientation="portrait"
android:theme="@style/PalaceTheme.NoActionBar" />
android:theme="@style/PalaceTheme.WithoutActionBar" />

</application>

Expand Down

This file was deleted.

23 changes: 0 additions & 23 deletions simplified-app-palace/src/main/res/drawable/splash_animated.xml

This file was deleted.

10 changes: 0 additions & 10 deletions simplified-app-palace/src/main/res/values-v31/themes.xml

This file was deleted.

5 changes: 0 additions & 5 deletions simplified-app-palace/src/main/res/values/themes.xml

This file was deleted.

30 changes: 15 additions & 15 deletions simplified-main/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ dependencies {
implementation(project(":simplified-ui-images"))
implementation(project(":simplified-ui-listeners-api"))
implementation(project(":simplified-ui-navigation-tabs"))
implementation(project(":simplified-ui-neutrality"))
implementation(project(":simplified-ui-onboarding"))
implementation(project(":simplified-ui-screen"))
implementation(project(":simplified-ui-settings"))
Expand Down Expand Up @@ -117,45 +116,46 @@ dependencies {
implementation(libs.androidx.lifecycle.viewmodel.savedstate)
implementation(libs.androidx.preference)
implementation(libs.androidx.savedstate)
implementation(libs.irradia.mime.api)
implementation(libs.irradia.opds2.api)
implementation(libs.irradia.opds2.lexical)
implementation(libs.irradia.opds2.librarysimplified)
implementation(libs.irradia.opds2.parser.api)
implementation(libs.irradia.opds2.parser.extension.spi)
implementation(libs.irradia.opds2.parser.librarysimplified)
implementation(libs.irradia.opds2.parser.vanilla)
implementation(libs.joda.time)
implementation(libs.kotlin.reflect)
implementation(libs.kotlin.stdlib)
implementation(libs.slf4j)
implementation(libs.firebase.dynamic.links)
implementation(libs.firebase.dynamic.links.ktx)
implementation(libs.firebase.messaging)
implementation(libs.firebase.messaging.ktx)
implementation(libs.google.failureaccess)
implementation(libs.google.guava)
implementation(libs.google.material)
implementation(libs.play.services.basement)
implementation(libs.play.services.tasks)
implementation(libs.io7m.jnull)
implementation(libs.irradia.mime.api)
implementation(libs.irradia.mime.api)
implementation(libs.irradia.opds2.api)
implementation(libs.irradia.opds2.lexical)
implementation(libs.irradia.opds2.librarysimplified)
implementation(libs.irradia.opds2.parser.api)
implementation(libs.irradia.opds2.parser.extension.spi)
implementation(libs.irradia.opds2.parser.librarysimplified)
implementation(libs.irradia.opds2.parser.vanilla)
implementation(libs.jackson.core)
implementation(libs.jackson.databind)
implementation(libs.joda.time)
implementation(libs.joda.time)
implementation(libs.kotlin.reflect)
implementation(libs.kotlin.stdlib)
implementation(libs.kotlin.stdlib)
implementation(libs.logback.android)
implementation(libs.palace.audiobook.feedbooks)
implementation(libs.palace.drm.core)
implementation(libs.palace.http.api)
implementation(libs.palace.http.bearer.token)
implementation(libs.palace.http.vanilla)
implementation(libs.palace.theme)
implementation(libs.pandora.bottom.navigator)
implementation(libs.picasso)
implementation(libs.play.services.basement)
implementation(libs.play.services.tasks)
implementation(libs.r2.lcp)
implementation(libs.rxandroid2)
implementation(libs.rxjava2)
implementation(libs.rxjava2.extensions)
implementation(libs.slf4j)
implementation(libs.slf4j)
implementation(libs.transifex.sdk)
}
12 changes: 5 additions & 7 deletions simplified-main/src/main/res/layout/main_host.xml
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">

<org.nypl.simplified.ui.neutrality.NeutralToolbar
<org.thepalaceproject.theme.core.PalaceToolbar
android:id="@+id/mainToolbar"
android:theme="?android:attr/actionBarTheme"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize" />
android:layout_height="@dimen/PalaceToolbarHeight" />

<FrameLayout
android:id="@+id/mainFragmentHolder"
Expand Down
14 changes: 7 additions & 7 deletions simplified-tests/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ val dependencyObjects = listOf(
project(":simplified-ui-images"),
project(":simplified-ui-listeners-api"),
project(":simplified-ui-navigation-tabs"),
project(":simplified-ui-neutrality"),
project(":simplified-ui-onboarding"),
project(":simplified-ui-screen"),
project(":simplified-ui-settings"),
Expand Down Expand Up @@ -167,12 +166,6 @@ val dependencyObjects = listOf(
libs.google.failureaccess,
libs.google.guava,
libs.google.material,
libs.play.services.base,
libs.play.services.basement,
libs.play.services.cloud.messaging,
libs.play.services.location,
libs.play.services.measurement.api,
libs.play.services.tasks,
libs.hamcrest,
libs.io7m.jfunctional,
libs.io7m.jnull,
Expand Down Expand Up @@ -253,8 +246,15 @@ val dependencyObjects = listOf(
libs.palace.readium2.api,
libs.palace.readium2.vanilla,
libs.palace.readium2.views,
libs.palace.theme,
libs.pandora.bottom.navigator,
libs.picasso,
libs.play.services.base,
libs.play.services.basement,
libs.play.services.cloud.messaging,
libs.play.services.location,
libs.play.services.measurement.api,
libs.play.services.tasks,
libs.r2.lcp,
libs.r2.opds,
libs.r2.shared,
Expand Down
21 changes: 16 additions & 5 deletions simplified-ui-accounts/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,29 @@ dependencies {
implementation(project(":simplified-ui-errorpage"))
implementation(project(":simplified-ui-images"))
implementation(project(":simplified-ui-listeners-api"))
implementation(project(":simplified-ui-neutrality"))
implementation(project(":simplified-webview"))

implementation(libs.androidx.activity)
implementation(libs.androidx.annotation)
implementation(libs.androidx.appcompat)
implementation(libs.androidx.appcompat.resources)
implementation(libs.androidx.cardview)
implementation(libs.androidx.collection)
implementation(libs.androidx.constraintlayout)
implementation(libs.androidx.constraintlayout.core)
implementation(libs.androidx.coordinatorlayout)
implementation(libs.androidx.core)
implementation(libs.androidx.core.ktx)
implementation(libs.androidx.customview.poolingcontainer)
implementation(libs.androidx.drawerlayout)
implementation(libs.androidx.emoji2)
implementation(libs.androidx.emoji2.views)
implementation(libs.androidx.emoji2.views.helper)
implementation(libs.androidx.fragment)
implementation(libs.androidx.fragment.ktx)
implementation(libs.androidx.lifecycle.extensions)
implementation(libs.androidx.interpolator)
implementation(libs.androidx.lifecycle.common)
implementation(libs.androidx.lifecycle.extensions)
implementation(libs.androidx.lifecycle.livedata)
implementation(libs.androidx.lifecycle.livedata.core)
implementation(libs.androidx.lifecycle.livedata.core.ktx)
Expand All @@ -44,17 +51,21 @@ dependencies {
implementation(libs.androidx.preference)
implementation(libs.androidx.recycler.view)
implementation(libs.androidx.savedstate)
implementation(libs.androidx.transition)
implementation(libs.androidx.vectordrawable)
implementation(libs.androidx.vectordrawable.animated)
implementation(libs.google.failureaccess)
implementation(libs.google.guava)
implementation(libs.google.material)
implementation(libs.play.services.base)
implementation(libs.play.services.location)
implementation(libs.play.services.tasks)
implementation(libs.io7m.junreachable)
implementation(libs.joda.time)
implementation(libs.kotlin.reflect)
implementation(libs.kotlin.stdlib)
implementation(libs.palace.theme)
implementation(libs.picasso)
implementation(libs.play.services.base)
implementation(libs.play.services.location)
implementation(libs.play.services.tasks)
implementation(libs.rxandroid2)
implementation(libs.rxjava2)
implementation(libs.rxjava2.extensions)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import androidx.fragment.app.Fragment
import org.nypl.simplified.android.ktx.supportActionBar
import org.nypl.simplified.listeners.api.FragmentListenerType
import org.nypl.simplified.listeners.api.fragmentListeners
import org.nypl.simplified.ui.neutrality.NeutralToolbar
import org.nypl.simplified.webview.WebViewUtilities
import org.librarysimplified.ui.accounts.R
import org.thepalaceproject.theme.core.PalaceToolbar

/**
* A fragment that shows a WebView
Expand All @@ -23,7 +23,7 @@ class AccountCardCreatorFragment : Fragment(R.layout.fragment_account_card_creat

private val listener: FragmentListenerType<AccountDetailEvent> by fragmentListeners()

private lateinit var toolbar: NeutralToolbar
private lateinit var toolbar: PalaceToolbar
private lateinit var webView: WebView

companion object {
Expand All @@ -46,7 +46,7 @@ class AccountCardCreatorFragment : Fragment(R.layout.fragment_account_card_creat
super.onViewCreated(view, savedInstanceState)

this.toolbar =
view.findViewById(R.id.toolbar)
view.findViewWithTag(PalaceToolbar.palaceToolbarName)
this.webView =
view.findViewById(R.id.web_view)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ import org.nypl.simplified.ui.accounts.AccountLoginButtonStatus.AsLogoutButtonDi
import org.nypl.simplified.ui.accounts.AccountLoginButtonStatus.AsLogoutButtonEnabled
import org.nypl.simplified.ui.images.ImageAccountIcons
import org.nypl.simplified.ui.images.ImageLoaderType
import org.nypl.simplified.ui.neutrality.NeutralToolbar
import org.slf4j.LoggerFactory
import java.net.URI
import org.librarysimplified.ui.accounts.R
import org.thepalaceproject.theme.core.PalaceToolbar

/**
* A fragment that shows settings for a single account.
Expand Down Expand Up @@ -141,7 +141,7 @@ class AccountDetailFragment : Fragment(R.layout.account) {
private lateinit var settingsCardCreator: ConstraintLayout
private lateinit var signUpButton: Button
private lateinit var signUpLabel: TextView
private lateinit var toolbar: NeutralToolbar
private lateinit var toolbar: PalaceToolbar

private val imageButtonLoadingTag = "IMAGE_BUTTON_LOADING"
private val nyplCardCreatorScheme = "nypl.card-creator"
Expand Down Expand Up @@ -174,7 +174,7 @@ class AccountDetailFragment : Fragment(R.layout.account) {
this.accountIcon =
view.findViewById(R.id.accountCellIcon)
this.toolbar =
view.rootView.findViewWithTag(NeutralToolbar.neutralToolbarName)
view.rootView.findViewWithTag(PalaceToolbar.palaceToolbarName)

this.authentication =
view.findViewById(R.id.auth)
Expand Down
Loading

0 comments on commit 3f1ae64

Please sign in to comment.