CardView version bump

This commit is contained in:
seven332 committed 2015-06-03 18:52:30 +08:00
1 parent 40ef147cbc
commit cba2811ec5
5 files changed
+14 -13

No files matched your search

@@ -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);
}
@@ -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);
}
}
}
@@ -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.
@@ -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);
@@ -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.