Merge "Import translations. DO NOT MERGE" into oc-mr1-dev
diff --git a/content/build.gradle b/content/build.gradle
index 5d6dc58..93ef5f8 100644
--- a/content/build.gradle
+++ b/content/build.gradle
@@ -17,8 +17,8 @@
apply plugin: android.support.SupportLibraryPlugin
dependencies {
- compile project(':support-annotations')
- compile project(':support-compat')
+ api project(':support-annotations')
+ api project(':support-compat')
androidTestImplementation libs.junit
androidTestImplementation libs.test_runner, { exclude module: 'support-annotations' }
diff --git a/design/src/android/support/design/widget/BottomSheetBehavior.java b/design/src/android/support/design/widget/BottomSheetBehavior.java
index a28d3be..aaa9b80 100644
--- a/design/src/android/support/design/widget/BottomSheetBehavior.java
+++ b/design/src/android/support/design/widget/BottomSheetBehavior.java
@@ -312,7 +312,9 @@
if (mState == STATE_DRAGGING && action == MotionEvent.ACTION_DOWN) {
return true;
}
- mViewDragHelper.processTouchEvent(event);
+ if (mViewDragHelper != null) {
+ mViewDragHelper.processTouchEvent(event);
+ }
// Record the velocity
if (action == MotionEvent.ACTION_DOWN) {
reset();
diff --git a/design/src/android/support/design/widget/CoordinatorLayout.java b/design/src/android/support/design/widget/CoordinatorLayout.java
index 818e3a6..d97d4e6 100644
--- a/design/src/android/support/design/widget/CoordinatorLayout.java
+++ b/design/src/android/support/design/widget/CoordinatorLayout.java
@@ -232,7 +232,7 @@
@Override
public void onAttachedToWindow() {
super.onAttachedToWindow();
- resetTouchBehaviors();
+ resetTouchBehaviors(false);
if (mNeedsPreDrawListener) {
if (mOnPreDrawListener == null) {
mOnPreDrawListener = new OnPreDrawListener();
@@ -251,7 +251,7 @@
@Override
public void onDetachedFromWindow() {
super.onDetachedFromWindow();
- resetTouchBehaviors();
+ resetTouchBehaviors(false);
if (mNeedsPreDrawListener && mOnPreDrawListener != null) {
final ViewTreeObserver vto = getViewTreeObserver();
vto.removeOnPreDrawListener(mOnPreDrawListener);
@@ -373,20 +373,25 @@
* in response to an UP or CANCEL event, when intercept is request-disallowed
* and similar cases where an event stream in progress will be aborted.
*/
- private void resetTouchBehaviors() {
- if (mBehaviorTouchView != null) {
- final Behavior b = ((LayoutParams) mBehaviorTouchView.getLayoutParams()).getBehavior();
+ private void resetTouchBehaviors(boolean notifyOnInterceptTouchEvent) {
+ final int childCount = getChildCount();
+ for (int i = 0; i < childCount; i++) {
+ final View child = getChildAt(i);
+ final LayoutParams lp = (LayoutParams) child.getLayoutParams();
+ final Behavior b = lp.getBehavior();
if (b != null) {
final long now = SystemClock.uptimeMillis();
final MotionEvent cancelEvent = MotionEvent.obtain(now, now,
MotionEvent.ACTION_CANCEL, 0.0f, 0.0f, 0);
- b.onTouchEvent(this, mBehaviorTouchView, cancelEvent);
+ if (notifyOnInterceptTouchEvent) {
+ b.onInterceptTouchEvent(this, child, cancelEvent);
+ } else {
+ b.onTouchEvent(this, child, cancelEvent);
+ }
cancelEvent.recycle();
}
- mBehaviorTouchView = null;
}
- final int childCount = getChildCount();
for (int i = 0; i < childCount; i++) {
final View child = getChildAt(i);
final LayoutParams lp = (LayoutParams) child.getLayoutParams();
@@ -493,7 +498,7 @@
// Make sure we reset in case we had missed a previous important event.
if (action == MotionEvent.ACTION_DOWN) {
- resetTouchBehaviors();
+ resetTouchBehaviors(true);
}
final boolean intercepted = performIntercept(ev, TYPE_ON_INTERCEPT);
@@ -503,7 +508,7 @@
}
if (action == MotionEvent.ACTION_UP || action == MotionEvent.ACTION_CANCEL) {
- resetTouchBehaviors();
+ resetTouchBehaviors(true);
}
return intercepted;
@@ -548,7 +553,7 @@
}
if (action == MotionEvent.ACTION_UP || action == MotionEvent.ACTION_CANCEL) {
- resetTouchBehaviors();
+ resetTouchBehaviors(false);
}
return handled;
@@ -558,7 +563,7 @@
public void requestDisallowInterceptTouchEvent(boolean disallowIntercept) {
super.requestDisallowInterceptTouchEvent(disallowIntercept);
if (disallowIntercept && !mDisallowInterceptReset) {
- resetTouchBehaviors();
+ resetTouchBehaviors(false);
mDisallowInterceptReset = true;
}
}
diff --git a/design/tests/AndroidManifest.xml b/design/tests/AndroidManifest.xml
index c4673b3..756d7c1 100755
--- a/design/tests/AndroidManifest.xml
+++ b/design/tests/AndroidManifest.xml
@@ -89,6 +89,10 @@
android:name="android.support.design.widget.AppBarWithScrollbarsActivity"
android:theme="@style/Theme.AppCompat.Light.DarkActionBar"/>
+ <activity
+ android:name="android.support.design.widget.AppBarHorizontalScrollingActivity"
+ android:theme="@style/Theme.AppCompat.NoActionBar"/>
+
</application>
</manifest>
diff --git a/design/tests/res/layout/design_appbar_horizontal_scrolling.xml b/design/tests/res/layout/design_appbar_horizontal_scrolling.xml
new file mode 100644
index 0000000..131a07e
--- /dev/null
+++ b/design/tests/res/layout/design_appbar_horizontal_scrolling.xml
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (C) 2017 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.
+ -->
+
+<android.support.design.widget.CoordinatorLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:fitsSystemWindows="true">
+
+ <android.support.design.widget.AppBarLayout
+ android:id="@+id/app_bar"
+ android:layout_width="match_parent"
+ android:layout_height="200dp"
+ android:fitsSystemWindows="true">
+
+ <android.support.design.widget.CollapsingToolbarLayout
+ android:id="@+id/toolbar_layout"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:fitsSystemWindows="true"
+ app:contentScrim="?attr/colorPrimary"
+ app:layout_scrollFlags="scroll|exitUntilCollapsed">
+
+ <HorizontalScrollView
+ android:id="@+id/hsv"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content">
+
+ <LinearLayout
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal">
+
+ <View
+ android:layout_width="200dp"
+ android:layout_height="200dp"
+ android:background="#ff0000"/>
+
+ <View
+ android:layout_width="900dp"
+ android:layout_height="200dp"
+ android:background="#00ff00"/>
+
+ <View
+ android:layout_width="900dp"
+ android:layout_height="200dp"
+ android:background="#0000ff"/>
+ </LinearLayout>
+ </HorizontalScrollView>
+
+ <android.support.v7.widget.Toolbar
+ android:id="@+id/toolbar"
+ android:layout_width="match_parent"
+ android:layout_height="?attr/actionBarSize"
+ app:layout_collapseMode="pin"/>
+
+ </android.support.design.widget.CollapsingToolbarLayout>
+ </android.support.design.widget.AppBarLayout>
+
+ <FrameLayout
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ app:layout_behavior="@string/appbar_scrolling_view_behavior">
+
+ <Button
+ android:id="@+id/button"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_margin="24dp"
+ android:text="@string/text1"/>
+
+ </FrameLayout>
+
+</android.support.design.widget.CoordinatorLayout>
diff --git a/design/tests/src/android/support/design/widget/AppBarHorizontalScrollingActivity.java b/design/tests/src/android/support/design/widget/AppBarHorizontalScrollingActivity.java
new file mode 100644
index 0000000..960dbd9
--- /dev/null
+++ b/design/tests/src/android/support/design/widget/AppBarHorizontalScrollingActivity.java
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2017 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 android.support.design.widget;
+
+import android.os.Bundle;
+import android.support.design.test.R;
+import android.support.v7.widget.Toolbar;
+
+public class AppBarHorizontalScrollingActivity extends BaseTestActivity {
+ @Override
+ protected int getContentViewLayoutResId() {
+ return R.layout.design_appbar_horizontal_scrolling;
+ }
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+
+ Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
+ setSupportActionBar(toolbar);
+ }
+}
diff --git a/design/tests/src/android/support/design/widget/AppBarHorizontalScrollingTest.java b/design/tests/src/android/support/design/widget/AppBarHorizontalScrollingTest.java
new file mode 100644
index 0000000..ccda8b0
--- /dev/null
+++ b/design/tests/src/android/support/design/widget/AppBarHorizontalScrollingTest.java
@@ -0,0 +1,117 @@
+/*
+ * Copyright (C) 2017 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 android.support.design.widget;
+
+import static android.support.test.espresso.Espresso.onView;
+import static android.support.test.espresso.action.ViewActions.swipeLeft;
+import static android.support.test.espresso.matcher.ViewMatchers.withId;
+
+import static org.junit.Assert.assertTrue;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.reset;
+import static org.mockito.Mockito.verify;
+
+import android.app.Activity;
+import android.app.Instrumentation;
+import android.os.SystemClock;
+import android.support.design.test.R;
+import android.support.test.InstrumentationRegistry;
+import android.support.test.filters.LargeTest;
+import android.view.MotionEvent;
+import android.view.View;
+import android.widget.Button;
+import android.widget.HorizontalScrollView;
+
+import org.junit.Test;
+
+/**
+ * Testing that if we have a {@link AppBarLayout} child that intercepts touch events (such as
+ * {@link HorizontalScrollView} that handles horizontal swipes), that does not interfere with
+ * event handling after the event sequence is no longer being intercepted by that child.
+ */
+@LargeTest
+public class AppBarHorizontalScrollingTest extends
+ BaseInstrumentationTestCase<AppBarHorizontalScrollingActivity> {
+
+ public AppBarHorizontalScrollingTest() {
+ super(AppBarHorizontalScrollingActivity.class);
+ }
+
+ @Test
+ public void testScrollAndClick() throws Throwable {
+ final Activity activity = mActivityTestRule.getActivity();
+ final Instrumentation instrumentation = InstrumentationRegistry.getInstrumentation();
+
+ final Button button = activity.findViewById(R.id.button);
+ final View.OnClickListener mockClickListener = mock(View.OnClickListener.class);
+ button.setOnClickListener(mockClickListener);
+
+ // Emulate a click on the button to verify that the registered listener is invoked
+ // prior to performing a horizontal swipe across the app bar
+ final int[] buttonXY = new int[2];
+ button.getLocationOnScreen(buttonXY);
+ final int buttonWidth = button.getWidth();
+ final int buttonHeight = button.getHeight();
+ final float emulatedTapX = buttonXY[0] + buttonWidth / 2.0f;
+ final float emulatedTapY = buttonXY[1] + buttonHeight / 2.0f;
+
+ emulateButtonClick(instrumentation, emulatedTapX, emulatedTapY);
+ verify(mockClickListener).onClick(button);
+ reset(mockClickListener);
+
+ final HorizontalScrollView hsv = activity.findViewById(R.id.hsv);
+ final int scrollXBefore = hsv.getScrollX();
+ // Now scroll / swipe horizontally across our scrollable content in the app bar
+ onView(withId(R.id.app_bar)).perform(swipeLeft());
+ assertTrue("Horizontal scroll performed", hsv.getScrollX() > scrollXBefore);
+
+ // And emulate another click on the button to verify that the registered listener is still
+ // invoked immediately after performing the horizontal swipe across the app bar
+ emulateButtonClick(instrumentation, emulatedTapX, emulatedTapY);
+ verify(mockClickListener).onClick(button);
+ }
+
+ private void emulateButtonClick(Instrumentation instrumentation, float emulatedTapX,
+ float emulatedTapY) {
+ // Note that the reason to not use Espresso's click() view action is so that we can
+ // faithfully emulate what was happening in the reported bug. We don't want the events
+ // to be sent directly to the button, but rather be processed by the parent coordinator
+ // layout, so that we reproduce what is happening as the events are processed at the level
+ // of that parent.
+
+ // Inject DOWN event
+ long downTime = SystemClock.uptimeMillis();
+ MotionEvent eventDown = MotionEvent.obtain(
+ downTime, downTime, MotionEvent.ACTION_DOWN, emulatedTapX, emulatedTapY, 1);
+ instrumentation.sendPointerSync(eventDown);
+
+ // Inject MOVE event
+ long moveTime = SystemClock.uptimeMillis();
+ MotionEvent eventMove = MotionEvent.obtain(
+ moveTime, moveTime, MotionEvent.ACTION_MOVE, emulatedTapX, emulatedTapY, 1);
+ instrumentation.sendPointerSync(eventMove);
+
+ // Inject UP event
+ long upTime = SystemClock.uptimeMillis();
+ MotionEvent eventUp = MotionEvent.obtain(
+ upTime, upTime, MotionEvent.ACTION_UP, emulatedTapX, emulatedTapY, 1);
+ instrumentation.sendPointerSync(eventUp);
+
+ // Wait for the system to process all events in the queue
+ instrumentation.waitForIdleSync();
+ }
+}
diff --git a/design/tests/src/android/support/design/widget/BaseTestActivity.java b/design/tests/src/android/support/design/widget/BaseTestActivity.java
index bdeb231..4662001 100755
--- a/design/tests/src/android/support/design/widget/BaseTestActivity.java
+++ b/design/tests/src/android/support/design/widget/BaseTestActivity.java
@@ -17,6 +17,7 @@
package android.support.design.widget;
import android.os.Bundle;
+import android.support.annotation.LayoutRes;
import android.support.design.testutils.RecreatedAppCompatActivity;
import android.view.WindowManager;
@@ -44,6 +45,7 @@
overridePendingTransition(0, 0);
}
+ @LayoutRes
protected abstract int getContentViewLayoutResId();
protected void onContentViewSet() {}
diff --git a/samples/SupportContentDemos/build.gradle b/samples/SupportContentDemos/build.gradle
index 4c7691a..4acd3f2 100644
--- a/samples/SupportContentDemos/build.gradle
+++ b/samples/SupportContentDemos/build.gradle
@@ -16,6 +16,12 @@
apply plugin: 'com.android.application'
+dependencies {
+ implementation project(':design')
+ implementation project(':appcompat-v7')
+ implementation project(':support-content')
+}
+
android {
compileSdkVersion project.ext.currentSdk
@@ -29,12 +35,4 @@
abortOnError true
check 'NewApi'
}
-
}
-
-dependencies {
- compile project(':design')
- compile project(':appcompat-v7')
- compile project(':support-content')
-}
-
diff --git a/v17/leanback/src/android/support/v17/leanback/app/OnboardingFragment.java b/v17/leanback/src/android/support/v17/leanback/app/OnboardingFragment.java
index 5eb2784..22dd211 100644
--- a/v17/leanback/src/android/support/v17/leanback/app/OnboardingFragment.java
+++ b/v17/leanback/src/android/support/v17/leanback/app/OnboardingFragment.java
@@ -593,6 +593,9 @@
boolean startLogoAnimation() {
final Context context = FragmentUtil.getContext(this);
+ if (context == null) {
+ return false;
+ }
Animator animator = null;
if (mLogoResourceId != 0) {
mLogoView.setVisibility(View.VISIBLE);
@@ -713,12 +716,15 @@
* been done in the past, {@code false} otherwise
*/
protected final void startEnterAnimation(boolean force) {
+ final Context context = FragmentUtil.getContext(this);
+ if (context == null) {
+ return;
+ }
hideLogoView();
if (mEnterAnimationFinished && !force) {
return;
}
List<Animator> animators = new ArrayList<>();
- final Context context = FragmentUtil.getContext(this);
Animator animator = AnimatorInflater.loadAnimator(context,
R.animator.lb_onboarding_page_indicator_enter);
animator.setTarget(getPageCount() <= 1 ? mStartButton : mPageIndicator);
diff --git a/v17/leanback/src/android/support/v17/leanback/app/OnboardingSupportFragment.java b/v17/leanback/src/android/support/v17/leanback/app/OnboardingSupportFragment.java
index 46c2a81..a24ea4d 100644
--- a/v17/leanback/src/android/support/v17/leanback/app/OnboardingSupportFragment.java
+++ b/v17/leanback/src/android/support/v17/leanback/app/OnboardingSupportFragment.java
@@ -596,6 +596,9 @@
boolean startLogoAnimation() {
final Context context = getContext();
+ if (context == null) {
+ return false;
+ }
Animator animator = null;
if (mLogoResourceId != 0) {
mLogoView.setVisibility(View.VISIBLE);
@@ -716,12 +719,15 @@
* been done in the past, {@code false} otherwise
*/
protected final void startEnterAnimation(boolean force) {
+ final Context context = getContext();
+ if (context == null) {
+ return;
+ }
hideLogoView();
if (mEnterAnimationFinished && !force) {
return;
}
List<Animator> animators = new ArrayList<>();
- final Context context = getContext();
Animator animator = AnimatorInflater.loadAnimator(context,
R.animator.lb_onboarding_page_indicator_enter);
animator.setTarget(getPageCount() <= 1 ? mStartButton : mPageIndicator);
diff --git a/wear/res/drawable-hdpi/ws_switch_thumb_mtrl_14w.png b/wear/res/drawable-hdpi/ws_switch_thumb_mtrl_14w.png
index 371469c..035e901 100644
--- a/wear/res/drawable-hdpi/ws_switch_thumb_mtrl_14w.png
+++ b/wear/res/drawable-hdpi/ws_switch_thumb_mtrl_14w.png
Binary files differ
diff --git a/wear/res/drawable-hdpi/ws_switch_thumb_mtrl_15w.png b/wear/res/drawable-hdpi/ws_switch_thumb_mtrl_15w.png
index e477260..6688631 100644
--- a/wear/res/drawable-hdpi/ws_switch_thumb_mtrl_15w.png
+++ b/wear/res/drawable-hdpi/ws_switch_thumb_mtrl_15w.png
Binary files differ
diff --git a/wear/res/drawable-hdpi/ws_switch_thumb_mtrl_16w.png b/wear/res/drawable-hdpi/ws_switch_thumb_mtrl_16w.png
index 19a1bd3..0dd9fce 100644
--- a/wear/res/drawable-hdpi/ws_switch_thumb_mtrl_16w.png
+++ b/wear/res/drawable-hdpi/ws_switch_thumb_mtrl_16w.png
Binary files differ
diff --git a/wear/res/drawable-hdpi/ws_switch_thumb_mtrl_17w.png b/wear/res/drawable-hdpi/ws_switch_thumb_mtrl_17w.png
index 79dc733..a15b133 100644
--- a/wear/res/drawable-hdpi/ws_switch_thumb_mtrl_17w.png
+++ b/wear/res/drawable-hdpi/ws_switch_thumb_mtrl_17w.png
Binary files differ
diff --git a/wear/res/drawable-hdpi/ws_switch_thumb_mtrl_18w.png b/wear/res/drawable-hdpi/ws_switch_thumb_mtrl_18w.png
index 6d921c0..1cd259e 100644
--- a/wear/res/drawable-hdpi/ws_switch_thumb_mtrl_18w.png
+++ b/wear/res/drawable-hdpi/ws_switch_thumb_mtrl_18w.png
Binary files differ
diff --git a/wear/res/drawable-hdpi/ws_switch_track_mtrl.png b/wear/res/drawable-hdpi/ws_switch_track_mtrl.png
index ecee3e1..8ed1c97 100644
--- a/wear/res/drawable-hdpi/ws_switch_track_mtrl.png
+++ b/wear/res/drawable-hdpi/ws_switch_track_mtrl.png
Binary files differ
diff --git a/wear/res/drawable-xhdpi/ws_switch_thumb_mtrl_14w.png b/wear/res/drawable-xhdpi/ws_switch_thumb_mtrl_14w.png
index 7f7ca14..119207b 100644
--- a/wear/res/drawable-xhdpi/ws_switch_thumb_mtrl_14w.png
+++ b/wear/res/drawable-xhdpi/ws_switch_thumb_mtrl_14w.png
Binary files differ
diff --git a/wear/res/drawable-xhdpi/ws_switch_thumb_mtrl_15w.png b/wear/res/drawable-xhdpi/ws_switch_thumb_mtrl_15w.png
index 52120b8..b89c86a 100644
--- a/wear/res/drawable-xhdpi/ws_switch_thumb_mtrl_15w.png
+++ b/wear/res/drawable-xhdpi/ws_switch_thumb_mtrl_15w.png
Binary files differ
diff --git a/wear/res/drawable-xhdpi/ws_switch_thumb_mtrl_16w.png b/wear/res/drawable-xhdpi/ws_switch_thumb_mtrl_16w.png
index d6e9be9..7528731 100644
--- a/wear/res/drawable-xhdpi/ws_switch_thumb_mtrl_16w.png
+++ b/wear/res/drawable-xhdpi/ws_switch_thumb_mtrl_16w.png
Binary files differ
diff --git a/wear/res/drawable-xhdpi/ws_switch_thumb_mtrl_17w.png b/wear/res/drawable-xhdpi/ws_switch_thumb_mtrl_17w.png
index 8d76393..dba351f 100644
--- a/wear/res/drawable-xhdpi/ws_switch_thumb_mtrl_17w.png
+++ b/wear/res/drawable-xhdpi/ws_switch_thumb_mtrl_17w.png
Binary files differ
diff --git a/wear/res/drawable-xhdpi/ws_switch_thumb_mtrl_18w.png b/wear/res/drawable-xhdpi/ws_switch_thumb_mtrl_18w.png
index ca9c66e..ab7b1df 100644
--- a/wear/res/drawable-xhdpi/ws_switch_thumb_mtrl_18w.png
+++ b/wear/res/drawable-xhdpi/ws_switch_thumb_mtrl_18w.png
Binary files differ
diff --git a/wear/res/drawable-xhdpi/ws_switch_track_mtrl.png b/wear/res/drawable-xhdpi/ws_switch_track_mtrl.png
index 1aa5442..1769795 100644
--- a/wear/res/drawable-xhdpi/ws_switch_track_mtrl.png
+++ b/wear/res/drawable-xhdpi/ws_switch_track_mtrl.png
Binary files differ
diff --git a/wear/res/drawable-xxhdpi/ws_switch_thumb_mtrl_14w.png b/wear/res/drawable-xxhdpi/ws_switch_thumb_mtrl_14w.png
index c0d72d7..8a00760 100644
--- a/wear/res/drawable-xxhdpi/ws_switch_thumb_mtrl_14w.png
+++ b/wear/res/drawable-xxhdpi/ws_switch_thumb_mtrl_14w.png
Binary files differ
diff --git a/wear/res/drawable-xxhdpi/ws_switch_thumb_mtrl_15w.png b/wear/res/drawable-xxhdpi/ws_switch_thumb_mtrl_15w.png
index d7c0ec0..64a0cab 100644
--- a/wear/res/drawable-xxhdpi/ws_switch_thumb_mtrl_15w.png
+++ b/wear/res/drawable-xxhdpi/ws_switch_thumb_mtrl_15w.png
Binary files differ
diff --git a/wear/res/drawable-xxhdpi/ws_switch_thumb_mtrl_16w.png b/wear/res/drawable-xxhdpi/ws_switch_thumb_mtrl_16w.png
index 5815ba9..ce7369e 100644
--- a/wear/res/drawable-xxhdpi/ws_switch_thumb_mtrl_16w.png
+++ b/wear/res/drawable-xxhdpi/ws_switch_thumb_mtrl_16w.png
Binary files differ
diff --git a/wear/res/drawable-xxhdpi/ws_switch_thumb_mtrl_17w.png b/wear/res/drawable-xxhdpi/ws_switch_thumb_mtrl_17w.png
index 41da8c0..398e3f2 100644
--- a/wear/res/drawable-xxhdpi/ws_switch_thumb_mtrl_17w.png
+++ b/wear/res/drawable-xxhdpi/ws_switch_thumb_mtrl_17w.png
Binary files differ
diff --git a/wear/res/drawable-xxhdpi/ws_switch_thumb_mtrl_18w.png b/wear/res/drawable-xxhdpi/ws_switch_thumb_mtrl_18w.png
index 975eb01..1cf40e2 100644
--- a/wear/res/drawable-xxhdpi/ws_switch_thumb_mtrl_18w.png
+++ b/wear/res/drawable-xxhdpi/ws_switch_thumb_mtrl_18w.png
Binary files differ
diff --git a/wear/res/drawable-xxhdpi/ws_switch_track_mtrl.png b/wear/res/drawable-xxhdpi/ws_switch_track_mtrl.png
index af2042b..a329817 100644
--- a/wear/res/drawable-xxhdpi/ws_switch_track_mtrl.png
+++ b/wear/res/drawable-xxhdpi/ws_switch_track_mtrl.png
Binary files differ
diff --git a/wear/src/android/support/wear/widget/RoundedDrawable.java b/wear/src/android/support/wear/widget/RoundedDrawable.java
index 627e2de..e2d7611 100644
--- a/wear/src/android/support/wear/widget/RoundedDrawable.java
+++ b/wear/src/android/support/wear/widget/RoundedDrawable.java
@@ -38,17 +38,18 @@
/**
* Maintains and draws a drawable inside rounded rectangular bounds.
*
- * The drawable set by the {@link #setDrawable(Drawable)} method will be drawn within the rounded
+ * <p>The drawable set by the {@link #setDrawable(Drawable)} method will be drawn within the rounded
* bounds specified by {@link #setBounds(Rect)} and {@link #setRadius(int)} when the
* {@link #draw(Canvas)} method is called.
*
- * By default, RoundedDrawable will apply padding to the drawable inside to fit the drawable into
+ * <p>By default, RoundedDrawable will apply padding to the drawable inside to fit the drawable into
* the rounded rectangle. If clipping is enabled by the {@link #setClipEnabled(boolean)} method, it
* will clip the drawable to a rounded rectangle instead of resizing it.
*
- * The {@link #setRadius(int)} method is used to specify the amount of border radius applied to the
- * corners of inner drawable, regardless of whether or not the clipping is enabled, border radius
- * will be applied to prevent overflowing of the drawable from specified rounded rectangular area.
+ * <p>The {@link #setRadius(int)} method is used to specify the amount of border radius applied to
+ * the corners of inner drawable, regardless of whether or not the clipping is enabled, border
+ * radius will be applied to prevent overflowing of the drawable from specified rounded rectangular
+ * area.
*/
@TargetApi(Build.VERSION_CODES.N)
public class RoundedDrawable extends Drawable {