I need to start an activity in my native Java, I access my xml by R.Java I put my file in res folder according to here but i get error generating R.Java after i run my module in titanium.
my code is :
public class MFActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); //setContentView(0x7f030000); Log.d("comment", "inside"); }if i dont add res folder i just get the black screen, with no error. I can get "inside" in ddms too. but my "activity_main" cannot display How can I show my content ? any help appreciated
I start my activity in below code :
Log.d("comment", "before"); Activity activity = TiApplication.getAppCurrentActivity(); Intent intent = new Intent(activity,MyActivity.class); intent.setAction(Intent.ACTION_MAIN); activity.startActivity(intent); Log.d("comment", "after");