Skip to content

Commit 4c541fb

Browse files
committed
Basic notice and build fixes
1 parent 265ffd1 commit 4c541fb

File tree

9 files changed

+59
-17
lines changed

9 files changed

+59
-17
lines changed

build.gradle

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ subprojects { project ->
185185
allowInsecureProtocol true
186186
}
187187
maven { url "https://jitpack.io" }
188+
maven { url "https://oss.sonatype.org/content/repositories/releases/" }
188189
jcenter()
189190
}
190191

@@ -212,6 +213,11 @@ subprojects { project ->
212213
}
213214
}
214215
}
216+
project.configurations.all {
217+
resolutionStrategy.force "com.google.android.exoplayer:exoplayer:2.13.3"
218+
resolutionStrategy.force "com.google.android.exoplayer:exoplayer-core:2.13.3"
219+
resolutionStrategy.force "com.github.kittinunf.fuel:fuel-android:2.2.3"
220+
}
215221
}
216222

217223
/**

settings.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@ include ':simplified-ui-thread-api'
9999
include ':simplified-viewer-api'
100100
include ':simplified-viewer-audiobook'
101101
include ':simplified-viewer-epub-readium2'
102-
include ':simplified-viewer-pdf'
103102
include ':simplified-viewer-spi'
104103
include ':simplified-webview'
105104
include ':simplified-metrics'

simplified-main/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ dependencies {
6868
api project(":simplified-viewer-api")
6969
api project(":simplified-viewer-audiobook")
7070
api project(":simplified-viewer-epub-readium2")
71-
api project(":simplified-viewer-pdf")
7271
api project(":simplified-viewer-spi")
7372

7473
api libs.androidx.app.compat

simplified-main/src/main/java/org/nypl/simplified/main/MainActivity.kt

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,15 @@ import android.app.ActionBar
44
import android.content.Intent
55
import android.net.Uri
66
import android.os.Bundle
7+
import android.view.ViewGroup
8+
import android.view.WindowInsets
9+
import android.widget.FrameLayout
10+
import android.widget.LinearLayout
711
import androidx.appcompat.app.AppCompatActivity
812
import androidx.appcompat.widget.Toolbar
13+
import androidx.core.view.ViewCompat
14+
import androidx.core.view.WindowInsetsCompat
15+
import androidx.core.view.updateLayoutParams
916
import androidx.fragment.app.FragmentManager
1017
import androidx.fragment.app.commit
1118
import androidx.lifecycle.ViewModelProvider
@@ -69,6 +76,18 @@ class MainActivity : AppCompatActivity(R.layout.main_host) {
6976
this.supportActionBar?.hide()
7077
}
7178
}
79+
80+
val parent = findViewById<LinearLayout>(R.id.mainRoot)
81+
ViewCompat.setOnApplyWindowInsetsListener(parent) { v, windowInsets ->
82+
v.updateLayoutParams<ViewGroup.MarginLayoutParams> {
83+
val insets = windowInsets.getInsets(WindowInsetsCompat.Type.systemBars())
84+
leftMargin = insets.left
85+
bottomMargin = insets.bottom
86+
rightMargin = insets.right
87+
topMargin = insets.top
88+
}
89+
WindowInsetsCompat.CONSUMED
90+
}
7291
}
7392

7493
override fun getDefaultViewModelProviderFactory(): ViewModelProvider.Factory {

simplified-main/src/main/res/layout/main_host.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
xmlns:app="http://schemas.android.com/apk/res-auto"
44
android:layout_width="match_parent"
55
android:layout_height="match_parent"
6+
android:id="@+id/mainRoot"
67
android:orientation="vertical">
78

89
<androidx.appcompat.widget.Toolbar

simplified-tests-sandbox/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ dependencies {
3333
implementation project(":simplified-ui-thread-api")
3434
implementation project(":simplified-viewer-api")
3535
implementation project(":simplified-viewer-audiobook")
36-
implementation project(":simplified-viewer-pdf")
3736
implementation project(':simplified-ui-navigation-tabs')
3837

3938
implementation libs.androidx.app.compat

simplified-ui-catalog/src/main/java/org/nypl/simplified/ui/catalog/CatalogFeedFragment.kt

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,14 @@ package org.nypl.simplified.ui.catalog
22

33
import android.annotation.SuppressLint
44
import android.content.Context
5+
import android.content.Intent
6+
import android.net.Uri
57
import android.os.Bundle
68
import android.text.TextUtils
7-
import android.view.Gravity
8-
import android.view.LayoutInflater
9-
import android.view.Menu
10-
import android.view.MenuInflater
11-
import android.view.MenuItem
12-
import android.view.View
9+
import android.view.*
1310
import android.view.View.TEXT_ALIGNMENT_TEXT_END
14-
import android.view.ViewGroup
1511
import android.view.inputmethod.EditorInfo
16-
import android.widget.Button
17-
import android.widget.LinearLayout
18-
import android.widget.RadioButton
19-
import android.widget.RadioGroup
20-
import android.widget.Space
12+
import android.widget.*
2113
import androidx.appcompat.app.AlertDialog
2214
import androidx.appcompat.widget.AppCompatButton
2315
import androidx.appcompat.widget.AppCompatTextView
@@ -59,6 +51,7 @@ import org.nypl.simplified.ui.catalog.withoutGroups.CatalogPagedAdapter
5951
import org.nypl.simplified.ui.screen.ScreenSizeInformationType
6052
import org.slf4j.LoggerFactory
6153

54+
6255
/**
6356
* A fragment displaying an OPDS feed.
6457
*/
@@ -144,6 +137,12 @@ class CatalogFeedFragment : Fragment(), AgeGateDialog.BirthYearSelectedListener
144137
binding = FeedBinding.inflate(inflater, container, false)
145138
binding.viewModel = viewModel
146139
binding.lifecycleOwner = viewLifecycleOwner
140+
141+
binding.eolNotice.setOnClickListener {
142+
val browserIntent = Intent(Intent.ACTION_VIEW, Uri.parse("https://nypl.org"))
143+
startActivity(browserIntent)
144+
}
145+
147146
return binding.root
148147
}
149148

simplified-ui-catalog/src/main/res/layout/feed.xml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,26 @@
1010
type="org.nypl.simplified.ui.catalog.CatalogFeedViewModel" />
1111
</data>
1212

13+
<androidx.appcompat.widget.LinearLayoutCompat
14+
android:layout_width="match_parent"
15+
android:layout_height="match_parent"
16+
android:orientation="vertical"
17+
>
18+
19+
<TextView
20+
android:id="@+id/eolNotice"
21+
android:layout_width="match_parent"
22+
android:layout_height="wrap_content"
23+
android:paddingTop="16dp"
24+
android:paddingBottom="16dp"
25+
android:paddingStart="32dp"
26+
android:paddingEnd="32dp"
27+
android:gravity="center"
28+
android:textColor="@android:color/white"
29+
android:text="SimplyE will be ending its ebook and audiobooks service on August 30th, 2025."
30+
android:background="#143661"
31+
/>
32+
1333
<FrameLayout
1434
android:layout_width="match_parent"
1535
android:layout_height="match_parent">
@@ -50,5 +70,6 @@
5070
/>
5171

5272
</FrameLayout>
73+
</androidx.appcompat.widget.LinearLayoutCompat>
5374

54-
</layout>
75+
</layout>

simplified-ui-catalog/src/main/res/layout/feed_header.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
<androidx.constraintlayout.widget.ConstraintLayout
1212
android:layout_width="match_parent"
1313
android:layout_height="wrap_content">
14-
1514
<RadioGroup
1615
android:id="@+id/feedHeaderTabs"
1716
android:layout_width="match_parent"

0 commit comments

Comments
 (0)