@Override
 public void onCreate() {
   super.onCreate();
   Log.e(TAG, "onCreate");
   mNoteWidgetData = new File(getFilesDir(), NOTE_WIDGET_DATA_FILE);
   mViewContext = new ContextThemeWrapper(this, getApplicationTheme(this));
   loadWidgetsFromDisk();
 }
 @Override
 public void onConfigurationChanged(Configuration newConfig) {
   super.onConfigurationChanged(newConfig);
   Log.w(TAG, "onConfigurationChanged: " + newConfig.orientation);
   mViewContext = new ContextThemeWrapper(this, getApplicationTheme(this));
   synchronized (mWidgets) {
     for (int i = 0; i < mWidgets.size(); i++) {
       NoteWidget noteWidget = mWidgets.valueAt(i);
       noteWidget.view = createNoteView();
       updateNoteWidgetSize(noteWidget.id);
       updateWidget(noteWidget.id);
     }
   }
 }
 @Override
 public void onDestroy() {
   super.onDestroy();
   Log.e(TAG, "onDestroy");
   saveWidgetsToDisk();
 }