diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/PanoramaActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/PanoramaActivity.kt index 231dc1cea..852dc5c8c 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/PanoramaActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/PanoramaActivity.kt @@ -17,7 +17,10 @@ import com.simplemobiletools.gallery.helpers.PATH import kotlinx.android.synthetic.main.activity_panorama.* open class PanoramaActivity : SimpleActivity() { + private val CARDBOARD_DISPLAY_MODE = 3 + private var isFullScreen = true + private var isExploreEnabled = true public override fun onCreate(savedInstanceState: Bundle?) { useDynamicTheme = false @@ -29,6 +32,16 @@ open class PanoramaActivity : SimpleActivity() { (cardboard.layoutParams as RelativeLayout.LayoutParams).bottomMargin = navigationBarHeight (explore.layoutParams as RelativeLayout.LayoutParams).bottomMargin = navigationBarHeight + cardboard.setOnClickListener { + panorama_view.displayMode = CARDBOARD_DISPLAY_MODE + } + + explore.setOnClickListener { + isExploreEnabled = !isExploreEnabled + panorama_view.setPureTouchTracking(isExploreEnabled) + explore.setImageResource(if (isExploreEnabled) R.drawable.ic_explore else R.drawable.ic_explore_off) + } + handlePermission(PERMISSION_WRITE_STORAGE) { if (it) { checkIntent()