|
| 1 | +/* |
| 2 | + The MIT License (MIT) |
| 3 | + Copyright (c) 2017 Jenly Yu |
| 4 | + https://github.com/jenly1314 |
| 5 | +
|
| 6 | + Permission is hereby granted, free of charge, to any person obtaining |
| 7 | + a copy of this software and associated documentation files |
| 8 | + (the "Software"), to deal in the Software without restriction, including |
| 9 | + without limitation the rights to use, copy, modify, merge, publish, |
| 10 | + distribute, sublicense, and/or sell copies of the Software, and to permit |
| 11 | + persons to whom the Software is furnished to do so, subject to the |
| 12 | + following conditions: |
| 13 | +
|
| 14 | + The above copyright notice and this permission notice shall be included |
| 15 | + in all copies or substantial portions of the Software. |
| 16 | +
|
| 17 | + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 18 | + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 19 | + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 20 | + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 21 | + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
| 22 | + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
| 23 | + DEALINGS IN THE SOFTWARE. |
| 24 | + */ |
1 | 25 | package com.king.view;
|
2 | 26 |
|
3 | 27 | import android.animation.ValueAnimator;
|
@@ -193,6 +217,7 @@ protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
|
193 | 217 |
|
194 | 218 | int defaultValue = (int)TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP,200,getDisplayMetrics());
|
195 | 219 |
|
| 220 | + |
196 | 221 | int defaultWidth = defaultValue + getPaddingLeft() + getPaddingRight();
|
197 | 222 | int defaultHeight = defaultValue + getPaddingTop() + getPaddingBottom();
|
198 | 223 |
|
@@ -356,6 +381,8 @@ public void showAppendAnimation(float progress){
|
356 | 381 | }
|
357 | 382 |
|
358 | 383 |
|
| 384 | + |
| 385 | + |
359 | 386 | public void showAnimation(float progress){
|
360 | 387 | showAnimation(progress,mDuration);
|
361 | 388 | }
|
|
0 commit comments