diff options
-rw-r--r-- | res/drawable-hdpi/action_navigation_previous_light.png | bin | 0 -> 627 bytes | |||
-rw-r--r-- | res/drawable-hdpi/overflow_options_menu.png | bin | 0 -> 342 bytes | |||
-rw-r--r-- | res/drawable-mdpi/action_navigation_previous_light.png | bin | 0 -> 409 bytes | |||
-rw-r--r-- | res/drawable-mdpi/overflow_options_menu.png | bin | 0 -> 216 bytes | |||
-rw-r--r-- | res/drawable-xhdpi/action_navigation_previous_light.png | bin | 0 -> 810 bytes | |||
-rw-r--r-- | res/drawable-xhdpi/overflow_options_menu.png | bin | 0 -> 355 bytes | |||
-rw-r--r-- | res/drawable-xxhdpi/action_navigation_previous_light.png | bin | 0 -> 1327 bytes | |||
-rw-r--r-- | res/drawable-xxhdpi/overflow_options_menu.png | bin | 0 -> 617 bytes | |||
-rw-r--r-- | res/drawable/handle_left.png | bin | 370 -> 0 bytes | |||
-rw-r--r-- | res/layout/dynamic_grid_size_screen.xml | 4 | ||||
-rw-r--r-- | res/layout/settings_transitions_screen.xml | 66 | ||||
-rw-r--r-- | src/com/android/launcher3/Launcher.java | 12 | ||||
-rw-r--r-- | src/com/android/launcher3/TransitionEffectsFragment.java | 26 | ||||
-rw-r--r-- | src/com/android/launcher3/list/SettingsPinnedHeaderAdapter.java | 4 |
14 files changed, 67 insertions, 45 deletions
diff --git a/res/drawable-hdpi/action_navigation_previous_light.png b/res/drawable-hdpi/action_navigation_previous_light.png Binary files differnew file mode 100644 index 000000000..874466f73 --- /dev/null +++ b/res/drawable-hdpi/action_navigation_previous_light.png diff --git a/res/drawable-hdpi/overflow_options_menu.png b/res/drawable-hdpi/overflow_options_menu.png Binary files differnew file mode 100644 index 000000000..a074c10d0 --- /dev/null +++ b/res/drawable-hdpi/overflow_options_menu.png diff --git a/res/drawable-mdpi/action_navigation_previous_light.png b/res/drawable-mdpi/action_navigation_previous_light.png Binary files differnew file mode 100644 index 000000000..f50c8f2b5 --- /dev/null +++ b/res/drawable-mdpi/action_navigation_previous_light.png diff --git a/res/drawable-mdpi/overflow_options_menu.png b/res/drawable-mdpi/overflow_options_menu.png Binary files differnew file mode 100644 index 000000000..b6d614fca --- /dev/null +++ b/res/drawable-mdpi/overflow_options_menu.png diff --git a/res/drawable-xhdpi/action_navigation_previous_light.png b/res/drawable-xhdpi/action_navigation_previous_light.png Binary files differnew file mode 100644 index 000000000..22bd16362 --- /dev/null +++ b/res/drawable-xhdpi/action_navigation_previous_light.png diff --git a/res/drawable-xhdpi/overflow_options_menu.png b/res/drawable-xhdpi/overflow_options_menu.png Binary files differnew file mode 100644 index 000000000..7be3c2a4f --- /dev/null +++ b/res/drawable-xhdpi/overflow_options_menu.png diff --git a/res/drawable-xxhdpi/action_navigation_previous_light.png b/res/drawable-xxhdpi/action_navigation_previous_light.png Binary files differnew file mode 100644 index 000000000..ca3d00c4e --- /dev/null +++ b/res/drawable-xxhdpi/action_navigation_previous_light.png diff --git a/res/drawable-xxhdpi/overflow_options_menu.png b/res/drawable-xxhdpi/overflow_options_menu.png Binary files differnew file mode 100644 index 000000000..a0cb8a418 --- /dev/null +++ b/res/drawable-xxhdpi/overflow_options_menu.png diff --git a/res/drawable/handle_left.png b/res/drawable/handle_left.png Binary files differdeleted file mode 100644 index b78889ec0..000000000 --- a/res/drawable/handle_left.png +++ /dev/null diff --git a/res/layout/dynamic_grid_size_screen.xml b/res/layout/dynamic_grid_size_screen.xml index 5109e73d8..f7cafaff0 100644 --- a/res/layout/dynamic_grid_size_screen.xml +++ b/res/layout/dynamic_grid_size_screen.xml @@ -21,7 +21,7 @@ android:layout_height="wrap_content" android:layout_gravity="center_vertical" android:adjustViewBounds="true" - android:src="@drawable/handle_left" /> + android:src="@drawable/action_navigation_previous_light" /> <TextView android:layout_width="wrap_content" @@ -29,7 +29,7 @@ android:text="@string/grid_size_text" android:textAllCaps="true" android:fontFamily="sans-serif-condensed" - android:textColor="@android:color/white" + android:textColor="@color/listitem_text" android:layout_gravity="center_vertical" android:textSize="16sp" /> </LinearLayout> diff --git a/res/layout/settings_transitions_screen.xml b/res/layout/settings_transitions_screen.xml index 8457841a5..dd47636e2 100644 --- a/res/layout/settings_transitions_screen.xml +++ b/res/layout/settings_transitions_screen.xml @@ -7,32 +7,54 @@ android:paddingTop="@dimen/overview_panel_bottom_padding" android:clickable="true" > - <LinearLayout - android:id="@+id/transition_title" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:orientation="horizontal" - android:background="@drawable/listitem_bg" - android:clickable="true" > + <RelativeLayout + android:layout_width="wrap_content" + android:layout_height="wrap_content"> - <ImageView - android:layout_width="wrap_content" + <LinearLayout + android:id="@+id/transition_title" + android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_gravity="center_vertical" - android:adjustViewBounds="true" - android:src="@drawable/handle_left" /> + android:orientation="horizontal" + android:background="@drawable/listitem_bg" + android:layout_alignParentLeft="true" + android:clickable="true" > - <TextView - android:id="@+id/transition_effect_title" + <ImageView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center_vertical" + android:adjustViewBounds="true" + android:src="@drawable/action_navigation_previous_light" /> + + <TextView + android:id="@+id/transition_effect_title" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/scroll_effect_text" + android:textAllCaps="true" + android:textColor="@color/listitem_text" + android:layout_gravity="center_vertical" + android:textSize="16sp" /> + </LinearLayout> + + <LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="@string/scroll_effect_text" - android:textAllCaps="true" - android:fontFamily="sans-serif-condensed" - android:textColor="@android:color/white" - android:layout_gravity="center_vertical" - android:textSize="16sp" /> - </LinearLayout> + android:orientation="horizontal" + android:layout_alignParentRight="true" + android:background="@drawable/listitem_bg" + android:clickable="true" > + + <ImageView + android:id="@+id/transition_options_menu" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="right" + android:adjustViewBounds="true" + android:src="@drawable/overflow_options_menu" /> + </LinearLayout> + </RelativeLayout> <ImageView android:id="@+id/settings_transition_image" @@ -48,4 +70,4 @@ android:layout_height="wrap_content" android:listSelector="@android:color/transparent" android:splitMotionEvents="false"/> -</LinearLayout> +</LinearLayout>
\ No newline at end of file diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java index 2ddb5271c..17ddb7e7e 100644 --- a/src/com/android/launcher3/Launcher.java +++ b/src/com/android/launcher3/Launcher.java @@ -1450,7 +1450,7 @@ public class Launcher extends Activity anim.addListener(mAnimatorListener); } - public void onClickTransitionEffectOverflowMenuButton(View v) { + public void onClickTransitionEffectOverflowMenuButton(View v, final boolean drawer) { final PopupMenu popupMenu = new PopupMenu(this, v); final Menu menu = popupMenu.getMenu(); @@ -1458,22 +1458,22 @@ public class Launcher extends Activity MenuItem pageOutlines = menu.findItem(R.id.scrolling_page_outlines); MenuItem fadeAdjacent = menu.findItem(R.id.scrolling_fade_adjacent); - pageOutlines.setVisible(!isAllAppsVisible()); + pageOutlines.setVisible(!drawer); pageOutlines.setChecked(SettingsProvider.getBoolean(this, SettingsProvider.SETTINGS_UI_HOMESCREEN_SCROLLING_PAGE_OUTLINES, R.bool.preferences_interface_homescreen_scrolling_page_outlines_default )); fadeAdjacent.setChecked(SettingsProvider.getBoolean(this, - !isAllAppsVisible() ? + !drawer ? SettingsProvider.SETTINGS_UI_HOMESCREEN_SCROLLING_FADE_ADJACENT : SettingsProvider.SETTINGS_UI_DRAWER_SCROLLING_FADE_ADJACENT, - !isAllAppsVisible() ? + !drawer ? R.bool.preferences_interface_homescreen_scrolling_fade_adjacent_default : R.bool.preferences_interface_drawer_scrolling_fade_adjacent_default )); - final PagedView pagedView = !isAllAppsVisible() ? mWorkspace : mAppsCustomizeContent; + final PagedView pagedView = !drawer ? mWorkspace : mAppsCustomizeContent; popupMenu.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() { @Override @@ -1486,7 +1486,7 @@ public class Launcher extends Activity break; case R.id.scrolling_fade_adjacent: SettingsProvider.get(Launcher.this).edit() - .putBoolean(!isAllAppsVisible() ? + .putBoolean(!drawer ? SettingsProvider.SETTINGS_UI_HOMESCREEN_SCROLLING_FADE_ADJACENT : SettingsProvider.SETTINGS_UI_DRAWER_SCROLLING_FADE_ADJACENT, !item.isChecked()).commit(); pagedView.setFadeInAdjacentScreens(!item.isChecked()); 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) { diff --git a/src/com/android/launcher3/list/SettingsPinnedHeaderAdapter.java b/src/com/android/launcher3/list/SettingsPinnedHeaderAdapter.java index b09d1d716..35949e049 100644 --- a/src/com/android/launcher3/list/SettingsPinnedHeaderAdapter.java +++ b/src/com/android/launcher3/list/SettingsPinnedHeaderAdapter.java @@ -312,7 +312,7 @@ public class SettingsPinnedHeaderAdapter extends PinnedHeaderListAdapter { mLauncher.onClickTransitionEffectButton(v, true); break; case 1: - onClickTransitionEffectButton(); + onClickSortButton(); break; case 2: onIconLabelsBooleanChanged(v, @@ -380,7 +380,7 @@ public class SettingsPinnedHeaderAdapter extends PinnedHeaderListAdapter { ((TextView) v.findViewById(R.id.item_state)).setText(state); } - private void onClickTransitionEffectButton() { + private void onClickSortButton() { int sort = SettingsProvider.getIntCustomDefault(mLauncher, SettingsProvider.SETTINGS_UI_DRAWER_SORT_MODE, 0); |