CoreStartHere.java
public class CoreStartHere extends TabActivity {
:
t = getTabHost();
t.newTabSpec("tTask");
t.setIndicator(...);
t.setContent(new Intent().setClass(this, T1Task.class);
:
}
t1Task.java
T1Task extends Activity {
:
onCreate(Bundle ...) {
:
myListview = (ListView) findViewById(R.id.hdListView);
myEditText = (EditText) findViewById(R.id.hdEditText);
hdItems = newArrayList <String>();
aa = new ArrayAdapter <String>(this, R.layout.hditemview, hdItems);
:
setOnKeyListener (new OnKeyListener() {
onKey(...) {
:
hdItems.add(0, myEditText.getText().toString());
aa.notifyDatasetChanged();
:
}
}
}
}
hditemview.xml
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
class="com.a1.hd.hdRecordTaskListItemView"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="10dp"
android:scrollbars="vertical"
android:textColor="@color/HD_Text"
android:fadingEdge="vertical"
/>
hdRecordTaskListItemView.java
hdRecordTaskListItemView extends TextView {
// has 3 constructors
// onDraw
}
None of the constructor in hdRecordTaskListItemView get invoked and not surprisingly onDraw does not get called either. What is missing? - any suggestions or questions - please let me know. The text appears with the default style. The onDraw is supposed to draw on the "canvas". Thank you