Hi Ludwig,
you are right.
On Oct 18, 3:51 am, Ludwig <[EMAIL PROTECTED]> wrote:
> I think the error message is pretty clear: you do not have a resource
> layout/dialog_activity.xml.Yours is called main.xml.
>
> Either try to load R.layout.main or rename main.xml dialog_activity.xml.
>
> HTH
>
> Ludwig
>
> 2008/10/13 mushimi <[EMAIL PROTECTED]>
>
>
>
> > Hi,
>
> > I follow sample "Dialog Activity" and have one error as this message's
> > title. Can someone help me to have a look?
>
> > My dialog_activity.java, main.xml and R.java as below:
>
> > My dialog_activity.java:
> > package com.iqq.adc.dialog_activity;
> > import android.app.Activity;
> > import android.os.Bundle;
> > import android.view.Window;
> > public class dialog_activity extends Activity {
> > [EMAIL PROTECTED]
> > protected void onCreate(Bundle savedInstanceState) {
> > super.onCreate(savedInstanceState);
> > requestWindowFeature(Window.FEATURE_LEFT_ICON);
> > setContentView(R.layout.dialog_activity);
>
> > getWindow().setFeatureDrawableResource(Window.FEATURE_LEFT_ICON,
> > android.R.drawable.ic_dialog_alert);
> > }
> > }
>
> > My main.xml:
> > <?xml version="1.0" encoding="utf-8"?>
> > <TextView xmlns:android="http://schemas.android.com/apk/res/android"
> > android:id="@+id/text"
> > android:layout_width="fill_parent"
> > android:layout_height="fill_parent"
> > android:gravity="center_vertical|center_horizontal"
> > android:text="@string/dialog_activity_text"/>
>
> > My R.java:
> > package com.iqq.adc.dialog_activity;
> > public final class R {
> > public static final class attr {
> > }
> > public static final class drawable {
> > public static final int icon=0x7f020000;
> > }
> > public static final class id {
> > public static final int text=0x7f050000;
> > }
> > public static final class layout {
> > public static final int main=0x7f030000;
> > }
> > public static final class string {
> > public static final int app_name=0x7f040001;
> > public static final int hello=0x7f040000;
> > }
> > }
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---