Saved the app as a module and trying to run an activity (or fragment) in another app . But almost all fields return null . The essence of the problem is to make a module from the current app so that you can use this activity or a fragment in another application. Any ideas? Thank.
Original activity:
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); btnFlip = (ImageButton) findViewById(R.id.btnFlip); btnQrCode = (ImageButton) findViewById(R.id.btnQr); as I launch it in the new app:
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); Intent i = new Intent(this, com.android.sliderview.MainActivity.class); startActivity(i); But I get null, it looks in the module when debugging:
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); this.setContentView(layout.activity_main); this.btnFlip = (ImageButton)this.findViewById(id.btnFlip); // btnFlip: null this.btnQrCode = (ImageButton)this.findViewById(id.btnQr); // btnQrCode: null