From 06b6b56e9eaa91ebf757ea641e38a9c885fa40bd Mon Sep 17 00:00:00 2001 From: Eric Erfanian Date: Mon, 20 Mar 2017 08:50:25 -0700 Subject: Update AOSP Dialer source from internal google3 repository at cl/150622237 Test: make, treehugger, on device testing. This CL updates the AOSP Dialer source with all the changes that have gone into the private google3 repository. This includes all the changes from cl/150392808 (3/16/2017) to cl/150622237 (3/20/2017). This goal of these drops is to keep the AOSP source in sync with the internal google3 repository. Currently these sync are done by hand with very minor modifications to the internal source code. See the Android.mk file for list of modifications. Our current goal is to do frequent drops (daily if possible) and eventually switched to an automated process. Change-Id: Id53e0e580a4ef73760a8afb7bb8c265ee27ad535 --- java/com/android/contacts/common/util/FabUtil.java | 71 ---------------------- 1 file changed, 71 deletions(-) delete mode 100644 java/com/android/contacts/common/util/FabUtil.java (limited to 'java/com/android/contacts/common/util') diff --git a/java/com/android/contacts/common/util/FabUtil.java b/java/com/android/contacts/common/util/FabUtil.java deleted file mode 100644 index b1bb2e653..000000000 --- a/java/com/android/contacts/common/util/FabUtil.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (C) 2012 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.android.contacts.common.util; - -import android.content.res.Resources; -import android.graphics.Outline; -import android.view.View; -import android.view.ViewOutlineProvider; -import android.widget.ListView; -import com.android.contacts.common.R; -import com.android.dialer.compat.CompatUtils; - -/** Provides static functions to work with views */ -public class FabUtil { - - private static final ViewOutlineProvider OVAL_OUTLINE_PROVIDER = - new ViewOutlineProvider() { - @Override - public void getOutline(View view, Outline outline) { - outline.setOval(0, 0, view.getWidth(), view.getHeight()); - } - }; - - private FabUtil() {} - - /** - * Configures the floating action button, clipping it to a circle and setting its translation z - * - * @param fabView the float action button's view - * @param res the resources file - */ - public static void setupFloatingActionButton(View fabView, Resources res) { - if (CompatUtils.isLollipopCompatible()) { - fabView.setOutlineProvider(OVAL_OUTLINE_PROVIDER); - fabView.setTranslationZ( - res.getDimensionPixelSize(R.dimen.floating_action_button_translation_z)); - } - } - - /** - * Adds padding to the bottom of the given {@link ListView} so that the floating action button - * does not obscure any content. - * - * @param listView to add the padding to - * @param res valid resources object - */ - public static void addBottomPaddingToListViewForFab(ListView listView, Resources res) { - final int fabPadding = - res.getDimensionPixelSize(R.dimen.floating_action_button_list_bottom_padding); - listView.setPaddingRelative( - listView.getPaddingStart(), - listView.getPaddingTop(), - listView.getPaddingEnd(), - listView.getPaddingBottom() + fabPadding); - listView.setClipToPadding(false); - } -} -- cgit v1.2.3