I have \"main_activity.xml\" which is linked to MainActivity.java class, but I wish to link my \"login_activity.xml\" to \"Login.java\" class.
public class Your_Class_Name extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.Your_XML_FileName); ... } }
This is how you do it.