It seems that my attributes are not being read. I have the following main.xml:
- Code: Select all
<?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="wrap_content"
android:gravity="center"
android:id="@+id/layMain"
>
<android.happer.Mens
android:id="@+id/myView"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="#000000FF"
android:visibility="invisible"
/>
</LinearLayout>
It goes wrong at the point where i want to give my custum View a backgground color. The visibilty doesn't do his work either.
But, when i put the following lines in my Mens class (which extends the View class):
- Code: Select all
setBackgroundColor(Color.BLUE );
// setVisibility(INVISIBLE);
It works. Thus, when i invoke the methods in my class file it works fina, but when use the lines in the xml file, it doesn't work. How is that?
Thnx in advance



