Skip to content Skip to sidebar Skip to footer

Android Fragment : No View Found For Id 0x7f040034

All I am trying to do is connect SherlockFragmentActivity to Sherlock Fragment and I am getting the Error which states: Android Fragment : No view found for id 0x7f040034. search.j

Solution 1:

java.lang.IllegalArgumentException: No view found for id 0x7f040034 (com.example.festipedia_logo:id/content_frame) for fragment Searchresult{44d17a28 #0 id=0x7f040034 Fest Content}

You do not have a ViewGroup with the id content_frame in your searchact.xml.

Generally its a FrameLayout.

You have

ft.replace(R.id.content_frame,newSearchresult(querystr) , "Fest Content"); 

So you are replacing/adding fragment to the container which is a ViewGroup. So you need to have the same in the xml.

Have this in xml

<FrameLayoutandroid:id="@+id/content_frame"android:layout_width="match_parent"android:layout_height="match_parent" ></FrameLayout>

Post a Comment for "Android Fragment : No View Found For Id 0x7f040034"