Answer the question
In order to leave comments, you need to log in
Fragments in android?
There is a code:
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_re);
fragmentManager = getFragmentManager();
if(getIntent().getExtras().get(keyMessage).equals("R")) registration();
else
if(getIntent().getExtras().get(keyMessage).equals("E")) enter();
else Toast.makeText(ReActivity.this, "Error01 Please restart the application", Toast.LENGTH_SHORT).show();
}
private void enter(){
EnterFragment entFragment = new EnterFragment();
fragmentManager.beginTransaction()
.add(R.id.fragmentRE,entFragment)
.commit();
entFragment.getView().findViewById(R.id.button).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
}
});
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question