How can I tell when a Layout (and all its child Views) has fully finished inflating?

Yevgeny Simkin

I have a situation where I have a custom Layout which contains a bunch of children and which I inflate into a ViewFlipper.

My problem is that the ViewFlipper badly stutters its animation as it tries to animate the Layout in, even as the Layout is still loading all its child Views.

I tried using onLayout, but that gets called the moment the parent Layout is done inflating (it doesn't wait for the child views to inflate, so the stutter persists)

I also tried onMeasure, but that's called dozens of times and keeps getting called every time anything in the Layout changes (such as the EditText getting focus, or changing value).

So, I'm stumped... does *ANYTHING happen, that I can listen for, when the Layout is fully inflated, so that I can THEN tell the Flipper to perform the animation?

JiTHiN

You can override onFinishInflate() in your custom layout. This is called as the last phase of inflation, after all child views have been added.

この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。

侵害の場合は、連絡してください[email protected]

編集
0

コメントを追加

0

関連記事

分類Dev

How can I tell when my file system was last fsck-ed at all?

分類Dev

How can i know when the library is fully loaded

分類Dev

How can I get a div and all its children with their respective computedStyles?

分類Dev

How can I serialize a HtmlNode and all its descendants back to HTML

分類Dev

Relative Layout squishing child views

分類Dev

How to hide progress bar when animation has finished

分類Dev

How do i tell java its closer to go 350 -> 355 -> 360 -> 05 degrees instead of all the way around

分類Dev

Can I expect "debsums -cs" to exit to prompt when it's finished?

分類Dev

How can I tell a function enters kernel or not

分類Dev

How can I stop Android ScrollViewer to scroll itself to its first button child

分類Dev

How can I get one field of subdocument and all _id from its parents accross all levels?

分類Dev

How do I Change the Alignment of Toolbar Child Views

分類Dev

How can I create 2 different lists, one has all evens, the other all odds in One statement?

分類Dev

Execute code when video has finished playing

分類Dev

When has my async function finished

分類Dev

Magento - How can I tell if I'm on a "My Account" page?

分類Dev

How can I tell which user limit I am running into?

分類Dev

How can I tell if I am out of inotify watches?

分類Dev

How can I fully reallocate a 2D array in C?

分類Dev

How can I fully kill a program and/or python code running on Windows?

分類Dev

How can I tell how many bits my ssh key is?

分類Dev

How can I access JSON data when its retrieved from an external file?

分類Dev

How to know if a set of threads has finished

分類Dev

how to detect if the downloading of the file has finished?

分類Dev

How to find that audioTrack has finished/stopped playing?

分類Dev

How can I programmatically tell if a filename matches a shell glob pattern?

分類Dev

XMLEventWriter: how can I tell it to write empty elements?

分類Dev

How can I tell Selenium to press cancel on a print popup?

分類Dev

How can I tell Selenium to press cancel on a print popup?

Related 関連記事

  1. 1

    How can I tell when my file system was last fsck-ed at all?

  2. 2

    How can i know when the library is fully loaded

  3. 3

    How can I get a div and all its children with their respective computedStyles?

  4. 4

    How can I serialize a HtmlNode and all its descendants back to HTML

  5. 5

    Relative Layout squishing child views

  6. 6

    How to hide progress bar when animation has finished

  7. 7

    How do i tell java its closer to go 350 -> 355 -> 360 -> 05 degrees instead of all the way around

  8. 8

    Can I expect "debsums -cs" to exit to prompt when it's finished?

  9. 9

    How can I tell a function enters kernel or not

  10. 10

    How can I stop Android ScrollViewer to scroll itself to its first button child

  11. 11

    How can I get one field of subdocument and all _id from its parents accross all levels?

  12. 12

    How do I Change the Alignment of Toolbar Child Views

  13. 13

    How can I create 2 different lists, one has all evens, the other all odds in One statement?

  14. 14

    Execute code when video has finished playing

  15. 15

    When has my async function finished

  16. 16

    Magento - How can I tell if I'm on a "My Account" page?

  17. 17

    How can I tell which user limit I am running into?

  18. 18

    How can I tell if I am out of inotify watches?

  19. 19

    How can I fully reallocate a 2D array in C?

  20. 20

    How can I fully kill a program and/or python code running on Windows?

  21. 21

    How can I tell how many bits my ssh key is?

  22. 22

    How can I access JSON data when its retrieved from an external file?

  23. 23

    How to know if a set of threads has finished

  24. 24

    how to detect if the downloading of the file has finished?

  25. 25

    How to find that audioTrack has finished/stopped playing?

  26. 26

    How can I programmatically tell if a filename matches a shell glob pattern?

  27. 27

    XMLEventWriter: how can I tell it to write empty elements?

  28. 28

    How can I tell Selenium to press cancel on a print popup?

  29. 29

    How can I tell Selenium to press cancel on a print popup?

ホットタグ

アーカイブ