title: Access resources in Fragment constructor
body: <p>I have a <code>Fragment</code> and in the empty constructor I need to be able to access string resources so I can create construct components of the fragment.</p>
  
  <p>I am aware that I should probably use <code>newInstance()</code> instead of constructors but constructors have been working so far and it seemed like a lot of hassle to pass custom objects using <code>Bundle</code>.</p>
  
  <p>My fragment constructor is as follows:</p>
  
  <pre><code>public SideMenuView(Context ctx) {
  
      menuItems = new MenuItem[] {
  
              new MenuItem(R.drawable.one_icon, ctx.getResources().getString(R.string.one), R.id.imgChevron),
              new MenuItem(R.drawable.two_icon, ctx.getResources().getString(R.string.two), R.id.imgChevron),
              new MenuItem(R.drawable.three_icon, ctx.getResources().getString(R.string.three), R.id.imgChevron)
          };
  
      fragCache = new Fragment[menuItems.length];
  }
  </code></pre>