title: Display Image in fragment
body: <p>I have an image and I want to create fragment and display this image but there's an error in Line.             </p>
  
  <blockquote>
    <p>ImageView.setImageResource(AndroidImageAssete.getmeads.get(0));</p>
  </blockquote>
  
  <p>Here's the code of my java file:</p>
  
  <pre><code>public class BodyPartFragment extends Fragment {
  
      public BodyPartFragment(){
      }
      @Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container,
                               Bundle savedInstanceState) {
          View rootView =inflater.inflate(R.layout.fragment_body_part, container, false);
          ImageView imageView=(ImageView) rootView.findViewById(R.id.fragment_body_part);
          // Inflate the layout for this fragment
          ImageView.setImageResource(AndroidImageAssete.getmeads.get(0));
          return rootView;
  
      }
  
  }
  </code></pre>
  
  <p>And the main activity:</p>
  
  <pre><code>BodyPartFragment bodyPartFragment=new BodyPartFragment();
          getFragmentManager().beginTransaction()
                  .add(R.id.contener,contener);
          .commit();
      }
  }
  </code></pre>
  
  <p>This is the error:</p>
  
  <pre><code>Information:Gradle tasks [:app:assembleDebug]
  /Users/mac/Downloads/Flagment/app/src/main/java/com/example/waadalkatheri/flagment/MainActivity.java
  Error:(16, 9) error: illegal start of expression
  Error:Execution failed for task ':app:compileDebugJavaWithJavac'.
  &gt; Compilation failed; see the compiler error output for details.
  Information:BUILD FAILED
  Information:Total time: 50.036 secs
  Information:2 errors
  Information:0 warnings
  Information:See complete output in console
  </code></pre>