summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/TransitionEffectsFragment.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/launcher3/TransitionEffectsFragment.java')
-rw-r--r--src/com/android/launcher3/TransitionEffectsFragment.java26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/com/android/launcher3/TransitionEffectsFragment.java b/src/com/android/launcher3/TransitionEffectsFragment.java
index bb7c5abf2..8f51e2435 100644
--- a/src/com/android/launcher3/TransitionEffectsFragment.java
+++ b/src/com/android/launcher3/TransitionEffectsFragment.java
@@ -2,19 +2,13 @@ package com.android.launcher3;
import android.animation.Animator;
import android.animation.ObjectAnimator;
-import android.animation.ValueAnimator;
import android.app.Fragment;
import android.content.Context;
-import android.content.Intent;
-import android.content.res.Resources;
import android.content.res.TypedArray;
-import android.graphics.Bitmap;
-import android.graphics.BitmapFactory;
import android.graphics.Color;
import android.graphics.drawable.AnimationDrawable;
import android.os.Bundle;
import android.util.DisplayMetrics;
-import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
@@ -24,7 +18,6 @@ import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ListView;
-import android.widget.ScrollView;
import android.widget.TextView;
import com.android.launcher3.settings.SettingsProvider;
@@ -40,7 +33,7 @@ public class TransitionEffectsFragment extends Fragment {
TypedArray mTransitionDrawables;
String mCurrentState;
int mCurrentPosition;
- boolean mPageOrDrawer;
+ boolean mIsDrawer;
String mSettingsProviderValue;
int mPreferenceValue;
@@ -78,19 +71,19 @@ public class TransitionEffectsFragment extends Fragment {
View v = inflater.inflate(R.layout.settings_transitions_screen, container, false);
mListView = (ListView) v.findViewById(R.id.settings_transitions_list);
- Launcher launcher = (Launcher) getActivity();
+ final Launcher launcher = (Launcher) getActivity();
LinearLayout.LayoutParams lp = (LinearLayout.LayoutParams)
mListView.getLayoutParams();
lp.bottomMargin = ((FrameLayout.LayoutParams) launcher.getOverviewPanel()
.findViewById(R.id.settings_container).getLayoutParams()).bottomMargin;
mListView.setLayoutParams(lp);
- mPageOrDrawer = getArguments().getBoolean(PAGE_OR_DRAWER_SCROLL_SELECT);
+ mIsDrawer = getArguments().getBoolean(PAGE_OR_DRAWER_SCROLL_SELECT);
- mSettingsProviderValue = mPageOrDrawer ?
+ mSettingsProviderValue = mIsDrawer ?
SettingsProvider.SETTINGS_UI_DRAWER_SCROLLING_TRANSITION_EFFECT
: SettingsProvider.SETTINGS_UI_HOMESCREEN_SCROLLING_TRANSITION_EFFECT;
- mPreferenceValue = mPageOrDrawer ? R.string.preferences_interface_drawer_scrolling_transition_effect
+ mPreferenceValue = mIsDrawer ? R.string.preferences_interface_drawer_scrolling_transition_effect
: R.string.preferences_interface_homescreen_scrolling_transition_effect;
mTransitionIcon = (ImageView) v.findViewById(R.id.settings_transition_image);
@@ -103,6 +96,13 @@ public class TransitionEffectsFragment extends Fragment {
setEffect();
}
});
+ View options = v.findViewById(R.id.transition_options_menu);
+ options.setOnClickListener(new OnClickListener() {
+ @Override
+ public void onClick(View view) {
+ launcher.onClickTransitionEffectOverflowMenuButton(view, mIsDrawer);
+ }
+ });
String[] titles = getResources().getStringArray(
R.array.transition_effect_entries);
@@ -124,7 +124,7 @@ public class TransitionEffectsFragment extends Fragment {
}
public void setEffect() {
- ((Launcher) getActivity()).setTransitionEffect(mPageOrDrawer, mCurrentState);
+ ((Launcher) getActivity()).setTransitionEffect(mIsDrawer, mCurrentState);
}
private int mapEffectToPosition(String effect) {