Small behavior improvement

This commit is contained in:
M66B
2019-01-20 18:37:02 +00:00
parent 1adb42f0bd
commit be44b781d5
2 changed files with 23 additions and 10 deletions

View File

@@ -300,6 +300,15 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
super.itemView.getBottom());
}
void setDisplacement(float dx) {
ViewGroup group = (ViewGroup) itemView;
for (int i = 0; i < group.getChildCount(); i++) {
View child = group.getChildAt(i);
if (child.getId() != R.id.tvDay && child.getId() != R.id.vSeparatorDay)
child.setTranslationX(dx);
}
}
private void wire() {
final View touch = (viewType == ViewType.THREAD && threading ? ivExpander : vwColor);
touch.setOnClickListener(this);