@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();
 }