mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-19 02:38:20 +00:00
Fixing a few landscape issues.
- Fixing issue where widgets/icon names from side pages show in landscape (Bug 5665226) - Fixing issue where the workspace was rendering over the hotseat in landscape (Bug 5665226) - Fixing regression where the market button had no press feedback Change-Id: Idcd890fdddab2d463195c9b3000fe7a0ab357200
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
-->
|
||||
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_focused="true" android:drawable="@drawable/focused_bg" />
|
||||
<item android:state_pressed="true" android:drawable="@drawable/home_press" />
|
||||
<item android:state_focused="true" android:drawable="@drawable/tab_unselected_focused_holo" />
|
||||
<item android:state_pressed="true" android:drawable="@drawable/tab_unselected_focused_holo" />
|
||||
<item android:drawable="@android:color/transparent" />
|
||||
</selector>
|
||||
|
||||
@@ -22,29 +22,6 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<!-- Keep these behind the workspace so that they are not visible when
|
||||
we go into AllApps -->
|
||||
<include
|
||||
android:id="@+id/qsb_divider"
|
||||
layout="@layout/workspace_divider"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="@dimen/qsb_bar_height"
|
||||
android:layout_gravity="left" />
|
||||
<include
|
||||
android:id="@+id/dock_divider"
|
||||
layout="@layout/workspace_divider"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginRight="@dimen/button_bar_height"
|
||||
android:layout_gravity="right" />
|
||||
<include
|
||||
android:id="@+id/paged_view_indicator"
|
||||
layout="@layout/scroll_indicator"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom" />
|
||||
|
||||
<!-- The workspace contains 5 screens of cells -->
|
||||
<com.android.launcher2.Workspace
|
||||
android:id="@+id/workspace"
|
||||
@@ -66,6 +43,27 @@
|
||||
<include android:id="@+id/cell5" layout="@layout/workspace_screen" />
|
||||
</com.android.launcher2.Workspace>
|
||||
|
||||
<include
|
||||
android:id="@+id/qsb_divider"
|
||||
layout="@layout/workspace_divider"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="@dimen/qsb_bar_height"
|
||||
android:layout_gravity="left" />
|
||||
<include
|
||||
android:id="@+id/dock_divider"
|
||||
layout="@layout/workspace_divider"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginRight="@dimen/button_bar_height"
|
||||
android:layout_gravity="right" />
|
||||
<include
|
||||
android:id="@+id/paged_view_indicator"
|
||||
layout="@layout/scroll_indicator"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom" />
|
||||
|
||||
<include layout="@layout/hotseat"
|
||||
android:id="@+id/hotseat"
|
||||
android:layout_width="@dimen/button_bar_height_plus_padding"
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
android:gravity="center"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingRight="16dp"
|
||||
android:background="@drawable/tab_widget_indicator_selector"
|
||||
android:contentDescription="@string/market"
|
||||
android:shadowColor="@color/workspace_all_apps_and_delete_zone_text_shadow_color"
|
||||
android:shadowDx="0.0"
|
||||
|
||||
@@ -31,7 +31,9 @@
|
||||
really only in spring loaded mode... -->
|
||||
<dimen name="workspace_top_padding">0dp</dimen>
|
||||
<dimen name="workspace_bottom_padding">0dp</dimen>
|
||||
<dimen name="workspace_page_spacing">-1dp</dimen>
|
||||
<!-- We really want the page spacing to be the max of either the button bar
|
||||
height or the qsb bar height -->
|
||||
<dimen name="workspace_page_spacing">@dimen/button_bar_height</dimen>
|
||||
<dimen name="workspace_divider_padding_left">0dp</dimen>
|
||||
<dimen name="workspace_divider_padding_right">0dp</dimen>
|
||||
<dimen name="workspace_divider_padding_top">12dp</dimen>
|
||||
|
||||
@@ -633,6 +633,12 @@ public class DragLayer extends FrameLayout {
|
||||
|
||||
@Override
|
||||
protected int getChildDrawingOrder(int childCount, int i) {
|
||||
// We don't want to prioritize the workspace drawing on top of the other children in
|
||||
// landscape for the overscroll event.
|
||||
if (LauncherApplication.isScreenLandscape(getContext())) {
|
||||
return super.getChildDrawingOrder(childCount, i);
|
||||
}
|
||||
|
||||
if (mWorkspaceIndex == -1 || mQsbIndex == -1 ||
|
||||
mLauncher.getWorkspace().isDrawingBackgroundGradient()) {
|
||||
return i;
|
||||
|
||||
@@ -3526,11 +3526,13 @@ public class Workspace extends SmoothPagedView
|
||||
mOverscrollFade = fade;
|
||||
float reducedFade = 0.5f + 0.5f * (1 - fade);
|
||||
final ViewGroup parent = (ViewGroup) getParent();
|
||||
final ImageView qsbDivider = (ImageView) (parent.findViewById(R.id.qsb_divider));
|
||||
final ImageView dockDivider = (ImageView) (parent.findViewById(R.id.dock_divider));
|
||||
final ImageView scrollIndicator = getScrollingIndicator();
|
||||
|
||||
cancelScrollingIndicatorAnimations();
|
||||
dockDivider.setAlpha(reducedFade);
|
||||
if (qsbDivider != null) qsbDivider.setAlpha(reducedFade);
|
||||
if (dockDivider != null) dockDivider.setAlpha(reducedFade);
|
||||
scrollIndicator.setAlpha(1 - fade);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user