Q:

Display a popup on long click in extended EditText class

I try to write a derived class of EditText for use on with dates
public class myEditDate extends EditText {
    protected Context mContext; // Current activity
    ...

It work fine and i add some utils date functions but i try to display a popup windows with a CalendarView widget.
on LongClickListener event i call 
private void ShowCalendar()
{
    LayoutInflater layoutInflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
    mv_CALENDAR = layoutInflater.inflate(R.layout.editdate_calendar, null);

    final PopupWindow popupWindow = new PopupWindow(mv_CALENDAR, 400, 400);
}

I have an error : 
   editdate_calendar cannot be resolved or is not a field

I think it's because i am into a field class and not into an activity class
How i can solve it
editdate_calendar.xml :
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:id="@+id/layout"
  android:layout_width="wrap_content"
  android:layout_height="wrap_content">
 <CalendarView
    android:id="@+id/calendarView"
    android:layout_width="match_parent"
    android:layout_height="400dp"
    android:clickable="true"
    android:showWeekNumber="false" />
 </LinearLayout>

A:

I found it : 
Replace 
    import android.R;
by
    import myPackage.R;
Sorry, I use CTRL + Shift + o to add missing imports and not see it

