Advertisement
Guest User

Untitled

a guest
May 23rd, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.56 KB | None | 0 0
  1. //Load the new landscape layout for both fragment and adapter
  2.     @Override
  3.     public void onConfigurationChanged(Configuration newConfig) {
  4.         super.onConfigurationChanged(newConfig);
  5.         LayoutInflater inflater = (LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
  6.         View newView = inflater.inflate(R.layout.fragment_payment_cards, null);
  7.         ViewGroup rootView = (ViewGroup) getView();
  8.         rootView.removeAllViews();
  9.         rootView.addView(newView);
  10.         initLayout(root);
  11.         loadData();
  12.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement