File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
library/src/main/java/com/tippingcanoe/dewey Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 44import android .support .v7 .widget .LinearLayoutManager ;
55import android .support .v7 .widget .RecyclerView ;
66import android .util .AttributeSet ;
7+ import android .util .Log ;
78import android .view .View ;
89import android .view .ViewGroup ;
910
@@ -98,8 +99,12 @@ public int getUniformCellWidth() {
9899 }
99100
100101 protected void updateUniformCellWidth () {
101- if ( areCellsUniform () && (uniformCellWidth * getItemCount ()) < getWidth () ) {
102- forcedCellWidth = (int ) ((float ) getWidth () / (float ) getItemCount ());
102+ if ( areCellsUniform () ) {
103+ if ( (uniformCellWidth * getItemCount ()) < getWidth () ) {
104+ forcedCellWidth = (int ) ((float ) getWidth () / (float ) getItemCount ());
105+ } else {
106+ forcedCellWidth = uniformCellWidth ;
107+ }
103108 }
104109 }
105110
You can’t perform that action at this time.
0 commit comments