I have many activities that do the same thing overall. Is it possible to have them use the same layout? I tried using the code below, but the layout would be shifted way to left to the point where buttons would be off the screen.
setContentView(R.layout.activity_enter_pin);
TextView SecondEP = (TextView) findViewById(R.id.EnterPin);
SecondEP.setText("Enter NEW Pin");
There shouldn't be any problem with that, but if you are using the same layout to do the same thing in different
Activity
instances, you may want to look into setting up your doodad as aFragment
so it can be reused in bothActivity
s.See the Android Fragments Developer Guide for more information.