test 2 in html mode

  • Post author:
  • Post Category:Java
  • Post Comments:0 Comments

here is some test code


package james.HelloWorld;

import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;

public class HelloWorldActivity extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        
      //  Object o = null;
     //   o.toString();
     //   setContentView(R.layout.main);

       setContentView(R.layout.main);
        TextView myText = new TextView(this);
        myText.setText("Hello Quimpy");
        setContentView(myText);
    }
}

And an xml test


<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="wrap_content"
    	android:layout_height="wrap_content">
    
    <ListView android:id="@+id/android:list"
          android:layout_width="wrap_content"
        	android:layout_height="wrap_content"/>
  	<TextView android:id="@+id/android:empty"
          android:layout_width="wrap_content"
        	android:layout_height="wrap_content"
        	android:text="@string/no_notes"/>
</LinearLayout>

Leave a Reply