Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 39688d2d authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Update taskbar to spec" into tm-qpr-dev

parents d96be3eb 2a058f5b
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -13,10 +13,12 @@
     See the License for the specific language governing permissions and
     limitations under the License.
-->

<!-- Note: The actual size will match the taskbar icon sizes in TaskbarView#onLayout(). -->
<com.android.launcher3.views.IconButtonView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="@dimen/taskbar_icon_touch_size"
    android:layout_height="@dimen/taskbar_icon_touch_size"
    android:layout_width="@dimen/taskbar_icon_min_touch_size"
    android:layout_height="@dimen/taskbar_icon_min_touch_size"
    android:contentDescription="@string/all_apps_button_label"
    android:backgroundTint="@android:color/transparent"
    android:icon="@drawable/ic_all_apps_button"
+1 −0
Original line number Diff line number Diff line
@@ -40,4 +40,5 @@

    <!-- Transient taskbar -->
    <dimen name="transient_taskbar_size">76dp</dimen>
    <dimen name="transient_taskbar_icon_size">52dp</dimen>
</resources>
+5 −2
Original line number Diff line number Diff line
@@ -255,7 +255,10 @@
    <!-- Taskbar -->
    <dimen name="taskbar_size">@*android:dimen/taskbar_frame_height</dimen>
    <dimen name="taskbar_ime_size">48dp</dimen>
    <dimen name="taskbar_icon_touch_size">48dp</dimen>
    <dimen name="taskbar_icon_size">44dp</dimen>
    <dimen name="taskbar_icon_min_touch_size">48dp</dimen>
    <!-- Note that this applies to both sides of all icons, so visible space is double this. -->
    <dimen name="taskbar_icon_spacing">12dp</dimen>
    <dimen name="taskbar_icon_drag_icon_size">54dp</dimen>
    <dimen name="taskbar_folder_margin">16dp</dimen>
    <dimen name="taskbar_contextual_button_padding">16dp</dimen>
@@ -282,11 +285,11 @@

    <!-- Transient taskbar -->
    <dimen name="transient_taskbar_size">72dp</dimen>
    <dimen name="transient_taskbar_icon_size">48dp</dimen>
    <dimen name="transient_taskbar_margin">24dp</dimen>
    <dimen name="transient_taskbar_shadow_blur">40dp</dimen>
    <dimen name="transient_taskbar_key_shadow_distance">10dp</dimen>
    <dimen name="transient_taskbar_stashed_size">32dp</dimen>
    <dimen name="transient_taskbar_icon_spacing">10dp</dimen>
    <!-- An additional touch slop to prevent x-axis movement during the swipe up to show taskbar -->
    <dimen name="transient_taskbar_clamped_offset_bound">16dp</dimen>
    <!-- Taskbar swipe up thresholds -->
+5 −6
Original line number Diff line number Diff line
@@ -101,16 +101,15 @@ public class TaskbarView extends FrameLayout implements FolderIcon.FolderIconPar
        super(context, attrs, defStyleAttr, defStyleRes);
        mActivityContext = ActivityContext.lookupContext(context);
        mIconLayoutBounds = mActivityContext.getTransientTaskbarBounds();
        mIsRtl = Utilities.isRtl(getResources());

        Resources resources = getResources();
        mIconTouchSize = resources.getDimensionPixelSize(R.dimen.taskbar_icon_touch_size);
        mIsRtl = Utilities.isRtl(resources);

        int actualMargin = DisplayController.isTransientTaskbar(mActivityContext)
                ? resources.getDimensionPixelSize(R.dimen.transient_taskbar_icon_spacing)
                : resources.getDimensionPixelSize(R.dimen.taskbar_icon_spacing);
        int actualMargin = resources.getDimensionPixelSize(R.dimen.taskbar_icon_spacing);
        int actualIconSize = mActivityContext.getDeviceProfile().iconSizePx;

        mIconTouchSize = Math.max(actualIconSize,
                resources.getDimensionPixelSize(R.dimen.taskbar_icon_min_touch_size));

        // We layout the icons to be of mIconTouchSize in width and height
        mItemMarginLeftRight = actualMargin - (mIconTouchSize - actualIconSize) / 2;
        mItemPadding = (mIconTouchSize - actualIconSize) / 2;
+0 −3
Original line number Diff line number Diff line
@@ -46,7 +46,4 @@

    <!--  Folder spaces  -->
    <dimen name="folder_footer_horiz_padding">24dp</dimen>

    <!-- Transient taskbar -->
    <dimen name="transient_taskbar_icon_size">57dp</dimen>
</resources>
Loading