Hi, I'm new to Android.

I'm onto chapter 8 of the Sams Teach Yourself Android Application
Development in 24 Hours and am having a difficulty.  There are several
layouts including splash defined by splash.xml and menu defined by
menu.xml.  I have a ListView control named Listview_Menu defined in
menu.xml. My difficulty is within a java file QuizMenuActivity.java

package com.androidbook.triviaquiz;

import android.os.Bundle;
import android.widget.ListView;

public class QuizMenuActivity extends QuizActivity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.menu);

When I attempt to code ListView menuList = (ListView)
findViewById(R.id.ListView_Menu); I get an error - the available
controls come from splash.xml rather than menu.xml, i.e. when I type
ListView menuList = (ListView) findViewById(R.id. the dropdown list is
populated by the controls in splash.xml

Could someone point out where I'm going wrong,

Thanks

Frank

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to