Merge "Fix inset drawable's intrinsic size, replace ic_text_dot asset" into lmp-mr1-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
284559bfb8
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 |
22
core/res/res/drawable/ic_text_dot.xml
Normal file
22
core/res/res/drawable/ic_text_dot.xml
Normal 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>
|
||||||
@@ -339,12 +339,14 @@ public class InsetDrawable extends Drawable implements Drawable.Callback {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getIntrinsicWidth() {
|
public int getIntrinsicWidth() {
|
||||||
return mInsetState.mDrawable.getIntrinsicWidth();
|
return mInsetState.mDrawable.getIntrinsicWidth()
|
||||||
|
+ mInsetState.mInsetLeft + mInsetState.mInsetRight;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getIntrinsicHeight() {
|
public int getIntrinsicHeight() {
|
||||||
return mInsetState.mDrawable.getIntrinsicHeight();
|
return mInsetState.mDrawable.getIntrinsicHeight()
|
||||||
|
+ mInsetState.mInsetTop + mInsetState.mInsetBottom;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user