Swipe down to close images #122
@ -69,7 +69,8 @@
|
||||
android:name=".ReaderActivity">
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".ImageActivity">
|
||||
android:name=".ImageActivity"
|
||||
android:theme="@style/Theme.AppCompat.Translucent">
|
||||
</activity>
|
||||
|
||||
<meta-data android:name="android.webkit.WebView.MetricsOptOut"
|
||||
|
@ -24,7 +24,6 @@ class ImageActivity : AppCompatActivity() {
|
||||
setContentView(view)
|
||||
|
||||
setSupportActionBar(binding.toolBar)
|
||||
supportActionBar?.setDisplayShowTitleEnabled(false)
|
||||
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
||||
|
||||
allImages = intent.getStringArrayListExtra("allImages") as ArrayList<String>
|
||||
@ -48,6 +47,7 @@ class ImageActivity : AppCompatActivity() {
|
||||
override fun onTransitionCompleted(motionLayout: MotionLayout?, currentId: Int) {
|
||||
if (motionLayout?.currentState == binding.root.endState) {
|
||||
onBackPressedDispatcher.onBackPressed()
|
||||
overridePendingTransition(0, 0)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -9,12 +9,9 @@
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appBarLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
<androidx.appcompat.widget.Toolbar android:theme="@style/ToolBarStyle"
|
||||
android:id="@+id/toolBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
|
@ -26,4 +26,8 @@
|
||||
<item name="android:textColorSecondary">@color/white</item>
|
||||
<item name="actionMenuTextColor">@color/white</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.AppCompat.Translucent" parent="NoBar">
|
||||
<item name="android:windowBackground">@android:color/transparent</item>
|
||||
</style>
|
||||
</resources>
|
||||
|
Loading…
Reference in New Issue
Block a user