You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Related with this issue: #441.
After realising that I need to send as parameter a session or open the Custom tab via startActivityForResult to be able to have it in a bottom sheet (as it says in the docs, thanks @sebastianbenz), I could make it by using registerForActivityResult (which substitutes startActivityForResult, it's deprecated). Now that I have my Custom tab in a bottom sheet, I would like to customize its height, but I'm not able to, it always stays at the 50% of the screen height whatever number I pass as parameter to the setInitialActivityHeight method.
I tried modifying the number in PartialCustomTabActivity.java in the custom-tabs-example-app in this same repo, and the bug seems to be there too, the bottom sheet is always 50% of the screen. I also tried in several different devices.
To Reproduce
Steps to reproduce the behavior:
Construct a new CustomTabsIntent.Builder indicating the desired height with setInitialActivityHeightPx().
Get the CustomTabsIntent from the builder and set the desired Uri as intent.data.
Launch the intent via a launcher created via registerForActivityResult.
Custom tab is launched in a resizable bottom sheet but always with the same height (50% of the screen), no matter which valid number I pass in step 1.
Expected behavior
The Custom tab appears in a bottom sheet with the specified height.
Did this ever used to work
I couldn't make it work, neither in my project nor in the custom-tabs-example-app project of this repo.
Screenshots
No need screenshots here.
Code Snippets
private val customTabsLauncher =
registerForActivityResult(ActivityResultContracts.StartActivityForResult()) {
// ...
}
val customTabsBuilder = CustomTabsIntent.Builder().setInitialActivityHeightPx(500)
val customTabsIntent = customTabsBuilder.build()
customTabsIntent.intent.data = Uri.parse("www.example.com")
customTabsLauncher.launch(customTabsIntent.intent)
Smartphone (please complete the following information):
Device: Samsung Galaxy S9
OS: Android 9
Browsers Installed: Google Chrome
Browser Versions: 117.0.5938.60
android-browser-helper library version: 1.5.0
and
Device: Google Pixel 7
OS: Android 13
Browsers Installed: Google Chrome
Browser Versions: 117.0.5938.60
android-browser-helper library version: 1.5.0
The text was updated successfully, but these errors were encountered:
Describe the bug
Related with this issue: #441.
After realising that I need to send as parameter a session or open the Custom tab via
startActivityForResult
to be able to have it in a bottom sheet (as it says in the docs, thanks @sebastianbenz), I could make it by usingregisterForActivityResult
(which substitutesstartActivityForResult
, it's deprecated). Now that I have my Custom tab in a bottom sheet, I would like to customize its height, but I'm not able to, it always stays at the 50% of the screen height whatever number I pass as parameter to thesetInitialActivityHeight
method.I tried modifying the number in
PartialCustomTabActivity.java
in thecustom-tabs-example-app
in this same repo, and the bug seems to be there too, the bottom sheet is always 50% of the screen. I also tried in several different devices.To Reproduce
Steps to reproduce the behavior:
CustomTabsIntent.Builder
indicating the desired height withsetInitialActivityHeightPx()
.CustomTabsIntent
from the builder and set the desired Uri asintent.data
.registerForActivityResult
.Expected behavior
The Custom tab appears in a bottom sheet with the specified height.
Did this ever used to work
I couldn't make it work, neither in my project nor in the
custom-tabs-example-app
project of this repo.Screenshots
No need screenshots here.
Code Snippets
Smartphone (please complete the following information):
and
The text was updated successfully, but these errors were encountered: