From 223c30353c6c3a0934c4acb83bb19104e5489d3a Mon Sep 17 00:00:00 2001 From: Rey Pham Date: Sun, 26 Jul 2015 01:38:41 +0700 Subject: [PATCH 1/2] EditText: fix bug measure view with null layout params. --- Material.iml | 2 +- app/app.iml | 2 +- app/build.gradle | 4 ++-- lib/lib.iml | 2 +- lib/src/main/java/com/rey/material/widget/EditText.java | 8 ++++---- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Material.iml b/Material.iml index afe58c96..196e4e49 100644 --- a/Material.iml +++ b/Material.iml @@ -1,5 +1,5 @@ - + diff --git a/app/app.iml b/app/app.iml index 693da432..ca6d86c6 100644 --- a/app/app.iml +++ b/app/app.iml @@ -1,5 +1,5 @@ - + diff --git a/app/build.gradle b/app/build.gradle index 920ebd21..58edbcb1 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -8,8 +8,8 @@ android { applicationId "com.rey.material.demo" minSdkVersion 9 targetSdkVersion 21 - versionCode 3 - versionName "0.0.3" + versionCode 5 + versionName "0.0.5" } signingConfigs { diff --git a/lib/lib.iml b/lib/lib.iml index f5fc3726..2159dbe5 100644 --- a/lib/lib.iml +++ b/lib/lib.iml @@ -1,5 +1,5 @@ - + diff --git a/lib/src/main/java/com/rey/material/widget/EditText.java b/lib/src/main/java/com/rey/material/widget/EditText.java index 8b7167ae..53cee939 100644 --- a/lib/src/main/java/com/rey/material/widget/EditText.java +++ b/lib/src/main/java/com/rey/material/widget/EditText.java @@ -514,7 +514,7 @@ protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { int supportWidth = 0; int supportHeight = 0; - if(mLabelView != null){ + if(mLabelView != null && mLabelView.getLayoutParams() != null){ mLabelView.measure(tempWidthSpec, tempHeightSpec); labelWidth = mLabelView.getMeasuredWidth(); labelHeight = mLabelView.getMeasuredHeight(); @@ -524,7 +524,7 @@ protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { inputWidth = mInputView.getMeasuredWidth(); inputHeight = mInputView.getMeasuredHeight(); - if(mSupportView != null){ + if(mSupportView != null && mSupportView.getLayoutParams() != null){ mSupportView.measure(tempWidthSpec, tempHeightSpec); supportWidth = mSupportView.getMeasuredWidth(); supportHeight = mSupportView.getMeasuredHeight(); @@ -560,12 +560,12 @@ protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { setMeasuredDimension(width, height); tempWidthSpec = MeasureSpec.makeMeasureSpec(width - getPaddingLeft() - getPaddingRight(), MeasureSpec.EXACTLY); - if(mLabelView != null) + if(mLabelView != null && mLabelView.getLayoutParams() != null) mLabelView.measure(tempWidthSpec, tempHeightSpec); mInputView.measure(tempWidthSpec, tempHeightSpec); - if(mSupportView != null) + if(mSupportView != null && mSupportView.getLayoutParams() != null) mSupportView.measure(tempWidthSpec, tempHeightSpec); } From e28c9b85b1184f5588fefc66572a8168915a783e Mon Sep 17 00:00:00 2001 From: Rey Pham Date: Sun, 26 Jul 2015 01:39:47 +0700 Subject: [PATCH 2/2] Change version to 1.2.1 --- Material.iml | 2 +- app/app.iml | 2 +- gradle.properties | 4 ++-- lib/build.gradle | 4 ++-- lib/lib.iml | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Material.iml b/Material.iml index 196e4e49..35524d89 100644 --- a/Material.iml +++ b/Material.iml @@ -1,5 +1,5 @@ - + diff --git a/app/app.iml b/app/app.iml index ca6d86c6..dbeeadc2 100644 --- a/app/app.iml +++ b/app/app.iml @@ -1,5 +1,5 @@ - + diff --git a/gradle.properties b/gradle.properties index b5722d83..631c0aa5 100644 --- a/gradle.properties +++ b/gradle.properties @@ -17,8 +17,8 @@ # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects # org.gradle.parallel=true -VERSION_NAME=1.2.0 -VERSION_CODE=6 +VERSION_NAME=1.2.1 +VERSION_CODE=7 GROUP=com.github.rey5137 POM_DESCRIPTION= An Android library to bring Material Design UI to pre-Lolipop Android. diff --git a/lib/build.gradle b/lib/build.gradle index 574588cb..dec7f663 100644 --- a/lib/build.gradle +++ b/lib/build.gradle @@ -7,8 +7,8 @@ android { defaultConfig { minSdkVersion 9 targetSdkVersion 21 - versionCode 6 - versionName "1.2.0" + versionCode 7 + versionName "1.2.1" } buildTypes { release { diff --git a/lib/lib.iml b/lib/lib.iml index 2159dbe5..72ff0051 100644 --- a/lib/lib.iml +++ b/lib/lib.iml @@ -1,5 +1,5 @@ - +