Skip to content

Commit

Permalink
10" improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
henrixapp committed Apr 23, 2019
1 parent 608b906 commit b23af8a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class ProductActivity : AppCompatActivity() {
* Calculate count of columns
*/
var columns: Int = 3
if (words.size > 9){
if (words.size > 12){
columns = 4
}
recyclerView.layoutManager = GridLayoutManager(self, columns)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class ProductsListAdapter internal constructor(
var is_red : Boolean = true

holder.wordItemView.text = current.name
if (products.size < 10){
if (products.size < 13){
is_red = (position%2 == 0)
} else {
is_red = ((position+(position/4)%2)%2 == 0)
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/recyclerview_product_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<RelativeLayout
android:id="@+id/textViewBox"
android:layout_width="fill_parent"
android:layout_height="128dp"
android:layout_height="160dp"
android:padding="16dp"
android:orientation="horizontal"
android:layout_gravity="center"
Expand Down

0 comments on commit b23af8a

Please sign in to comment.