summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/BaseContainerView.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/launcher3/BaseContainerView.java')
-rw-r--r--src/com/android/launcher3/BaseContainerView.java15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/com/android/launcher3/BaseContainerView.java b/src/com/android/launcher3/BaseContainerView.java
index ac2afa944..0f1585a4a 100644
--- a/src/com/android/launcher3/BaseContainerView.java
+++ b/src/com/android/launcher3/BaseContainerView.java
@@ -17,6 +17,7 @@
package com.android.launcher3;
import android.content.Context;
+import android.content.res.Resources;
import android.graphics.Rect;
import android.util.AttributeSet;
import android.util.Log;
@@ -25,6 +26,8 @@ import android.view.ViewStub;
import android.widget.LinearLayout;
import android.widget.TextView;
+import com.android.launcher3.settings.SettingsProvider;
+
/**
* A base container view, which supports resizing.
*/
@@ -100,9 +103,13 @@ public abstract class BaseContainerView extends LinearLayout implements Insettab
});
}
- public final void setUseScrubber(boolean use) {
- mUseScrubber = use;
- if (use) {
+ public final void setScroller() {
+ Context context = getContext();
+ boolean useHorizontalScroller= SettingsProvider.getBoolean(context,
+ SettingsProvider.SETTINGS_UI_USE_HORIZONTAL_SCRUBBER,
+ R.bool.preferences_interface_use_horizontal_scrubber_default);
+ mUseScrubber = useHorizontalScroller;
+ if (mUseScrubber) {
ViewStub stub = (ViewStub) findViewById(R.id.scrubber_container_stub);
mScrubberContainerView = stub.inflate();
if (mScrubberContainerView == null) {
@@ -128,7 +135,7 @@ public abstract class BaseContainerView extends LinearLayout implements Insettab
}
}
- public final boolean userScrubber() {
+ public final boolean useScrubber() {
return mUseScrubber;
}