This is the code where the include is set:
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="com.eranewgames.vkdownloader.fragments.GroupFragment"> <android.support.v7.widget.RecyclerView android:id="@+id/recView" android:background="@android:color/white" android:layout_width="match_parent" android:layout_height="match_parent"/> <include layout="@layout/loading_progress"/> loading_progress itself:
<?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent"> <ProgressBar android:layout_gravity="center" android:id="@+id/progressBar" style="?android:attr/progressBarStyle" android:layout_width="wrap_content" android:layout_height="wrap_content" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintHorizontal_bias="0.5" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent"/> </android.support.constraint.ConstraintLayout> public class RestVkRequest { private Context context; private View viewProgress; public RestVkRequest(Context context) { this.context = context; viewProgress= LayoutInflater.from(context).inflate(R.layout.loading_progress,null); viewProgress.setVisibility(View.VISIBLE); } public void getVkGroups(){ VKRequest vkRequest= new VKRequest("groups.get", VKParameters.from("extended",1)); vkRequest.executeWithListener(new VKRequest.VKRequestListener() { @Override public void onComplete(VKResponse response) { super.onComplete(response); viewProgress.setVisibility(View.GONE); GroupsModel groupsModel=new Gson().fromJson(response.responseString,GroupsModel.class); EventBus.getDefault().post(new EventMessage(EventName.RESPONSE_GROUP,groupsModel)); } @Override public void onError(VKError error) { super.onError(error); viewProgress.setVisibility(View.GONE); } }); } } As seen in the picture, setVISIBLE does not work. What am I doing wrong?

findViewByID(). - woesss