Skip to content

Commit d65d10c

Browse files
committed
Merge branch 'feature/bottom-drawer'
2 parents 238558f + 54f2ee9 commit d65d10c

File tree

18 files changed

+659
-212
lines changed

18 files changed

+659
-212
lines changed

README-CHANGES.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -737,6 +737,11 @@
737737
<c:ticket id="PP-2779"/>
738738
</c:tickets>
739739
</c:change>
740+
<c:change date="2025-08-13T14:21:08+00:00" summary="Implement a new and improved bottom drawer on book details pages.">
741+
<c:tickets>
742+
<c:ticket id="PP-2753"/>
743+
</c:tickets>
744+
</c:change>
740745
<c:change date="2025-08-13T19:01:43+00:00" summary="Ensure Download button is shown for borrowed books.">
741746
<c:tickets>
742747
<c:ticket id="PP-2809"/>

settings.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,7 @@ include(":simplified-tenprint")
275275
include(":simplified-tests")
276276
include(":simplified-threads")
277277
include(":simplified-ui")
278+
include(":simplified-ui-bottomsheet")
278279
include(":simplified-ui-errorpage")
279280
include(":simplified-ui-images")
280281
include(":simplified-ui-screen")

simplified-app-palace/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,7 @@ dependencies {
305305
implementation(project(":simplified-tenprint"))
306306
implementation(project(":simplified-threads"))
307307
implementation(project(":simplified-ui"))
308+
implementation(project(":simplified-ui-bottomsheet"))
308309
implementation(project(":simplified-ui-errorpage"))
309310
implementation(project(":simplified-ui-images"))
310311
implementation(project(":simplified-ui-screen"))

simplified-sandbox/build.gradle.kts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
dependencies {
22
coreLibraryDesugaring(libs.android.desugaring)
33

4+
implementation(project(":simplified-ui-bottomsheet"))
5+
46
implementation(libs.androidx.activity)
57
implementation(libs.androidx.activity.ktx)
68
implementation(libs.androidx.annotation)
@@ -72,12 +74,15 @@ dependencies {
7274
implementation(libs.androidx.transition)
7375
implementation(libs.androidx.transition.ktx)
7476
implementation(libs.androidx.vectordrawable)
77+
implementation(libs.androidx.vectordrawable.animated)
7578
implementation(libs.androidx.versionedparcelable)
76-
implementation(libs.androidx.viewbinding)
7779
implementation(libs.androidx.viewpager)
7880
implementation(libs.androidx.viewpager2)
7981
implementation(libs.androidx.webkit)
82+
8083
implementation(libs.google.material)
8184
implementation(libs.kotlin.stdlib)
85+
implementation(libs.logback.android)
8286
implementation(libs.palace.theme)
87+
implementation(libs.slf4j)
8388
}

simplified-sandbox/src/main/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
android:contentDescription="Sandbox"
1010
android:launchMode="singleTop"
1111
android:exported="true"
12-
android:theme="@style/PalaceTheme.WithActionBar"
12+
android:theme="@style/PalaceTheme.WithoutActionBar"
1313
android:label="Sandbox">
1414
<intent-filter>
1515
<action android:name="android.intent.action.MAIN" />
Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,36 @@
11
package org.librarysimplified.sandbox
22

33
import android.os.Bundle
4+
import android.view.View
45
import androidx.appcompat.app.AppCompatActivity
6+
import org.librarysimplified.ui.bottomsheet.PalaceBottomSheet
7+
import org.librarysimplified.ui.bottomsheet.PalaceBottomSheetType
58

69
class SandboxActivity : AppCompatActivity(R.layout.sandbox) {
7-
override fun onCreate(savedInstanceState: Bundle?) {
10+
private lateinit var red: View
11+
private lateinit var bottomSheet: PalaceBottomSheet
12+
13+
override fun onCreate(
14+
savedInstanceState: Bundle?
15+
) {
816
super.onCreate(savedInstanceState)
17+
18+
this.bottomSheet =
19+
this.findViewById(R.id.sandboxBottomSheet)
20+
this.red =
21+
this.findViewById(R.id.sandboxTabRed)
22+
23+
this.red.alpha = 0.0f
24+
}
25+
26+
override fun onStart() {
27+
super.onStart()
28+
29+
this.bottomSheet.drawerCloseInstantly()
30+
this.bottomSheet.setOpenListener(object : PalaceBottomSheetType.SheetOpenListenerType {
31+
override fun onOpenChanged(state: Double) {
32+
this@SandboxActivity.red.alpha = state.toFloat()
33+
}
34+
})
935
}
1036
}
Lines changed: 57 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,63 @@
11
<?xml version="1.0" encoding="utf-8"?>
22

3-
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
3+
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
4+
xmlns:app="http://schemas.android.com/apk/res-auto"
45
android:layout_width="match_parent"
56
android:layout_height="match_parent"
67
android:orientation="vertical">
78

8-
</LinearLayout>
9+
<FrameLayout
10+
android:id="@+id/sandboxTabContent"
11+
android:layout_width="0dp"
12+
android:layout_height="0dp"
13+
android:background="#00f"
14+
app:layout_constraintBottom_toTopOf="@id/sandboxTabLayout"
15+
app:layout_constraintEnd_toEndOf="parent"
16+
app:layout_constraintStart_toStartOf="parent"
17+
app:layout_constraintTop_toTopOf="parent">
18+
19+
<FrameLayout
20+
android:id="@+id/sandboxTabRed"
21+
android:layout_width="match_parent"
22+
android:layout_height="match_parent"
23+
android:background="#f00">
24+
25+
</FrameLayout>
26+
</FrameLayout>
27+
28+
<org.librarysimplified.ui.bottomsheet.PalaceBottomSheet
29+
android:id="@+id/sandboxBottomSheet"
30+
android:layout_width="match_parent"
31+
android:layout_height="300dp"
32+
app:layout_constraintBottom_toTopOf="@id/sandboxTabLayout">
33+
34+
<LinearLayout
35+
android:id="@+id/exampleContent"
36+
android:gravity="center"
37+
android:layout_width="match_parent"
38+
android:layout_height="match_parent">
39+
40+
<Button
41+
android:layout_width="128dp"
42+
android:layout_height="48dp"
43+
android:text="HELLO!" />
44+
</LinearLayout>
45+
46+
</org.librarysimplified.ui.bottomsheet.PalaceBottomSheet>
47+
48+
<com.google.android.material.tabs.TabLayout
49+
android:id="@+id/sandboxTabLayout"
50+
android:layout_width="match_parent"
51+
android:layout_height="80dp"
52+
app:layout_constraintBottom_toBottomOf="parent"
53+
app:layout_constraintEnd_toEndOf="parent"
54+
app:layout_constraintStart_toStartOf="parent">
55+
56+
<com.google.android.material.tabs.TabItem
57+
android:id="@+id/sandboxTab0"
58+
android:layout_width="wrap_content"
59+
android:layout_height="wrap_content"
60+
android:text="Content" />
61+
62+
</com.google.android.material.tabs.TabLayout>
63+
</androidx.constraintlayout.widget.ConstraintLayout>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
dependencies {
2+
coreLibraryDesugaring(libs.android.desugaring)
3+
4+
implementation(libs.androidx.annotation)
5+
implementation(libs.androidx.appcompat)
6+
implementation(libs.androidx.appcompat.resources)
7+
implementation(libs.androidx.cardview)
8+
implementation(libs.androidx.constraintlayout)
9+
implementation(libs.androidx.constraintlayout.core)
10+
implementation(libs.androidx.constraintlayout.solver)
11+
implementation(libs.androidx.coordinatorlayout)
12+
implementation(libs.androidx.core.splashscreen)
13+
implementation(libs.androidx.drawerlayout)
14+
15+
implementation(libs.google.material)
16+
implementation(libs.kotlin.reflect)
17+
implementation(libs.kotlin.stdlib)
18+
implementation(libs.palace.theme)
19+
implementation(libs.slf4j)
20+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
POM_ARTIFACT_ID=org.librarysimplified.ui.bottomsheet
2+
POM_DESCRIPTION=Library Simplified (Bottom sheet component)
3+
POM_NAME=org.librarysimplified.ui.bottomsheet
4+
POM_PACKAGING=aar

0 commit comments

Comments
 (0)