Where is wrong about setContentView

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

Where is wrong about setContentView

Postby bazookier » Thu Jul 16, 2009 2:58 am

In main.xml:
......
<TextView android:id="@+id/test_service"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/test_service">
</TextView>
......

In R.java:
......
public static final class id {
public static final int btn_cancel=0x7f050002;
public static final int btn_ok=0x7f050001;
public static final int test_service=0x7f050000;
}
......


In the MyActivity.java:
......
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
setContentView(R.id.test_service);
......

When debugging, it stopped on the red line.
bazookier
Freshman
Freshman
 
Posts: 2
Joined: Thu Jul 16, 2009 2:38 am

Top

Postby bazookier » Thu Jul 16, 2009 3:59 am

OK.
It was solved!
bazookier
Freshman
Freshman
 
Posts: 2
Joined: Thu Jul 16, 2009 2:38 am

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 5 guests