Hide toolbar from Image view

This commit is contained in:
davidoskky 2020-12-12 15:36:04 +01:00
parent 41e825bc50
commit 59c307323f
2 changed files with 11 additions and 3 deletions

View File

@ -4,6 +4,7 @@ import android.os.Bundle
import android.view.LayoutInflater import android.view.LayoutInflater
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import androidx.appcompat.app.AppCompatActivity
import androidx.fragment.app.Fragment import androidx.fragment.app.Fragment
import apps.amine.bou.readerforselfoss.R import apps.amine.bou.readerforselfoss.R
import apps.amine.bou.readerforselfoss.api.selfoss.Item import apps.amine.bou.readerforselfoss.api.selfoss.Item
@ -25,6 +26,7 @@ class ImageFragment : Fragment() {
} }
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
(activity as AppCompatActivity).supportActionBar?.hide()
val view : View = inflater.inflate(R.layout.fragment_image, container, false) val view : View = inflater.inflate(R.layout.fragment_image, container, false)
view.webcontent.visibility = View.VISIBLE view.webcontent.visibility = View.VISIBLE
@ -35,6 +37,11 @@ class ImageFragment : Fragment() {
return view return view
} }
override fun onDestroy() {
(activity as AppCompatActivity).supportActionBar?.show()
super.onDestroy()
}
companion object { companion object {
private const val ARG_POSITION = "position" private const val ARG_POSITION = "position"
private const val ARG_IMAGES = "allImages" private const val ARG_IMAGES = "allImages"

View File

@ -1,10 +1,11 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout <LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<WebView <WebView
android:id="@+id/webcontent" android:id="@+id/webcontent"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" /> android:layout_height="match_parent" />
</androidx.constraintlayout.widget.ConstraintLayout> </LinearLayout>