diff --git a/res/layout/fragment_grid_picker.xml b/res/layout/fragment_grid_picker.xml
index 536f1f7..db28f60 100644
--- a/res/layout/fragment_grid_picker.xml
+++ b/res/layout/fragment_grid_picker.xml
@@ -46,6 +46,7 @@
             android:layout_width="match_parent"
             android:layout_height="wrap_content">
             <Button
+                android:id="@+id/apply_button"
                 style="@style/ActionPrimaryButton"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
diff --git a/src/com/android/customization/model/grid/LauncherGridOptionsProvider.java b/src/com/android/customization/model/grid/LauncherGridOptionsProvider.java
index d43cdc7..8e7450f 100644
--- a/src/com/android/customization/model/grid/LauncherGridOptionsProvider.java
+++ b/src/com/android/customization/model/grid/LauncherGridOptionsProvider.java
@@ -16,6 +16,7 @@
 package com.android.customization.model.grid;
 
 import android.content.ContentResolver;
+import android.content.ContentValues;
 import android.content.Context;
 import android.content.pm.ProviderInfo;
 import android.content.res.Resources;
@@ -40,6 +41,7 @@
 
     private static final String LIST_OPTIONS = "list_options";
     private static final String PREVIEW = "preview";
+    private static final String DEFAULT_GRID = "default_grid";
 
     private static final String COL_NAME = "name";
     private static final String COL_ROWS = "rows";
@@ -111,6 +113,13 @@
     }
 
     void applyGrid(String name) {
-        //TODO: implement
+        Uri updateDefaultUri = new Uri.Builder()
+                .scheme(ContentResolver.SCHEME_CONTENT)
+                .authority(mProviderInfo.authority)
+                .appendPath(DEFAULT_GRID)
+                .build();
+        ContentValues values = new ContentValues();
+        values.put("name", name);
+        mContext.getContentResolver().update(updateDefaultUri, values, null, null);
     }
 }
diff --git a/src/com/android/customization/picker/grid/GridFragment.java b/src/com/android/customization/picker/grid/GridFragment.java
index 6733cb5..20fa720 100644
--- a/src/com/android/customization/picker/grid/GridFragment.java
+++ b/src/com/android/customization/picker/grid/GridFragment.java
@@ -16,14 +16,20 @@
 package com.android.customization.picker.grid;
 
 import android.app.Activity;
+import android.content.res.Resources;
+import android.graphics.drawable.BitmapDrawable;
 import android.net.Uri;
 import android.os.Bundle;
+import android.util.DisplayMetrics;
 import android.view.LayoutInflater;
 import android.view.View;
+import android.view.View.OnLayoutChangeListener;
 import android.view.ViewGroup;
+import android.widget.ImageView;
 
 import androidx.annotation.NonNull;
 import androidx.annotation.Nullable;
+import androidx.cardview.widget.CardView;
 import androidx.recyclerview.widget.RecyclerView;
 
 import com.android.customization.model.grid.GridOption;
@@ -35,6 +41,9 @@
 import com.android.wallpaper.R;
 import com.android.wallpaper.asset.Asset;
 import com.android.wallpaper.asset.ContentUriAsset;
+import com.android.wallpaper.model.WallpaperInfo;
+import com.android.wallpaper.module.CurrentWallpaperInfoFactory;
+import com.android.wallpaper.module.InjectorProvider;
 import com.android.wallpaper.picker.ToolbarFragment;
 
 import com.bumptech.glide.request.RequestOptions;
@@ -44,6 +53,13 @@
  */
 public class GridFragment extends ToolbarFragment {
 
+    private boolean mIsWallpaperInfoReady;
+    private WallpaperInfo mHomeWallpaper;
+    private float mScreenAspectRatio;
+    private int mPageHeight;
+    private int mPageWidth;
+    private GridPreviewAdapter mAdapter;
+
     public static GridFragment newInstance(CharSequence title, GridOptionsManager manager) {
         GridFragment fragment = new GridFragment();
         fragment.setManager(manager);
@@ -66,8 +82,35 @@
         setUpToolbar(view);
         mPreviewPager = view.findViewById(R.id.grid_preview_pager);
         mOptionsContainer = view.findViewById(R.id.options_container);
+        final Resources res = getContext().getResources();
+        DisplayMetrics dm = res.getDisplayMetrics();
+        mScreenAspectRatio = (float) dm.heightPixels / dm.widthPixels;
         setUpOptions();
+        view.findViewById(R.id.apply_button).setOnClickListener(v -> {
+            mGridManager.apply(mSelectedOption);
+            getActivity().finish();
+        });
+        CurrentWallpaperInfoFactory factory = InjectorProvider.getInjector()
+                .getCurrentWallpaperFactory(getActivity().getApplicationContext());
 
+        factory.createCurrentWallpaperInfos((homeWallpaper, lockWallpaper, presentationMode) -> {
+            mHomeWallpaper = homeWallpaper;
+            mIsWallpaperInfoReady = true;
+            if (mAdapter != null) {
+                mAdapter.onWallpaperInfoLoaded();
+            }
+        }, false);
+        view.addOnLayoutChangeListener(new OnLayoutChangeListener() {
+            @Override
+            public void onLayoutChange(View v, int left, int top, int right, int bottom,
+                    int oldLeft, int oldTop, int oldRight, int oldBottom) {
+                mPageHeight = mPreviewPager.getHeight() - mPreviewPager.getPaddingTop() -
+                        res.getDimensionPixelSize(R.dimen.indicator_container_height);
+                mPageWidth = (int) (mPageHeight / mScreenAspectRatio);
+                mPreviewPager.forceCardWidth(mPageWidth);
+                view.removeOnLayoutChangeListener(this);
+            }
+        });
         return view;
     }
 
@@ -76,7 +119,8 @@
     }
 
     private void createAdapter() {
-        mPreviewPager.setAdapter(new GridPreviewAdapter(mSelectedOption));
+        mAdapter = new GridPreviewAdapter(mSelectedOption);
+        mPreviewPager.setAdapter(mAdapter);
     }
 
     private void setUpOptions() {
@@ -101,13 +145,15 @@
         });
     }
 
-    private static class GridPreviewPage extends PreviewPage {
+    private class GridPreviewPage extends PreviewPage {
         private final int mPageId;
         private final Asset mPreviewAsset;
         private final int mCols;
         private final int mRows;
         private final Activity mActivity;
 
+		private ImageView mPreview;
+
         private GridPreviewPage(Activity activity, int id, Uri previewUri, int rows, int cols) {
             super(null);
             mPageId = id;
@@ -118,9 +164,28 @@
             mActivity = activity;
         }
 
+        @Override
+        public void setCard(CardView card) {
+        	super.setCard(card);
+        	mPreview = card.findViewById(R.id.grid_preview_image);
+        }
+
         public void bindPreviewContent() {
-            mPreviewAsset.loadDrawable(mActivity, card.findViewById(R.id.grid_preview_image),
-                    card.getContext().getResources().getColor(R.color.primary_color, null));
+            Resources resources = card.getResources();
+            bindWallpaperIfAvailable();
+            mPreviewAsset.loadDrawable(mActivity, mPreview,
+                    resources.getColor(android.R.color.transparent, null));
+        }
+
+        void bindWallpaperIfAvailable() {
+            if (card != null && mIsWallpaperInfoReady && mHomeWallpaper != null) {
+                mHomeWallpaper.getThumbAsset(card.getContext()).decodeBitmap(mPageWidth,
+                        mPageHeight,
+                        bitmap -> {
+                            mPreview.setBackground(
+                                    new BitmapDrawable(card.getResources(), bitmap));
+                        });
+            }
         }
     }
     /**
@@ -138,5 +203,11 @@
                         gridOption.rows, gridOption.cols));
             }
         }
+
+        void onWallpaperInfoLoaded() {
+            for (GridPreviewPage page : mPages) {
+                page.bindWallpaperIfAvailable();
+            }
+        }
     }
 }
diff --git a/src/com/android/customization/widget/PreviewPager.java b/src/com/android/customization/widget/PreviewPager.java
index 0ea43fc..ff13284 100644
--- a/src/com/android/customization/widget/PreviewPager.java
+++ b/src/com/android/customization/widget/PreviewPager.java
@@ -82,6 +82,20 @@
         mViewPager.addOnPageChangeListener(mPageListener);
     }
 
+    public void forceCardWidth(int widthPixels) {
+        mViewPager.addOnLayoutChangeListener(new OnLayoutChangeListener() {
+            @Override
+            public void onLayoutChange(View v, int left, int top, int right, int bottom,
+                    int oldLeft, int oldTop, int oldRight, int oldBottom) {
+                int hPadding = (mViewPager.getWidth() - widthPixels) / 2;
+                mViewPager.setPadding(hPadding, mViewPager.getPaddingTop(),
+                        hPadding, mViewPager.getPaddingBottom());
+                mViewPager.removeOnLayoutChangeListener(this);
+            }
+        });
+        mViewPager.invalidate();
+    }
+
     /**
      * Call this method to set the {@link PagerAdapter} backing the {@link ViewPager} in this
      * widget.
