Giter Site home page Giter Site logo

I find,onResume() method perform addView(),but does not show,but replaces by LinearLayout,it is normal.And sometimes,in onCreate() method,it does not show. about flexbox-layout HOT 8 CLOSED

google avatar google commented on May 4, 2024
I find,onResume() method perform addView(),but does not show,but replaces by LinearLayout,it is normal.And sometimes,in onCreate() method,it does not show.

from flexbox-layout.

Comments (8)

thagikura avatar thagikura commented on May 4, 2024

Hi,

Thanks for your report.
If I understand your issue correctly, you are calling FlexboxLayout#addView in the onResume method in your app but the added view isn't showing?

If so, is it possible to paste your relevant code and screenshots?

from flexbox-layout.

qinyongfang avatar qinyongfang commented on May 4, 2024

Yes,you think right.Even in onCreate() method to request, it will occasionally appear.
My code:
hotSearch xml:
image
history xml:
image
in onCreate() method to request to get hotSearchDatas:
image
in onResume() method to request to get historyDatas():
image
image
history does not show:
image
back and have a try,it shows:
image
back and have a try,unfortunately,it does not show:
image
thank you.

from flexbox-layout.

stewForAni avatar stewForAni commented on May 4, 2024

use real phone to have a try -。-

from flexbox-layout.

thagikura avatar thagikura commented on May 4, 2024

Thanks for pasting the code.
From what I can tell, it's still not clear if the issue is in the FlexboxLayout or in your app.

Can you please confirm the following?

  • When FlexboxLayout#addView is called, please make sure the method is actually called (i.e. there is not empty data from your logic (history data)) by placing a breakpoint and putting logs.

from flexbox-layout.

thagikura avatar thagikura commented on May 4, 2024

Hello @qinyongfang,

Is the issue still persistent? Is there anything I can do to investigate it further?

from flexbox-layout.

qinyongfang avatar qinyongfang commented on May 4, 2024

I'm sorry, Sir. I was doing something else lately. Thank you very much for your reply. I tried on a real machine, still have this problem. I'm sorry I don't know how to make a screenshot of you, I believe you have seen the previous log records. I'm sure that every request data is successful. Can you try this way?

from flexbox-layout.

qinyongfang avatar qinyongfang commented on May 4, 2024

I am not saying that it is not always successful, but that it has a large percentage of it is not successful.

from flexbox-layout.

thagikura avatar thagikura commented on May 4, 2024

I'm certain it's highly likely the issue is not on the FlexboxLayout. From looking at the source code of the addView method, it can't possibly success of fail randomly.

If that happens sporadically, please try to:

  • output logs for both cases (success and failure).
  • simply call the addView method without fetching the history data and see how it goes.

Anyway, can you please reopen it if you are sure the issue if on the FlexboxLayout?
Thanks.

from flexbox-layout.

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.