Commit e56e1aa5 authored by Mark Murphy's avatar Mark Murphy

fix RecyclerView divider

parent 1c10c0bf
......@@ -45,7 +45,7 @@ class MainActivity : AppCompatActivity() {
addItemDecoration(
DividerItemDecoration(
this@MainActivity,
DividerItemDecoration.HORIZONTAL
DividerItemDecoration.VERTICAL
)
)
adapter = colorAdapter.apply {
......
......@@ -42,7 +42,7 @@ class MainActivity : AppCompatActivity() {
items.layoutManager = LinearLayoutManager(this)
items.addItemDecoration(
DividerItemDecoration(this, DividerItemDecoration.HORIZONTAL)
DividerItemDecoration(this, DividerItemDecoration.VERTICAL)
)
items.adapter = adapter
}
......
......@@ -42,7 +42,7 @@ class MainActivity : AppCompatActivity() {
items.layoutManager = LinearLayoutManager(this)
items.addItemDecoration(
DividerItemDecoration(this, DividerItemDecoration.HORIZONTAL)
DividerItemDecoration(this, DividerItemDecoration.VERTICAL)
)
items.adapter = adapter
}
......
......@@ -43,7 +43,7 @@ class MainActivity : AppCompatActivity() {
binding.apply {
items.layoutManager = LinearLayoutManager(this@MainActivity)
items.addItemDecoration(
DividerItemDecoration(this@MainActivity, DividerItemDecoration.HORIZONTAL)
DividerItemDecoration(this@MainActivity, DividerItemDecoration.VERTICAL)
)
items.adapter = adapter
}
......
......@@ -52,7 +52,7 @@ class ColorListFragment : Fragment() {
addItemDecoration(
DividerItemDecoration(
activity,
DividerItemDecoration.HORIZONTAL
DividerItemDecoration.VERTICAL
)
)
adapter = colorAdapter
......
......@@ -42,7 +42,7 @@ class MainActivity : AppCompatActivity() {
items.layoutManager = LinearLayoutManager(this)
items.addItemDecoration(
DividerItemDecoration(this, DividerItemDecoration.HORIZONTAL)
DividerItemDecoration(this, DividerItemDecoration.VERTICAL)
)
items.adapter = adapter
}
......
......@@ -40,7 +40,7 @@ class MainActivity : AppCompatActivity() {
items.layoutManager = LinearLayoutManager(this)
items.addItemDecoration(
DividerItemDecoration(this, DividerItemDecoration.HORIZONTAL)
DividerItemDecoration(this, DividerItemDecoration.VERTICAL)
)
items.adapter = adapter
}
......
......@@ -33,7 +33,7 @@ class MainActivity : AppCompatActivity() {
items.apply {
layoutManager = LinearLayoutManager(this@MainActivity)
addItemDecoration(
DividerItemDecoration(this@MainActivity, DividerItemDecoration.HORIZONTAL)
DividerItemDecoration(this@MainActivity, DividerItemDecoration.VERTICAL)
)
adapter = ColorAdapter(layoutInflater).apply {
submitList(buildItems())
......
......@@ -43,7 +43,7 @@ class MainActivity : AppCompatActivity() {
addItemDecoration(
DividerItemDecoration(
this@MainActivity,
DividerItemDecoration.HORIZONTAL
DividerItemDecoration.VERTICAL
)
)
adapter = colorAdapter.apply {
......
......@@ -43,7 +43,7 @@ class MainActivity : AppCompatActivity() {
addItemDecoration(
DividerItemDecoration(
this@MainActivity,
DividerItemDecoration.HORIZONTAL
DividerItemDecoration.VERTICAL
)
)
adapter = colorAdapter.apply {
......
......@@ -39,7 +39,7 @@ class MainActivity : AppCompatActivity() {
addItemDecoration(
DividerItemDecoration(
this@MainActivity,
DividerItemDecoration.HORIZONTAL
DividerItemDecoration.VERTICAL
)
)
adapter = ColorAdapter(layoutInflater).apply {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment