diff --git a/app/src/main/java/com/simplemobiletools/calendar/MyWidgetProvider.java b/app/src/main/java/com/simplemobiletools/calendar/MyWidgetProvider.java
index 5ec87cb1f..e67169aa9 100644
--- a/app/src/main/java/com/simplemobiletools/calendar/MyWidgetProvider.java
+++ b/app/src/main/java/com/simplemobiletools/calendar/MyWidgetProvider.java
@@ -60,7 +60,7 @@ public class MyWidgetProvider extends AppWidgetProvider implements Calendar {
mTodayTextSize = mRes.getDimension(R.dimen.today_text_size) / mRes.getDisplayMetrics().density;
mWidgetManager = AppWidgetManager.getInstance(mContext);
- mRemoteViews = new RemoteViews(mContext.getPackageName(), R.layout.activity_main);
+ mRemoteViews = new RemoteViews(mContext.getPackageName(), R.layout.calendar_layout);
mIntent = new Intent(mContext, MyWidgetProvider.class);
setupButtons();
updateLabelColor();
diff --git a/app/src/main/java/com/simplemobiletools/calendar/activities/MainActivity.java b/app/src/main/java/com/simplemobiletools/calendar/activities/MainActivity.java
index ceb6bc191..2f0f54312 100644
--- a/app/src/main/java/com/simplemobiletools/calendar/activities/MainActivity.java
+++ b/app/src/main/java/com/simplemobiletools/calendar/activities/MainActivity.java
@@ -6,13 +6,13 @@ import android.content.res.Resources;
import android.graphics.Color;
import android.graphics.PorterDuff;
import android.os.Bundle;
+import android.support.design.widget.CoordinatorLayout;
import android.support.v7.app.AlertDialog;
import android.support.v7.app.AppCompatActivity;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.DatePicker;
-import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
@@ -74,7 +74,7 @@ public class MainActivity extends AppCompatActivity implements Calendar {
mTodayTextSize /= mRes.getDisplayMetrics().density;
setupLabels();
- final FrameLayout.LayoutParams params = (FrameLayout.LayoutParams) mCalendarHolder.getLayoutParams();
+ final CoordinatorLayout.LayoutParams params = (CoordinatorLayout.LayoutParams) mCalendarHolder.getLayoutParams();
params.setMargins(mActivityMargin, mActivityMargin, mActivityMargin, mActivityMargin);
mCalendar = new CalendarImpl(this, getApplicationContext());
diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml
index c8c51dd57..86611b499 100644
--- a/app/src/main/res/layout/activity_main.xml
+++ b/app/src/main/res/layout/activity_main.xml
@@ -1,391 +1,10 @@
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
diff --git a/app/src/main/res/layout/calendar_layout.xml b/app/src/main/res/layout/calendar_layout.xml
new file mode 100644
index 000000000..12fb4c31a
--- /dev/null
+++ b/app/src/main/res/layout/calendar_layout.xml
@@ -0,0 +1,391 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/xml/widget_info.xml b/app/src/main/res/xml/widget_info.xml
index 182b731a3..d02b3808d 100644
--- a/app/src/main/res/xml/widget_info.xml
+++ b/app/src/main/res/xml/widget_info.xml
@@ -1,9 +1,8 @@
-
+ android:updatePeriodMillis="18000000"/>