LoginSignup
1
0

More than 5 years have passed since last update.

ConstraintLayoutの罠

Posted at

罠というか自分で勘違いしてハマっただけです。
教訓のため残します。

勘違い

  • なんかよく30%くらい早くなりますよーという記事を見ていた
  • で、何気なくConstraintLayoutに置き換えた(結果は見えていたはず

結果

  • Android4系の端末でView生成時に落ちるようになりました。

なんでだ!?

  • 記事を色々読んで推測してみました。

ConstraintLayoutってそもそも1階層にするから早いのであって、ConstraintLayout入れ子にしたら元も子もないのでは?

考えれば至極真っ当で、相対的に大きさを計算しているLayoutなのだから計算処理はより複雑になっているはず。

ありがとうございます。
Revertして戻した。いまのところ落ちていない模様。

おわり

  • RelativeLayoutより重いとは。
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0