Giter VIP home page Giter VIP logo

Comments (33)

shipjacker avatar shipjacker commented on August 16, 2024 2

Hi, I think that this bug is related to 60453 and 60399 on Bugzilla. Its confirmed on 2.5.0 sr2.

I'm having the same problem, some components missing, different behavior in different Android APIs, and so on. I think that the problem is related to the HorizontalOptions of controls inside a Page.Content when this Content is a ScrollView. As commented on 60453, I fixed my solution with this workaround, as described below:

"
...

Upon further analysis, I think that the problem has something involved with the HorizontalOptions of the ScrollView inside a MasterDetailPage. In my tests, I have a MasterDetailPage and my Detail page has a ScrollView setted as the Content of the page, with some StackLayouts inside, besides another components (Labels, Images, etc).

If we redefine the HorizontalOptions from the Page.Content (to any value) and the HorizontalOptions from the ScrollView (to anything diferent from Fill / FillAndExpand, like CenterAndExpand), the content will appear correctly in any API version that I have tested.

But there is a implication with this workaround, I think that when we add some components inside the Content of the ScrollView or inside the Content of any of its children (like StackLayouts), the widths of them all may be recalculated and the bug comes back (hiding some controls), so its important that you define these HorizontalOptions AFTER you add any components that you need.

In my case, I have a ScrollView and in my constructor I set it as the Content of the Detail page. After that, terminating another method where I add some more controls inside the ScrollView, I have to redefine both the HorizontalOptions:

myScrollView.HorizontalOptions = LayoutOptions.CenterAndExpand;
this.Content.HorizontalOptions = LayoutOptions.FillAndExpand;

Doing this, all controls visibility works as expected in any API version.

Hope that it can help!"

One more thing, when we do a page rotation on any device, the components reappear.

*** Note that the behavior of this bug on Android 4.3 or less is worse than 4.4 and up;

from xamarin.forms.

maikoly1 avatar maikoly1 commented on August 16, 2024 2

Fixed this by Calling InitializeComponent() method on "Appearing override Method".

from xamarin.forms.

momodu avatar momodu commented on August 16, 2024 2

Wrapping the ScrollView with a ContentView FIXES the issue in my case.

An example is something like this:

    <ContentPage.Content>
        <ContentView>
            <ScrollView BackgroundColor="WhiteSmoke">
                <StackLayout HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" Margin="10,10,10,10">
                 ...... ANYTHING GOES HERE
                 </StackLayout>
              </ScrollView>
           </ContentView>
      </ContentPage.Content>

Hope this helps

from xamarin.forms.

Kukkimonsuta avatar Kukkimonsuta commented on August 16, 2024 1

These are most likely the same issue:

https://bugzilla.xamarin.com/show_bug.cgi?id=60155
https://bugzilla.xamarin.com/show_bug.cgi?id=60436

from xamarin.forms.

shipjacker avatar shipjacker commented on August 16, 2024 1

@Kukkimonsuta

Agreed! Updating the list:

https://bugzilla.xamarin.com/show_bug.cgi?id=60155
https://bugzilla.xamarin.com/show_bug.cgi?id=60399
https://bugzilla.xamarin.com/show_bug.cgi?id=60436
https://bugzilla.xamarin.com/show_bug.cgi?id=60453

from xamarin.forms.

Kukkimonsuta avatar Kukkimonsuta commented on August 16, 2024 1

We've been forced to drop android <4.4 support due to this, thankfully most users already migrated to newer versions. It is a bit disappointing that this issue is still not resolved as this is something that makes affected apps completely unusable on these devices.

from xamarin.forms.

mattclarkie avatar mattclarkie commented on August 16, 2024 1

Given how this is severe and breaks existing behaviour I'm surprised
a) It's not scheduled for fix on v2 maintenance
b) It's not actually scheduled for vNext but for vNext+1

How is this going to be broken for @jassmith?

from xamarin.forms.

 avatar commented on August 16, 2024 1

In our case helped setting android:hardwareAccelerated="true"

from xamarin.forms.

D4rkC1own187 avatar D4rkC1own187 commented on August 16, 2024 1

Updating to Xamarin.Forms 3.1.0.697729 did not fix the issue. The bug seems to still be present.

from xamarin.forms.

jassmith avatar jassmith commented on August 16, 2024 1

This indeed does not seem fully fixed

from xamarin.forms.

ianthetechie avatar ianthetechie commented on August 16, 2024 1

@samhouts this is still an issue. Happens consistently on Android only.

from xamarin.forms.

BlueRaja avatar BlueRaja commented on August 16, 2024 1

Yep, this issue still exists. This bug should not have been closed.

[Edit] There's a workaround here.

from xamarin.forms.

mattclarkie avatar mattclarkie commented on August 16, 2024

@shipjacker
It does look a very similar issue and it's good the workaround works for you, unfortunately for me it didn't work ๐Ÿ˜ญ

from xamarin.forms.

leo-mck avatar leo-mck commented on August 16, 2024

I only observed this on my app on android < 4.4 - but it is still a blocker and got me stuck on 2.3.4.

from xamarin.forms.

xprofession avatar xprofession commented on August 16, 2024

Any news?

from xamarin.forms.

reense avatar reense commented on August 16, 2024

+1

from xamarin.forms.

berlamont avatar berlamont commented on August 16, 2024

+1

from xamarin.forms.

cub-bsi avatar cub-bsi commented on August 16, 2024

Weโ€™re also facing this issue in our project. Would be great if this could be fixed within the next few weeks.

from xamarin.forms.

andreinitescu avatar andreinitescu commented on August 16, 2024

Everyone should mention the Android platform where this issue can be observed. If possible, maybe also test on different Android versions. Anything which can help debugging the issue.

from xamarin.forms.

zeljkoa avatar zeljkoa commented on August 16, 2024

I can confirm the issue on Android 4.1 and 4.2. We've been stuck with Forms 2.3.x for quite a while now. Is there a planned release date for the fix?

from xamarin.forms.

xprofession avatar xprofession commented on August 16, 2024

I ended up using FlowListView, and put all my view in one cell. Works fine, but not so convinient. Now I going to use something like this again.

from xamarin.forms.

dmachlanski avatar dmachlanski commented on August 16, 2024

It's still an issue for us, regardless of Android version used (even on Oreo).

from xamarin.forms.

AtlasAF01 avatar AtlasAF01 commented on August 16, 2024

This is a big problem for us as it is cutting off the controls/views at the bottom of our pages. We utilize Master/Detail with absolute layouts wrapping scroll views.

Tried various android versions on different devices and emulators with no change. Appeared when we updated to 2.5.1.444934 from 2.4

from xamarin.forms.

stackhaufen avatar stackhaufen commented on August 16, 2024

There is a "workaround" (more like an awful hack):

Open the keyboard for more than 100ms und close it again, this forces the GUI to refresh and "fixes" most problems on most Android versions.

from xamarin.forms.

mauriciorzm avatar mauriciorzm commented on August 16, 2024

I was having performance issues with no apparent reason, so I tried to set the android:hardwareAccelerated on, but didn't find a way, but it is activated by default if you set your TargetPlatform to IceCreamSandwich or above, so I set it to Oreo and now it runs smooth!

Thanks a lot @dawidkraczkowski

from xamarin.forms.

AtlasAF01 avatar AtlasAF01 commented on August 16, 2024

We just updated to the latest release and the problem still exists for us.

image

The button at the bottom of the screen should float at the bottom of the screen but is always rendered beneath the fold.

from xamarin.forms.

SvenHerr avatar SvenHerr commented on August 16, 2024

is still present :(

from xamarin.forms.

stuartmau avatar stuartmau commented on August 16, 2024

update - The behaviour in the sample below works as expected when tested with Xamarin.Forms 3.5.0.129452 with support v28.0.0.1.

I have a similar problem. In my case, the updated bounds are not propagating to child elements as expected when the device rotates.

I found that toggling a frame's visibility affects subsequent layout propagation of invisible frames.

Steps to reproduce

  1. Create an absolute layout.
  2. Add a frame as a child element with a second frame as its child.
  3. Toggle the first frame's visibility off and on.
  4. Set the first frame's visibility to off.
  5. Resize layout.
  6. Set the first frame's visibility to on.

Expected behaviour

The second frame's layout is updated to match the first.

Actual behaviour

The second frame's layout isn't updated.

tested with
Android 24 and 28
Xamarin.Forms 3.2.0.871581 and 3.3.0.775299-nightly
Xamarin.Support 27.0.2.1

unexpected

ScrollViewAndroid.zip

from xamarin.forms.

irshadka avatar irshadka commented on August 16, 2024

Any fixes for this issue?

from xamarin.forms.

samhouts avatar samhouts commented on August 16, 2024

This issue doesn't seem to have had any activity in a long time. We're working on prioritizing issues and resolving them as quickly as we can. To help us get through the list, we would appreciate an update from you to let us know if this is still affecting you on the latest version of Xamarin.Forms, since it's possible that we may have resolved this as part of another related or duplicate issue. If we don't see any new activity on this issue in the next 30 days, we'll evaluate whether this issue should be closed. Thank you!

from xamarin.forms.

Redth avatar Redth commented on August 16, 2024

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!

from xamarin.forms.

danielmeza avatar danielmeza commented on August 16, 2024

I had this issue on v 5, after I upgrade from 4 to 5.

from xamarin.forms.

sarapura12 avatar sarapura12 commented on August 16, 2024

Wrapping the ScrollView with a ContentView FIXES the issue in my case.

An example is something like this:

    <ContentPage.Content>
        <ContentView>
            <ScrollView BackgroundColor="WhiteSmoke">
                <StackLayout HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" Margin="10,10,10,10">
                 ...... ANYTHING GOES HERE
                 </StackLayout>
              </ScrollView>
           </ContentView>
      </ContentPage.Content>

Hope this helps

thanks

from xamarin.forms.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.