Fix inset drawable's intrinsic size, replace ic_text_dot asset

BUG: 17648301
Change-Id: I8af0f6d1beee7a1cb3a3b9db571ed2c407e24556
This commit is contained in:
Alan Viverette
2014-10-10 14:08:32 -07:00
parent 69f35c8e1b
commit cdd5e067f2
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