How to use a project as a library in another project?
<pre><code>My Rgactivity  code is here:

package com.apcl.skd;

import android.app.Activity;
import android.graphics.Color;
import android.os.Bundle;
import android.widget.LinearLayout;

public class RgActivity extends Activity {
    /** Called when the activity is first created. */

    LinearLayout lv1, lv2;


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

        lv1=(LinearLayout)findViewById(R.id.lv1);
        lv2=(LinearLayout)findViewById(R.id.lv2);

        setColor(Color.BLACK,Color.RED);

    }

    public void setColor(int c, int d){

        lv1.setBackgroundColor(c);
        lv2.setBackgroundColor(d);

    }


}
</code></pre>

<p>Now in another project i use this RgActivity project as a library file and now i want this setcolor method use on that another project, So in a new project I imported this project as a library and did the following:</p>

<pre><code>package com.pack.color;

import com.apcl.skd.RgActivity;

import android.app.Activity;
import android.graphics.Color;
import android.os.Bundle;
import android.widget.LinearLayout;

public class ColorActivity extends RgActivity {
    /** Called when the activity is first created. */
    LinearLayout lv1,lv2;
@Override
public void onCreate(Bundle savedInstanceState) {
    // TODO Auto-generated method stub
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);
    lv1=(LinearLayout)findViewById(R.id.lv1);
    lv2=(LinearLayout)findViewById(R.id.lv2);

    setColor(Color.BLACK,Color.BLUE);



}



}
</code></pre>

<p>but nothing is changed in the layout when i run it, how to make this work?</p>
