Skip to content

Commit

Permalink
Fixed: issue 28. getItemCount() return 0 when res not loaded.
Browse files Browse the repository at this point in the history
  • Loading branch information
ittianyu committed Jun 29, 2017
1 parent abee617 commit 27a32d6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.0'
classpath 'com.android.tools.build:gradle:2.3.3'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
4 changes: 2 additions & 2 deletions widget/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ android {
defaultConfig {
minSdkVersion 9
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 14
versionName "1.2.0"
versionCode 15
versionName "1.2.1"

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,10 @@ public TextView getLargeLabelAt(int position) {
* @return
*/
public int getItemCount() {
return getBottomNavigationItemViews().length;
BottomNavigationItemView[] bottomNavigationItemViews = getBottomNavigationItemViews();
if (null == bottomNavigationItemViews)
return 0;
return bottomNavigationItemViews.length;
}

/**
Expand Down

0 comments on commit 27a32d6

Please sign in to comment.