Small improvement

This commit is contained in:
M66B 2019-04-04 08:11:18 +02:00
parent f0bdc40d7b
commit 3445f79465
7 changed files with 7 additions and 7 deletions

View File

@ -136,7 +136,7 @@ public class AdapterFolder extends RecyclerView.Adapter<AdapterFolder.ViewHolder
rvChilds.setLayoutManager(llm);
rvChilds.setNestedScrollingEnabled(false);
DividerItemDecoration itemDecorator = new DividerItemDecoration(context, DividerItemDecoration.VERTICAL);
DividerItemDecoration itemDecorator = new DividerItemDecoration(context, llm.getOrientation());
itemDecorator.setDrawable(context.getDrawable(R.drawable.divider));
rvChilds.addItemDecoration(itemDecorator);

View File

@ -88,7 +88,7 @@ public class FragmentAccounts extends FragmentBase {
LinearLayoutManager llm = new LinearLayoutManager(getContext());
rvAccount.setLayoutManager(llm);
DividerItemDecoration itemDecorator = new DividerItemDecoration(getContext(), DividerItemDecoration.VERTICAL);
DividerItemDecoration itemDecorator = new DividerItemDecoration(getContext(), llm.getOrientation());
itemDecorator.setDrawable(getContext().getDrawable(R.drawable.divider));
rvAccount.addItemDecoration(itemDecorator);

View File

@ -66,7 +66,7 @@ public class FragmentAnswers extends FragmentBase {
LinearLayoutManager llm = new LinearLayoutManager(getContext());
rvAnswer.setLayoutManager(llm);
DividerItemDecoration itemDecorator = new DividerItemDecoration(getContext(), DividerItemDecoration.VERTICAL);
DividerItemDecoration itemDecorator = new DividerItemDecoration(getContext(), llm.getOrientation());
itemDecorator.setDrawable(getContext().getDrawable(R.drawable.divider));
rvAnswer.addItemDecoration(itemDecorator);

View File

@ -133,7 +133,7 @@ public class FragmentFolders extends FragmentBase {
LinearLayoutManager llm = new LinearLayoutManager(getContext());
rvFolder.setLayoutManager(llm);
DividerItemDecoration itemDecorator = new DividerItemDecoration(getContext(), DividerItemDecoration.VERTICAL);
DividerItemDecoration itemDecorator = new DividerItemDecoration(getContext(), llm.getOrientation());
itemDecorator.setDrawable(getContext().getDrawable(R.drawable.divider));
rvFolder.addItemDecoration(itemDecorator);

View File

@ -68,7 +68,7 @@ public class FragmentIdentities extends FragmentBase {
LinearLayoutManager llm = new LinearLayoutManager(getContext());
rvIdentity.setLayoutManager(llm);
DividerItemDecoration itemDecorator = new DividerItemDecoration(getContext(), DividerItemDecoration.VERTICAL);
DividerItemDecoration itemDecorator = new DividerItemDecoration(getContext(), llm.getOrientation());
itemDecorator.setDrawable(getContext().getDrawable(R.drawable.divider));
rvIdentity.addItemDecoration(itemDecorator);

View File

@ -310,7 +310,7 @@ public class FragmentMessages extends FragmentBase {
LinearLayoutManager llm = new LinearLayoutManager(getContext());
rvMessage.setLayoutManager(llm);
DividerItemDecoration itemDecorator = new DividerItemDecoration(getContext(), DividerItemDecoration.VERTICAL) {
DividerItemDecoration itemDecorator = new DividerItemDecoration(getContext(), llm.getOrientation()) {
@Override
public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state) {
if (view.findViewById(R.id.clItem).getVisibility() == View.GONE)

View File

@ -81,7 +81,7 @@ public class FragmentRules extends FragmentBase {
adapter = new AdapterRule(getContext(), getViewLifecycleOwner());
rvRule.setAdapter(adapter);
DividerItemDecoration itemDecorator = new DividerItemDecoration(getContext(), DividerItemDecoration.VERTICAL);
DividerItemDecoration itemDecorator = new DividerItemDecoration(getContext(), llm.getOrientation());
itemDecorator.setDrawable(getContext().getDrawable(R.drawable.divider));
rvRule.addItemDecoration(itemDecorator);