Quantcast
Viewing all articles
Browse latest Browse all 8068

Native android java module for titanium doesn't generate r.java and setcontent of xml layout

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");

Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>