am 284559bf: Merge "Fix inset drawable\'s intrinsic size, replace ic_text_dot asset" into lmp-mr1-dev

* commit '284559bfb8d2fbf20cb1aec196353ffe19da6ea5':
  Fix inset drawable's intrinsic size, replace ic_text_dot asset
This commit is contained in:
Alan Viverette
2014-10-11 00:17:57 +00:00
committed by Android Git Automerger
7 changed files with 26 additions and 2 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 545 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 611 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 453 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 646 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

View File

@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- 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.
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.
-->
<inset xmlns:android="http://schemas.android.com/apk/res/android"
android:inset="10dp">
<shape android:shape="oval">
<solid android:color="?android:attr/textColorSecondary" />
<size android:width="4dp" android:height="4dp" />
</shape>
</inset>

View File

@@ -339,12 +339,14 @@ public class InsetDrawable extends Drawable implements Drawable.Callback {
@Override
public int getIntrinsicWidth() {
return mInsetState.mDrawable.getIntrinsicWidth();
return mInsetState.mDrawable.getIntrinsicWidth()
+ mInsetState.mInsetLeft + mInsetState.mInsetRight;
}
@Override
public int getIntrinsicHeight() {
return mInsetState.mDrawable.getIntrinsicHeight();
return mInsetState.mDrawable.getIntrinsicHeight()
+ mInsetState.mInsetTop + mInsetState.mInsetBottom;
}
@Override