Hello co-readers of the book!
Currently I am in Chapter 4 of the book.
I have created an xml file 'clearable_edit_text.xml' and 'ClearableEditText.java'
On the TodoList.java, I added this code in onCreate() method
Code:
package com.paad.todolist;
import android.app.Activity;
import android.os.Bundle;
public class TodoList extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.clearable_edit_text);
}
}
this displays a EditText with Button on its side, The problem is, when I typed something and clicked the clear button, nothing happens...Have I done anything wrong? I copied the code from the book for clearable_edit_text.xml and ClearableEditText.java extends LinearLayout. However the book does not say how to use the custom widgets..Please give me some enlightenment...
Thank you!
Ryan Webb