Unable to start activity
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/6339719/unable-to-start-activity">Unable to start activity</a>  </p>
</blockquote>



<p>Here is my Main Activity Class.</p>

<pre><code>package com.example.parth.customcomposite; import android.app.Activity; import android.os.Bundle;

public class CustomCompositeEx extends Activity {

private TwoTextWidget itemOne; private TwoTextWidget iteamTwo;

@Override

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

    setupViews();
}

private void setupViews() 
{
    itemOne=(TwoTextWidget)findViewById(R.id.list_item_one);
    itemOne.setTextOne("1.");
    itemOne.setTextTwo("Hi");

    iteamTwo.setTextTwo("2.");
    iteamTwo.setTextTwo("Hello");


}

}
</code></pre>

<p>Here is my Custom Class .</p>

<pre><code>package com.example.parth.customcomposite; 
import android.app.Activity; 
import android.content.Context; 
import android.util.AttributeSet; 
import android.widget.LinearLayout; 
import android.widget.TextView;

public class TwoTextWidget extends LinearLayout {

public TwoTextWidget(Context context, AttributeSet attrs) { super(context, attrs); }

private TextView textone; private TextView texttwo;

@Override
protected void onFinishInflate() 
{

    super.onFinishInflate();
    ((Activity)getContext()).getLayoutInflater().inflate(R.layout.twotext, this);
    setItems();
}

private void setItems() 
{
    textone=(TextView)findViewById(R.id.text_one);
    texttwo=(TextView)findViewById(R.id.text_two);
}
public void setTextOne(String text)
{
    textone.setText(text);
}
public void setTextTwo(String text)
{
    texttwo.setText(text);
}
</code></pre>

<p>My  xml  for custom view is:</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;LinearLayout
  xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="match_parent"
  android:layout_height="match_parent"&gt;
  &lt;TextView
        android:id="@+id/text_one"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_weight="1"
        &gt;&lt;/TextView&gt;
    &lt;TextView
        android:id="@+id/text_two"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_weight="9"
        &gt;&lt;/TextView&gt;
&lt;/LinearLayout&gt;
</code></pre>

<p>My main xml isL:</p>

<p>


    
</p>

<p>And my Manifest file is:</p>

<p>

    </p>

<pre><code>&lt;application android:icon="@drawable/icon" android:label="@string/app_name"&gt;
    &lt;activity android:name=".CustomCompositeEx"
              android:label="@string/app_name"&gt;
        &lt;intent-filter&gt;
            &lt;action android:name="android.intent.action.MAIN" /&gt;
            &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
        &lt;/intent-filter&gt;
    &lt;/activity&gt;

&lt;/application&gt;
</code></pre>

<p></p>
