@Override
 public void onCreate(Bundle savedInstanceState) {
   OnViewChangedNotifier previousNotifier =
       OnViewChangedNotifier.replaceNotifier(onViewChangedNotifier_);
   init_(savedInstanceState);
   super.onCreate(savedInstanceState);
   OnViewChangedNotifier.replaceNotifier(previousNotifier);
 }
 @Test
 public void after_views_mother_calls_first() {
   OnViewChangedNotifier notifier = new OnViewChangedNotifier();
   OnViewChangedNotifier.replaceNotifier(notifier);
   Child_ child = Child_.getInstance_(mock(Activity.class));
   notifier.notifyViewChanged(mock(HasViews.class));
   assertThat(child.motherInitViewsWasCalled).isTrue();
 }
Пример #3
0
 @Override
 public void onCreate(Bundle savedInstanceState) {
   OnViewChangedNotifier previousNotifier =
       OnViewChangedNotifier.replaceNotifier(onViewChangedNotifier_);
   init_(savedInstanceState);
   super.onCreate(savedInstanceState);
   OnViewChangedNotifier.replaceNotifier(previousNotifier);
   setContentView(layout.activity_main);
 }
 @Override
 public void setContentView(View view) {
   super.setContentView(view);
   onViewChangedNotifier_.notifyViewChanged(this);
 }
 @Override
 public void setContentView(View view, LayoutParams params) {
   super.setContentView(view, params);
   onViewChangedNotifier_.notifyViewChanged(this);
 }
 @Override
 public void setContentView(int layoutResID) {
   super.setContentView(layoutResID);
   onViewChangedNotifier_.notifyViewChanged(this);
 }
 private void init_(Bundle savedInstanceState) {
   OnViewChangedNotifier.registerOnViewChangedListener(this);
 }
Пример #8
0
 @Override
 public void onViewCreated(View view, Bundle savedInstanceState) {
   super.onViewCreated(view, savedInstanceState);
   onViewChangedNotifier_.notifyViewChanged(this);
 }
Пример #9
0
 private void init_(Bundle savedInstanceState) {
   OnViewChangedNotifier.registerOnViewChangedListener(this);
   newAdapter = NewAdapter_.getInstance_(getActivity());
   init();
 }
Пример #10
0
 private void init_(Bundle savedInstanceState) {
   OnViewChangedNotifier.registerOnViewChangedListener(this);
   requestWindowFeature(1);
   init();
 }