android - Fragment 's onCreateView is called on API 17 and 18 but not on API 16 or older -


i have activity layout adds fragment:

<linearlayout xmlns:android="http://schemas.android.com/apk/res/android" ... <fragment  ... /> <textview ... /> <scrollview ... >     <relativelayout ... >         <fragment .... />          <fragment             android:id="@+id/namesfragment"             android:name="com.myapp.namesfragment"             android:layout_width="match_parent"             android:layout_height="wrap_content"             android:layout_below="@+id/xxx"             tools:layout="@layout/fragment_names" />     </relativelayout> </scrollview> 

after developing genymotion virtual device api 18 had errors on actual device has older api. noticed oncreateveiw not called before onprepareoptionsmenu, cause crush variables aren't set.

i've checked 2 "regular" avds. 1 api 16 , other api 17. on api 17 oncreateveiw called expected while on api 16 not being called.

any idea why? did api 17 forces default execution path or changed fragment's lifecycle somehow? idea how "force" it, when fragment created layout?


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -