Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

ScrollView IsClippedToBounds="true" not rendering on Android with Forms 3.3, 3.4, 3.5, 3.6, 4.0 #4455

Open
BlueFire-LLC opened this issue Nov 18, 2018 · 15 comments
Labels
3.3.0 regression on 3.3.0 e/3 🕒 3 help wanted We welcome community contributions to any issue, but these might be a good place to start! i/regression inactive Issue is older than 6 months and needs to be retested p/Android t/bug 🐛 up-for-grabs We welcome community contributions to any issue, but these might be a good place to start!

Comments

@BlueFire-LLC
Copy link

BlueFire-LLC commented Nov 18, 2018

My existing project has forms that basically look like this:

<StackLayout Orientation="Vertical" VerticalOptions="FillAndExpand">
<StackLayout ...>
<ScrollView ... IsClippedToBounds="true">
<StackLayout ...>
Bunch of controls
</StackLayout>
</ScrollView>
</StackLayout>
<StackLayout Orientation="Vertical" VerticalOptions="EndAndExpand">
Some buttons
</StackLayout>
</StackLLayout>

In Forms 3.2 everything works great but starting with Forms 3.3 the first scroll page renders but subsequent pages do not.

When setting IsClippedToBound off, the pages render but overlay the buttons.

This only applies to Android. My iOS and Windows 10 projects render correctly.

PS. I tried to indent the Xaml but it doesn't work.

@rmarinho
Copy link
Member

Hi I m having trouble reproduction your issue, do you mind upload a small repo using 3.2.
Also if you please could add some screenshots that would be great.

Thanks

@rmarinho rmarinho added the s/needs-repro ❔ This reported issue doesn't include a sample project reproducing the issue. Please provide one. label Nov 22, 2018
@BlueFire-LLC
Copy link
Author

Rui,

I emailed you screenshots and a demo page. Let me know if you need anything else, ok?

Thanks,

Mark.

@PureWeen
Copy link
Contributor

PureWeen commented Jan 2, 2019

@rmarinho do you need anything additional from @BlueFire-LLC ?

@BlueFire-LLC
Copy link
Author

BlueFire-LLC commented Jan 2, 2019

@rmarinho,

Attached are some screenshots and the demo page. You’ll see in the demo page that I reference a custom gesture recognizer that uses Android’s GestureDetector.SimpleOnGestureListener.

BugTest1 – first page
BugTest2 – first scrolled page
BugTest 3 - second scroll page

You can view the actual app from the link below. The demo page was taken from the Drive page of the app.

https://play.google.com/store/apps/details?id=com.bluefire_llc.motorhomes

Mark.

Demo App
BugTest.zip

Screenshot with 3.2, First Page
bugtest1-3 2

Screenshot with 3.2, Second Page
bugtest2-3 2

Screenshot with 3.2, Third Page
bugtest3-3 2

Screenshot with 3.4, First Page
bugtest1-3 4

Screenshot with 3.4, Second Page
bugtest2-3 4

@PureWeen
Copy link
Contributor

PureWeen commented Jan 4, 2019

@BlueFire-LLC I'm not quite sure how to recreate the issue with what you've attached

Triage.zip

I've included a project that has the page from your zip file in it.
I tried navigating to it multiple times but for me it always seems to work just fine

Can you try to modify the above project to demonstrate your issues?

@samhouts
Copy link
Member

samhouts commented Feb 4, 2019

@BlueFire-LLC Since we haven't heard from you in more than 30 days, we hope this issue is no longer affecting you. If it is, please reopen this issue and provide the requested information so that we can look into it further. Thank you!

@samhouts samhouts closed this as completed Feb 4, 2019
@BlueFire-LLC
Copy link
Author

Still is. I was planning on getting back to you this week. I never heard back from@rmarinho with the test app I sent and also included in the previous posts. I still have to use 3.2 in my Android project even though the iOS and Win10 is 3.4.

@BlueFire-LLC
Copy link
Author

BlueFire-LLC commented Feb 4, 2019 via email

@samhouts
Copy link
Member

See repro #5225 (comment)

@samhouts samhouts added t/bug 🐛 i/regression e/3 🕒 3 and removed s/needs-repro ❔ This reported issue doesn't include a sample project reproducing the issue. Please provide one. labels Feb 13, 2019
@BlueFire-LLC
Copy link
Author

Any update???? I still have to use 3.2 for my Android project.

@BlueFire-LLC
Copy link
Author

So, I just tried 3.6 and it still is broken. How long do I have to wait for this to get fixed?

@BlueFire-LLC
Copy link
Author

BlueFire-LLC commented May 29, 2019

