2 xml android calendar
<p>I am making a calendar application for a long time now, and have a problem with coloring text on my calendar. I have 2 xml, first - main, second - TextView for grid cell.</p>

<pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"&gt;

&lt;TextView  
    android:id="@+id/CalTitle"
    android:layout_width="fill_parent" 
    android:layout_height ="wrap_content" 
    android:text="@string/hello"
    android:gravity="center"
     /&gt;
&lt;GridView xmlns:android="http://schemas.android.com/apk/res/android" 
    android:id="@+id/CalGrid"
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    android:numColumns="7"
    android:horizontalSpacing="2dp"
    android:verticalSpacing="2dp"
/&gt;
</code></pre>

<h2>    </h2>

<pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;TextView xmlns:android = "http://schemas.android.com/apk/res/android"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:textSize="14px"
    android:gravity="center" 
    android:clickable="true" 
    android:hapticFeedbackEnabled="true" 
    android:textColor="#FFFFFF" 
    android:height="50px"
    android:id="@+id/GridText"
    /&gt;
</code></pre>

<p>There are some methods for drawing calendar and populating, but I am having a problem with line</p>

<p>GridText.setTextColor(Color.RED) it throws me NullPointException error, I guess that is because -> setContentView (R.layout.main); in onCreate method, however i am stuck with my white font color. So the problem is targeting GridText view...</p>

<p>edit:</p>

<pre><code>public void onCreate (Bundle savedInstanceState) {
        super.onCreate (savedInstanceState);
        setContentView (R.layout.main);
        CalendarDataSet ();
        CalendarSet ();
        DrawCalendar();


    }
</code></pre>
