Hmm. That is not working for whatever reason. Here is my code.
in the activity:
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
LinearLayout ll = (LinearLayout)findViewById(R.id.homeLeftBox);
StudentListing sl = new StudentListing(this);
ll.addView(sl);
}
StudentListing.java:
public class StudentListing extends EditText {
public StudentListing(Context context) {
super(context);
construct(context);
}
private void construct(Context context) {
this.setText("This needs to show up on the screen");
}
the main.xml:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="fill_parent"
android:layout_width="fill_parent">
<LinearLayout
android:orientation="horizontal"
android:layout_width="800dp"
android:layout_height="400dp"
android:layout_centerInParent="true">
<TableLayout android:orientation="horizontal"
android:layout_height="400dp"
android:layout_width="fill_parent">
<TableRow>
<LinearLayout android:orientation="vertical"
android:layout_height="400dp"
android:layout_width="400dp"
android:layout_weight="1" android:padding="10dp"
android:id="@+id/homeLeftBox">
<LinearLayout android:id="@+id/welcome_current_user"
android:layout_height="150dp"
android:layout_width="fill_parent"
android:orientation="horizontal">
</LinearLayout>
</LinearLayout>
</TableRow>
</TableLayout>
</LinearLayout>
</RelativeLayout>
Thanks again!!!
--
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