Commit 0a328d65 authored by Mark Murphy's avatar Mark Murphy

fix RecyclerView divider

parent ea0fc34c
......@@ -44,7 +44,7 @@ public class MainActivity extends AppCompatActivity {
adapter.submitList(vm.numbers);
items.setLayoutManager(new LinearLayoutManager(this));
items.addItemDecoration(
new DividerItemDecoration(this, DividerItemDecoration.HORIZONTAL));
new DividerItemDecoration(this, DividerItemDecoration.VERTICAL));
items.setAdapter(adapter);
setSupportActionBar(findViewById(R.id.toolbar));
......
......@@ -42,7 +42,7 @@ public class MainActivity extends AppCompatActivity {
items.setLayoutManager(new LinearLayoutManager(this));
items.addItemDecoration(
new DividerItemDecoration(this, DividerItemDecoration.HORIZONTAL));
new DividerItemDecoration(this, DividerItemDecoration.VERTICAL));
items.setAdapter(adapter);
}
......
......@@ -42,7 +42,7 @@ public class MainActivity extends AppCompatActivity {
items.setLayoutManager(new LinearLayoutManager(this));
items.addItemDecoration(
new DividerItemDecoration(this, DividerItemDecoration.HORIZONTAL));
new DividerItemDecoration(this, DividerItemDecoration.VERTICAL));
items.setAdapter(adapter);
}
......
......@@ -43,7 +43,7 @@ public class MainActivity extends AppCompatActivity {
binding.items.setLayoutManager(new LinearLayoutManager(this));
binding.items.addItemDecoration(
new DividerItemDecoration(this, DividerItemDecoration.HORIZONTAL));
new DividerItemDecoration(this, DividerItemDecoration.VERTICAL));
binding.items.setAdapter(adapter);
}
......
......@@ -50,7 +50,7 @@ public class ColorListFragment extends Fragment {
items.setLayoutManager(new LinearLayoutManager(getActivity()));
items.addItemDecoration(new DividerItemDecoration(getActivity(),
DividerItemDecoration.HORIZONTAL));
DividerItemDecoration.VERTICAL));
items.setAdapter(colorAdapter);
vm.numbers.observe(this, colorAdapter::submitList);
......
......@@ -42,7 +42,7 @@ public class MainActivity extends AppCompatActivity {
items.setLayoutManager(new LinearLayoutManager(this));
items.addItemDecoration(
new DividerItemDecoration(this, DividerItemDecoration.HORIZONTAL));
new DividerItemDecoration(this, DividerItemDecoration.VERTICAL));
items.setAdapter(adapter);
}
......
......@@ -40,7 +40,7 @@ public class MainActivity extends AppCompatActivity {
items.setLayoutManager(new LinearLayoutManager(this));
items.addItemDecoration(
new DividerItemDecoration(this, DividerItemDecoration.HORIZONTAL));
new DividerItemDecoration(this, DividerItemDecoration.VERTICAL));
items.setAdapter(adapter);
}
......
......@@ -39,7 +39,7 @@ public class MainActivity extends AppCompatActivity {
adapter.submitList(buildItems());
items.setLayoutManager(new LinearLayoutManager(this));
items.addItemDecoration(
new DividerItemDecoration(this, DividerItemDecoration.HORIZONTAL));
new DividerItemDecoration(this, DividerItemDecoration.VERTICAL));
items.setAdapter(adapter);
}
......
......@@ -43,7 +43,7 @@ public class MainActivity extends AppCompatActivity {
adapter.submitList(vm.numbers);
items.setLayoutManager(new LinearLayoutManager(this));
items.addItemDecoration(
new DividerItemDecoration(this, DividerItemDecoration.HORIZONTAL));
new DividerItemDecoration(this, DividerItemDecoration.VERTICAL));
items.setAdapter(adapter);
Toolbar tb = findViewById(R.id.toolbar);
......
......@@ -43,7 +43,7 @@ public class MainActivity extends AppCompatActivity {
adapter.submitList(vm.numbers);
items.setLayoutManager(new LinearLayoutManager(this));
items.addItemDecoration(
new DividerItemDecoration(this, DividerItemDecoration.HORIZONTAL));
new DividerItemDecoration(this, DividerItemDecoration.VERTICAL));
items.setAdapter(adapter);
Toolbar tb = findViewById(R.id.toolbar);
......
......@@ -39,7 +39,7 @@ public class MainActivity extends AppCompatActivity {
adapter.submitList(vm.numbers);
items.setLayoutManager(new LinearLayoutManager(this));
items.addItemDecoration(
new DividerItemDecoration(this, DividerItemDecoration.HORIZONTAL));
new DividerItemDecoration(this, DividerItemDecoration.VERTICAL));
items.setAdapter(adapter);
Log.d(TAG, "onCreate() called!");
......
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