[RESOLVIDO]Botao não aparece no Layout

Pessoal,

Fiz um Layout (form), e coloquei alguns componentes no form, porem esses componentes não estão aparecendo no form quando executo no emulador .

Alguem pode me ajudar ???

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical" >

    <TextView
        android:id="@+id/textView2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Cliente"
        android:textAppearance="?android:attr/textAppearanceLarge" />

    <EditText
        android:id="@+id/editText1"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:ems="10" >

        <requestFocus />
    </EditText>

    <TextView
        android:id="@+id/textView3"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Endereços"
        android:textAppearance="?android:attr/textAppearanceLarge" />

    <View
        android:id="@+id/view1"
        android:layout_width="wrap_content"
        android:layout_height="70dp" />

    <Button
        android:id="@+id/btnsalvar"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:onClick="Salvar_Click"
        android:text="Salvar" />

</LinearLayout>

Está dando setContentView na sua Activity com esse layout?
Ou inflando do XML em uma View que está na tela?

Acho que faltou o setContentView, em casa vou testar isso…

obrigado

No meu activity, coloquei a linha abaixo :
setContentView(R.layout.novocliente);

public class novocliente   extends ListActivity{
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.novocliente);
		
		

	}
	

}

porem deu o erro abaixo:
06-26 21:21:02.799: E/AndroidRuntime(299): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.vendas/com.example.dao.novocliente}: java.lang.RuntimeException: Your content must have a ListView whose id attribute is 'android.R.id.list’
06-26 21:21:02.799: E/AndroidRuntime(299): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
06-26 21:21:02.799: E/AndroidRuntime(299): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
06-26 21:21:02.799: E/AndroidRuntime(299): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
06-26 21:21:02.799: E/AndroidRuntime(299): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
06-26 21:21:02.799: E/AndroidRuntime(299): at android.os.Handler.dispatchMessage(Handler.java:99)
06-26 21:21:02.799: E/AndroidRuntime(299): at android.os.Looper.loop(Looper.java:123)
06-26 21:21:02.799: E/AndroidRuntime(299): at android.app.ActivityThread.main(ActivityThread.java:4627)
06-26 21:21:02.799: E/AndroidRuntime(299): at java.lang.reflect.Method.invokeNative(Native Method)
06-26 21:21:02.799: E/AndroidRuntime(299): at java.lang.reflect.Method.invoke(Method.java:521)
06-26 21:21:02.799: E/AndroidRuntime(299): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
06-26 21:21:02.799: E/AndroidRuntime(299): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
06-26 21:21:02.799: E/AndroidRuntime(299): at dalvik.system.NativeStart.main(Native Method)
06-26 21:21:02.799: E/AndroidRuntime(299): Caused by: java.lang.RuntimeException: Your content must have a ListView whose id attribute is 'android.R.id.list’
06-26 21:21:02.799: E/AndroidRuntime(299): at android.app.ListActivity.onContentChanged(ListActivity.java:245)
06-26 21:21:02.799: E/AndroidRuntime(299): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:201)
06-26 21:21:02.799: E/AndroidRuntime(299): at android.app.Activity.setContentView(Activity.java:1647)
06-26 21:21:02.799: E/AndroidRuntime(299): at com.example.dao.novocliente.onCreate(novocliente.java:14)
06-26 21:21:02.799: E/AndroidRuntime(299): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
06-26 21:21:02.799: E/AndroidRuntime(299): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
06-26 21:21:02.799: E/AndroidRuntime(299): … 11 more
06-26 21:26:02.890: I/Process(299): Sending signal. PID: 299 SIG: 9

[quote=evandro_araujo]No meu activity, coloquei a linha abaixo :
setContentView(R.layout.novocliente);

public class novocliente   extends ListActivity{
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.novocliente);
		
		

	}
	

}

porem deu o erro abaixo:
06-26 21:21:02.799: E/AndroidRuntime(299): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.vendas/com.example.dao.novocliente}: java.lang.RuntimeException: Your content must have a ListView whose id attribute is 'android.R.id.list’
06-26 21:21:02.799: E/AndroidRuntime(299): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
06-26 21:21:02.799: E/AndroidRuntime(299): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
06-26 21:21:02.799: E/AndroidRuntime(299): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
06-26 21:21:02.799: E/AndroidRuntime(299): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
06-26 21:21:02.799: E/AndroidRuntime(299): at android.os.Handler.dispatchMessage(Handler.java:99)
06-26 21:21:02.799: E/AndroidRuntime(299): at android.os.Looper.loop(Looper.java:123)
06-26 21:21:02.799: E/AndroidRuntime(299): at android.app.ActivityThread.main(ActivityThread.java:4627)
06-26 21:21:02.799: E/AndroidRuntime(299): at java.lang.reflect.Method.invokeNative(Native Method)
06-26 21:21:02.799: E/AndroidRuntime(299): at java.lang.reflect.Method.invoke(Method.java:521)
06-26 21:21:02.799: E/AndroidRuntime(299): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
06-26 21:21:02.799: E/AndroidRuntime(299): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
06-26 21:21:02.799: E/AndroidRuntime(299): at dalvik.system.NativeStart.main(Native Method)
06-26 21:21:02.799: E/AndroidRuntime(299): Caused by: java.lang.RuntimeException: Your content must have a ListView whose id attribute is 'android.R.id.list’
06-26 21:21:02.799: E/AndroidRuntime(299): at android.app.ListActivity.onContentChanged(ListActivity.java:245)
06-26 21:21:02.799: E/AndroidRuntime(299): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:201)
06-26 21:21:02.799: E/AndroidRuntime(299): at android.app.Activity.setContentView(Activity.java:1647)
06-26 21:21:02.799: E/AndroidRuntime(299): at com.example.dao.novocliente.onCreate(novocliente.java:14)
06-26 21:21:02.799: E/AndroidRuntime(299): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
06-26 21:21:02.799: E/AndroidRuntime(299): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
06-26 21:21:02.799: E/AndroidRuntime(299): … 11 more
06-26 21:26:02.890: I/Process(299): Sending signal. PID: 299 SIG: 9
[/quote]

Pq tu tá “extendendo” uma ListActivity??? Tente “extender” uma Activity normal.

Isso mesmo , tinha extender uma activity.