Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Well the stacktrace says there's a <code>NullPointerException</code> at line 32 in your <code>ViewPagerStyle1Activity</code>. Look what call is at that line and you should know the culprit. </p> <p>You are trying to find <code>imageButton1</code> in your layout <code>main</code>, but it is actually located in your layout <code>layout_one</code>. The fix now depends on what you are actually plan to do with your fragment. You could just set the fragment layout as the layout for your <code>ViewPagerStyle1Activity</code> by replacing <code>setContentView(R.layout.main);</code> with <code>setContentView(R.layout.layout_one);</code> in its' <code>onCreate</code> method.</p> <p><strong>Update:</strong> maybe you should read a bit first about Android <a href="http://developer.android.com/training/basics/activity-lifecycle/index.html" rel="nofollow">Activities</a>, <a href="http://developer.android.com/guide/topics/ui/declaring-layout.html" rel="nofollow">Layouts</a> and <a href="http://developer.android.com/guide/components/fragments.html" rel="nofollow">Fragments</a>. This is <strong>very</strong> basic stuff and you won't get far without learning it in and out.</p> <p>Of course you can't find the imageButton1, if you hard-code <code>findViewById</code> to return <code>null</code> in your fragment.</p> <pre><code>private ImageButton findViewById(int imagebutton1) { // TODO Auto-generated method stub return null; } </code></pre> <p>But I get the sense you really don't know what you are actually trying to do.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload