java - cannot resolved method getChildFragmentManager() -


error: 'childfragmentmanager' parameter can used if getchildfragmentmanager() method available in android.support.v4.app.fragment, update support library version.

i have compile 'com.android.support:support-v4:24.2.0' in gradle. code like;

 import android.support.v4.app.fragment;  import org.androidannotations.annotations.*;  import org.androidannotations.annotations.sharedpreferences.pref; . .  @efragment(r.layout.fragment_main) public class mainfragment extends fragment { @pref applicationsettings_ applicationsettings; @viewbyid(r.id.bot) public linearlayout bot; @viewbyid(r.id.center) public linearlayout center; @bean uiitemgenerator uiitemgenerator; @systemservice layoutinflater layoutinflater; @fragmentbyid(value = r.id.contentfragment,childfragment = true) public contentfragment contentfragment;  public mainfragment() { }  @click(r.id.imagebutton_ribbon) public void ribbonclick(view view) {     view.setvisibility(view.gone); }  . . . @afterviews public void afterviews() {     if (contentfragment == null)         contentfragment = (contentfragment) this.getchildfragmentmanager().findfragmentbyid(r.id.contentfragment);     (int j = 0; j < bot.getchildcount(); j++) {         bot.getchildat(j).setselected(false);     }     (int j = 0; j < top.getchildcount(); j++) {         top.getchildat(j).setselected(false);     }     ll_home.setselected(true);     ll_allrooms.setselected(true);     initui();     contentfragment.generatecontent(-1, -1);     imagebutton_top_rightarrow.setselected(true);     imagebutton_bot_rightarrow.setselected(true); 

getchildfragmentmanager() method on fragment , check import statement

import android.support.v4.app.fragmentmanager; 

i think using appcompatactivity(child class of fragmentactivity), have use this

getsupportfragmentmanager() 

Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -