diff --git a/android/src/main/java/org/ligi/passandroid/ui/BarcodeUIController.kt b/android/src/main/java/org/ligi/passandroid/ui/BarcodeUIController.kt index 68f08098..3c11522b 100644 --- a/android/src/main/java/org/ligi/passandroid/ui/BarcodeUIController.kt +++ b/android/src/main/java/org/ligi/passandroid/ui/BarcodeUIController.kt @@ -58,7 +58,7 @@ internal class BarcodeUIController(rootView: View, private val barCode: BarCode? } - fun setBarCodeSize(width: Int) { + private fun setBarCodeSize(width: Int) { zoomOut.visibility = if (width < passViewHelper.fingerSize * 2) INVISIBLE else VISIBLE diff --git a/android/src/main/java/org/ligi/passandroid/ui/PassViewActivity.kt b/android/src/main/java/org/ligi/passandroid/ui/PassViewActivity.kt index 266bec44..19b245dd 100644 --- a/android/src/main/java/org/ligi/passandroid/ui/PassViewActivity.kt +++ b/android/src/main/java/org/ligi/passandroid/ui/PassViewActivity.kt @@ -46,7 +46,7 @@ class PassViewActivity : PassViewActivityBase() { val pass = currentPass ?: // don't deal with invalid passes return - BarcodeUIController(window.decorView, pass.barCode, this, passViewHelper) + BarcodeUIController(findViewById(android.R.id.content), pass.barCode, this, passViewHelper) processImage(logo_img_view, PassBitmapDefinitions.BITMAP_LOGO, pass) processImage(footer_img_view, PassBitmapDefinitions.BITMAP_FOOTER, pass) @@ -99,6 +99,10 @@ class PassViewActivity : PassViewActivityBase() { AXT.at(this).disableRotation() setContentView(R.layout.activity_pass_view) + + val passExtrasView = layoutInflater.inflate(R.layout.pass_view_extra_data, passExtrasContainer, false) + passExtrasContainer.addView(passExtrasView) + } override fun onResumeFragments() { @@ -108,13 +112,6 @@ class PassViewActivity : PassViewActivityBase() { return } - AXT.at(this).disableRotation() - - setContentView(R.layout.activity_pass_view) - - val passExtrasView = layoutInflater.inflate(R.layout.pass_view_extra_data, passExtrasContainer, false) - passExtrasContainer.addView(passExtrasView) - moreTextView.setOnClickListener { if (back_fields.visibility == View.VISIBLE) { back_fields.visibility = View.GONE