I have this Layout:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<com.ui.library.actionbar.ActionBar
android:id="@+id/actionBar1"
style="@style/ActionBar"
android:layout_width="wrap_content"
android:layout_height="48dip"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true" />
<com.cidaut.moveo.calendar.ui.calendar.SingleCalendar
android:id="@+id/singleCalendar1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@+id/view1"
android:layout_below="@+id/actionBar1" />
<RelativeLayout
android:id="@+id/view1"
android:layout_width="match_parent"
android:layout_height="48dip"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:background="@color/dark_gray" >
<Button
android:id="@+id/buttonFiltros"
style="@style/MetroButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:padding="8dip"
android:text="@string/filter" />
</RelativeLayout>
</RelativeLayout>
Everything works as expected. However, when I call findViewById in my Activity to find R.id.singleCalendar1, it returns null.
I’ve tried cleaning and updating to no avail.
I thought of inflating the view using LayoutInflater.from(this).inflate(R.id.calendar_layout, null), finding its children, and then finding singleCalendar1 ID…

I really don’t know what to do. Any hindsight is pretty much appreciated.
I think I have an idea what’s going on here… maybe it’s a part of the dialog thats effing with you?
Suppose something like this
try this
Try referencing from the parent. Or please post more code where this layout is being pulled-in / used.
Also, do you have a proper constructor for the single calendar object?
You need this one
which will call super(context, attrs);
maybe that fixes it.