From cba2811ec5b8d9345a2b67c29139d40f8b0f64e4 Mon Sep 17 00:00:00 2001 From: seven332 Date: Wed, 3 Jun 2015 18:52:30 +0800 Subject: [PATCH] CardView version bump --- app/src/main/java/android/support/v7/widget/CardView.java | 7 +++---- .../java/android/support/v7/widget/CardViewApi21.java | 8 +++----- .../java/android/support/v7/widget/CardViewDelegate.java | 3 ++- .../main/java/android/support/v7/widget/CardViewImpl.java | 6 ++++-- .../support/v7/widget/RoundRectDrawableWithShadow.java | 3 ++- 5 files changed, 14 insertions(+), 13 deletions(-) diff --git a/app/src/main/java/android/support/v7/widget/CardView.java b/app/src/main/java/android/support/v7/widget/CardView.java index f1ecc16d5..7f371bbc2 100644 --- a/app/src/main/java/android/support/v7/widget/CardView.java +++ b/app/src/main/java/android/support/v7/widget/CardView.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015 Hippo Seven + * Copyright (C) 2014 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. @@ -8,6 +8,7 @@ * 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. @@ -118,7 +119,6 @@ public class CardView extends FrameLayout implements CardViewDelegate { // NO OP } - @Override public void setPaddingRelative(int start, int top, int end, int bottom) { // NO OP } @@ -181,7 +181,7 @@ public class CardView extends FrameLayout implements CardViewDelegate { @Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { - if (!(mImpl instanceof CardViewApi21)) { + if (mImpl instanceof CardViewApi21 == false) { final int widthMode = MeasureSpec.getMode(widthMeasureSpec); switch (widthMode) { case MeasureSpec.EXACTLY: @@ -300,7 +300,6 @@ public class CardView extends FrameLayout implements CardViewDelegate { * @return Corner radius of the CardView * @see #getRadius() */ - @Override public float getRadius() { return mImpl.getRadius(this); } diff --git a/app/src/main/java/android/support/v7/widget/CardViewApi21.java b/app/src/main/java/android/support/v7/widget/CardViewApi21.java index 7bf98616b..833ccc8c5 100644 --- a/app/src/main/java/android/support/v7/widget/CardViewApi21.java +++ b/app/src/main/java/android/support/v7/widget/CardViewApi21.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015 Hippo Seven + * Copyright (C) 2014 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. @@ -8,20 +8,18 @@ * 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 android.support.v7.widget; -import android.annotation.TargetApi; import android.content.Context; -import android.os.Build; import android.view.View; class CardViewApi21 implements CardViewImpl { - @TargetApi(Build.VERSION_CODES.LOLLIPOP) @Override public void initialize(CardViewDelegate cardView, Context context, int backgroundColor, float radius, float elevation, float maxElevation) { @@ -108,4 +106,4 @@ class CardViewApi21 implements CardViewImpl { public void setBackgroundColor(CardViewDelegate cardView, int color) { ((RoundRectDrawable) (cardView.getBackground())).setColor(color); } -} +} \ No newline at end of file diff --git a/app/src/main/java/android/support/v7/widget/CardViewDelegate.java b/app/src/main/java/android/support/v7/widget/CardViewDelegate.java index 3d4006205..fdd5b184d 100644 --- a/app/src/main/java/android/support/v7/widget/CardViewDelegate.java +++ b/app/src/main/java/android/support/v7/widget/CardViewDelegate.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015 Hippo Seven + * Copyright (C) 2014 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. @@ -8,6 +8,7 @@ * 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. diff --git a/app/src/main/java/android/support/v7/widget/CardViewImpl.java b/app/src/main/java/android/support/v7/widget/CardViewImpl.java index 9fbf09f0b..24b902c4f 100644 --- a/app/src/main/java/android/support/v7/widget/CardViewImpl.java +++ b/app/src/main/java/android/support/v7/widget/CardViewImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015 Hippo Seven + * Copyright (C) 2014 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. @@ -8,6 +8,7 @@ * 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. @@ -19,7 +20,8 @@ import android.content.Context; * Interface for platform specific CardView implementations. */ interface CardViewImpl { - void initialize(CardViewDelegate cardView, Context context, int backgroundColor, float radius, float elevation, float maxElevation); + void initialize(CardViewDelegate cardView, Context context, int backgroundColor, float radius, + float elevation, float maxElevation); void setRadius(CardViewDelegate cardView, float radius); diff --git a/app/src/main/java/android/support/v7/widget/RoundRectDrawableWithShadow.java b/app/src/main/java/android/support/v7/widget/RoundRectDrawableWithShadow.java index 226d47fea..b83b3ebcc 100644 --- a/app/src/main/java/android/support/v7/widget/RoundRectDrawableWithShadow.java +++ b/app/src/main/java/android/support/v7/widget/RoundRectDrawableWithShadow.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015 Hippo Seven + * Copyright (C) 2014 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. @@ -8,6 +8,7 @@ * 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.