Note that there are some explanatory texts on larger screens.

plurals
  1. POfindViewById() question
    primarykey
    data
    text
    <p>I don't consider myself a beginner, but my copy and pasting has left me lost in auto-generated errors. Here's my dilemma, if I remove the comments below the program crashes unexpectedly; with comments it displays just fine.</p> <pre><code>//////// Options.java ///// public class Options extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.reclayout); //Button STO = (Button)findViewById(R.id.StopBut); //Button REC = (Button)findViewById(R.id.RecButton); } } ///////reclayout.xml///// &lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_height="fill_parent" android:layout_width="fill_parent" android:orientation="vertical" android:gravity="center_vertical"&gt; &lt;Spinner android:id="@+id/Spinner01" android:layout_height="wrap_content" android:layout_width="fill_parent" android:contentDescription="Classes"/&gt; &lt;EditText android:layout_height="wrap_content" android:layout_width="fill_parent" android:lines="3" android:id="@+id/DescriptionText" android:text="Class Description"/&gt; &lt;LinearLayout android:layout_height="wrap_content" android:id="@+id/ButtonLayout" android:orientation="horizontal" android:layout_width="fill_parent"&gt; &lt;ImageButton android:layout_height="wrap_content" android:layout_width="fill_parent" android:layout_weight="3" android:id="@+id/RecButton" android:focusableInTouchMode="true" android:src="@drawable/rec"/&gt; &lt;ImageButton android:layout_height="wrap_content" android:layout_width="fill_parent" android:layout_weight="3" android:id="@+id/PauseButton" android:src="@drawable/pause"/&gt; &lt;ImageButton android:layout_height="wrap_content" android:layout_width="fill_parent" android:layout_weight="3" droid:src="@drawable/stop" android:id="@+id/StopBut"/&gt;&lt;/LinearLayout&gt;&lt;/LinearLayout&gt;` </code></pre>
    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.
 

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