in Education by
I am trying to inflate one of my fragments. However, the fragment does not show up in the autosuggest. So I manually entered the name of the fragment. By doing that the fragment name was showing in red text color and also red squiggly lines showing below all of the class names. However, when I run the application, it runs perfectly without any errors. I have three fragments: fragment_dynamic_android.xml, fragment_dynamic_windows.xml and fragment_dynamic_ios.xml. I can able to inflate the fragment_dynamic_android.xml in AndroidFragment.java class on onCreateView method. But when I try to inflate the fragment_dynamic_windows.xml on WindowsFragment.java's onCreateView method. The red textcolor is showing on View rootView = inflater.inflate(R.layout.fragment_dynamic_windows, container, false); The applications run without any error. package app.tab.simple.fragmenttut; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.support.v4.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; public class WindowsFragment extends Fragment { @Nullable @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View rootView = inflater.inflate(R.layout.fragment_dynamic_windows, container, false); return rootView; } } JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
After some frustration, Switched off the pc and went to do some stuff. Came again and opened the project, the error was gone. Not sure why android studio behaved like that.

Related questions

0 votes
    I have the following codes in my android application: main.xml : fragmenta.xml : FragmentA.java : package ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 12, 2022 in Education by JackTerrance
0 votes
    I have a Fragment inside of my MainActivity that contains a RecyclerView being populated by a RecyclerView.Adapter ... for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 14, 2022 in Education by JackTerrance
0 votes
    I am trying to implement the Hateoas using spring boot. In my UserController class i have used the below ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 12, 2022 in Education by JackTerrance
0 votes
0 votes
    One hundred identical coins, each with probability p, of showing up heads are tossed once. If `0 A. 1/2 B. 51 ... /101 D. none of these Select the correct answer from above options...
asked Nov 16, 2021 in Education by JackTerrance
0 votes
    I'm working on a rather big project with my team and after a while, we struck into a big problem ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jan 16, 2022 in Education by JackTerrance
0 votes
    (This post isn't helpful) I'm using this code in onCreateOptionsMenu to enable/disable menu items in a ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 26, 2022 in Education by JackTerrance
0 votes
    (This post isn't helpful) I'm using this code in onCreateOptionsMenu to enable/disable menu items in a ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 23, 2022 in Education by JackTerrance
0 votes
    I want to do fragment of my hard disk suggest me the desired software for ti Select the correct answer from above options...
asked Dec 14, 2021 in Education by JackTerrance
0 votes
    The below image shows my question in detail: it works when client version is changed to 5 beta but ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 21, 2022 in Education by JackTerrance
0 votes
    What happens when you try to deploy a file with multiple contracts?...
asked Jan 22, 2023 in Technology by JackTerrance
0 votes
    Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers. ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 1, 2022 in Education by JackTerrance
0 votes
    I am trying to look at a cone in 3D, for which I used gluLookAt. I draw a cone in the middle ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 19, 2022 in Education by JackTerrance
0 votes
    I am trying to look at a cone in 3D, for which I used gluLookAt. I draw a cone in the middle ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 13, 2022 in Education by JackTerrance
...