Fragment not changing size of textview
I have an event the should change the size of a textview in my new
fragment that I create the textview is created in my relative layout
shared by my new fragment and my old fragment:
Fragment1 rightFragment;
rightFragment = new Fragment1();
Bundle args = new Bundle();
args.putInt("args", arguments);
rightFragment.setArguments(args);
android.support.v4.app.FragmentTransaction transaction =
getSupportFragmentManager()
.beginTransaction();
transaction.replace(R.id.fragment_container, rightFragment);
transaction.addToBackStack(null);
transaction.commit();
TextView textView = (TextView) findViewById(R.id.text);
textView.setTextSize(settings.getFloat("size", 24.0f));
When I execute this code in my activity, the textView in my old relative
layout is changed, not the new one. How can I make the textView in my new
layout work?
No comments:
Post a Comment