/var/log/messages

Aug 27, 2015 - 1 minute read - Comments - android

CrossWalk なソレを Fragment で inflate

Fragment において、LayoutInflater#inflate でオチます。layout.xml の中に View を記述しています。

これ、Activity で同様の記述をして setContentView するのであれば無問題なのですが、Fragment でこれをヤると inflate な例外が発生することを確認。

運よく layout.xml では XWalkView の定義のみ、でしたので onCreateView だか onViewCreated だかの中で XWalkView のオブジェクトを作って addView することで回避できましたが何か納得いかないなぁ。

脳内盤駒はメモリを圧迫するらしい件 zxing

comments powered by Disqus