summaryrefslogtreecommitdiff
path: root/src/com/android/customization/widget/OptionSelectorController.java
diff options
context:
space:
mode:
authorSantiago Etchebehere <santie@google.com>2019-01-04 17:33:45 -0800
committerSantiago Etchebehere <santie@google.com>2019-01-09 09:45:03 -0800
commit273f655433f291fc75523409c07b4a51c4c93f0c (patch)
treef2de0a91616602e5fd5a68dc28ff435d6eb1ebb1 /src/com/android/customization/widget/OptionSelectorController.java
parent33d18cc315f76c3078e632bb00950e9059184352 (diff)
[ThemePicker 6/N] Create the theme tiles
Add a view for the tiles representing each option in the theme section. Bug: 120559294 Change-Id: If7590813b6509cc9e78d7ebca3123f24c8c07593
Diffstat (limited to 'src/com/android/customization/widget/OptionSelectorController.java')
-rw-r--r--src/com/android/customization/widget/OptionSelectorController.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/com/android/customization/widget/OptionSelectorController.java b/src/com/android/customization/widget/OptionSelectorController.java
index 6ffa0e67..dc14cfcd 100644
--- a/src/com/android/customization/widget/OptionSelectorController.java
+++ b/src/com/android/customization/widget/OptionSelectorController.java
@@ -15,6 +15,7 @@
*/
package com.android.customization.widget;
+import android.content.res.Resources;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@@ -118,6 +119,9 @@ public class OptionSelectorController {
mContainer.setLayoutManager(new LinearLayoutManager(mContainer.getContext(),
LinearLayoutManager.HORIZONTAL, false));
+ Resources res = mContainer.getContext().getResources();
+ mContainer.addItemDecoration(new HorizontalSpacerItemDecoration(
+ res.getDimensionPixelOffset(R.dimen.option_tile_margin_horizontal)));
mContainer.setAdapter(mAdapter);
}