According to my <LinearLayout> I should have the custom view I created
with the TextView on it's right.  The Eclipse Layout WYSIWYG Editor
shows only the TextView, while running the application on my G1 shows
only the custom view taking up the entire screen.  As if I only had
the custom view in my <LinearLayout> with the parameters
"layout_width" and "layout_height" both set to "fill_parent".

What I should be getting is the <LinearLayout> with both views inside
of it.  Can anyone help me out?  I've searched and searched through
blogs, forums, and the android references, and I can't seem to figure
out what the problem is.  Thanks a lot!

Sidney Simmons

MY ACTIVITY:
public class AnimatedGraphics extends Activity {
        TempView view = null;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
    }
}

MY CUSTOM VIEW CLASS:
public class TempView extends View {
        Drawable temp;

        public TempView(Context context, AttributeSet attrs) {
                super(context, attrs);
                temp = (Drawable)context.getResources().getDrawable
(R.drawable.temp2);
                temp.setBounds(0, 0, 100, 300);
        }

        @Override
        public void onDraw(Canvas canvas) {
                temp.draw(canvas);
        }
}

MY XML FILE:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/
android"
    android:orientation="horizontal"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    >
<com.example.AnimatedGraphics.TempView
        android:id="@+id/tempView"
        android:background="#00545E"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        />
<TextView
        android:id="@+id/text"
        android:background="#FFFFDD"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="This is the text view!" />

</LinearLayout>

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" 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-beginners?hl=en

Reply via email to