Ok, you guys owe me a cold one. After 6 months of staying on version 3.2 I finally had time to figure out what's going on. So I just spent the last two days going through all sorts of gyrations. I began with the Triage app you provided that works and my app that does not. I started pairing down my app (it's pretty big) to just the Android project. I then started adding to the Triage app to see if I could make it not work. I also started removing pieces from mine to make it work. Of course every time I added or removed something I had to test it. This took the first day plus some of the second. I finally ended up with two apps (Triage and mine) that had identical project files (.csproj). And still Triage worked and mine did not. I even made sure that the app files were the same (MainActivity, BugTest, etc). Everything was the same and mine still did not work. I was totally baffled. The only file that was different was the AndroidManifest.xml. It of course had different package names and labels. So I made them the same and still mine did not work. Now everything was exactly the same. I even thought that maybe installing one after the other made a difference but nope. I even tried VS 2017 and VS 2019 thinking it was a VS bug, but still the same. I sat back and stared at all the files and lo and behold I noticed that in the AndroidManifest.xml the order of <uses_sdk .../> and <application .../> were different. No, I said, that couldn't be the reason. It's a settings file. The order should make no difference. Well, it looks like in version 3.3 you handed over a change to a junior programmer who was so enthusiastic to show how good he was that he started coding before reading in all the settings. If you reverse the order so that <uses_sdk .../> is after <application .../> you will cause Triage not to work. I would very much appreciated knowing how this occurred and when it will be fixed. I have a big note now in my AndroidManifest.xml file to make sure <uses_sdk .../> precedes <application .../>.

@BlueFire-LLC BlueFire-LLC changed the title ScrollView IsClippedToBounds="true" not rendering on Android with Forms 3.3 & 3.4 ScrollView IsClippedToBounds="true" not rendering on Android with Forms 3.3, 3.4, 3.5, 3.6, 4.0 May 29, 2019
@PureWeen
Copy link
Contributor

@BlueFire-LLC so that issues comes from the android tooling and not our side

If you look at the documentation for linting a manifest file from android
https://developer.android.com/studio/write/lint

That's one of the examples

AndroidManifest.xml:23: Warning: <uses-sdk> tag appears after <application> tag [ManifestOrder]
  <uses-sdk android:minSdkVersion="7" />

you can even test this locally by manually running the linter

H:\Recreate\XamForms\clipping\Triage\Triage.Android\Properties>h:\sdks\android-sdk\tools\bin\lint --check ManifestOrder AndroidManifest.xml

Scanning Properties: .
AndroidManifest.xml:5: Warning: <uses-sdk> tag appears after <application> tag [ManifestOrder]
  <uses-sdk android:minSdkVersion="15" android:targetSdkVersion="28" />
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0 errors, 1 warnings

Off hand I'm not sure the direct effect of specifying that order incorrectly. I'm guessing the targetSdk is getting dropped or it causes minsdk to get set much lower which then internally effects how things are processed

I'm checking with the Xam Android team if there's a way to surface this as a warning for future users though. Nice Find 🍨

@BlueFire-LLC
Copy link
Author

Thanks for the quick response. I'm not an Android guy so the whole linting thing was a bit beyond me :).

Yeah, a warning would suffice since it's an easy thing to get wrong but still easy to fix. Maybe you could run Lint before compiling?

@BlueFire-LLC
Copy link
Author

BlueFire-LLC commented Jun 20, 2019

@PureWeen Well, I'm back on 3.2 (big sad face). Seems that this trick does not work with older versions of Android. One of my customers reported the missing scrolling pages and I learned he was on Android 4.4.1. I dug out an old tablet with 4.4.1 on it and sure enough the behavior is back. I'm sort of out of options to try. Any ideas or at least can you find out which Android version works with this method? I only have this tablet (4.4.1) and newer ones (7.0).

Update - this appears to only affect Android version 4.x.x and lower.

@samhouts samhouts added inactive Issue is older than 6 months and needs to be retested help wanted We welcome community contributions to any issue, but these might be a good place to start! up-for-grabs We welcome community contributions to any issue, but these might be a good place to start! labels Dec 17, 2019
@samhouts samhouts added the 3.3.0 regression on 3.3.0 label Jun 17, 2020
@samhouts samhouts added this to the 5.0.0 milestone Aug 13, 2020
@samhouts samhouts removed this from the 5.0.0 milestone Nov 2, 2020
@rmarinho rmarinho removed their assignment Aug 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
3.3.0 regression on 3.3.0 e/3 🕒 3 help wanted We welcome community contributions to any issue, but these might be a good place to start! i/regression inactive Issue is older than 6 months and needs to be retested p/Android t/bug 🐛 up-for-grabs We welcome community contributions to any issue, but these might be a good place to start!
Projects
None yet
Development

No branches or pull requests

4 participants