Skip to content
This repository has been archived by the owner on Jan 12, 2018. It is now read-only.

Commit

Permalink
:Fixed NullPointerException that occured because params was never set…
Browse files Browse the repository at this point in the history
… to new value after check
  • Loading branch information
mpfeiffermway committed Aug 15, 2013
1 parent 76659d7 commit 3015f1a
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Expand Up @@ -21,4 +21,5 @@ Screenshots
*.iml
target/
gen-external-apklibs/

build/
.gradle/
28 changes: 28 additions & 0 deletions Library/build.gradle
@@ -0,0 +1,28 @@
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.5.+'
}
}
apply plugin: 'android-library'

android {
compileSdkVersion 18
buildToolsVersion "18.0.1"

sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}

instrumentTest.setRoot('tests')
}
}
Expand Up @@ -421,7 +421,8 @@ protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
View v = (View)getTag();
android.view.ViewGroup.LayoutParams params = v.getLayoutParams();
if (params == null) {
v.setLayoutParams(generateDefaultLayoutParams());
params = generateDefaultLayoutParams();
v.setLayoutParams(params);
}
if (v.getVisibility() != View.GONE) {
int heightSpec = getChildMeasureSpec(
Expand Down

0 comments on commit 3015f1a

Please sign in to comment.