|
|
@@ -104,18 +104,18 @@ public class CommonUserItemView extends ConstraintLayout {
|
|
|
|
|
|
int gravityType = typedArray.getInt(R.styleable.CommonUserItemView_item_wrap_style,10);
|
|
|
ConstraintSet set= new ConstraintSet();
|
|
|
+ set.clone(this);
|
|
|
+ set.setGoneMargin(titleText.getId(),6,0);
|
|
|
+ set.setGoneMargin(detailText.getId(),7,0);
|
|
|
if (gravityType == 10){//left
|
|
|
- set.clone(this);
|
|
|
set.constrainWidth(titleText.getId(),0);
|
|
|
set.constrainWidth(detailText.getId(),ConstraintSet.WRAP_CONTENT);
|
|
|
set.applyTo(this);
|
|
|
} else if (gravityType == 20){//center
|
|
|
- set.clone(this);
|
|
|
set.constrainWidth(titleText.getId(),0);
|
|
|
set.constrainWidth(detailText.getId(),0);
|
|
|
set.applyTo(this);
|
|
|
} else if (gravityType == 30){//right
|
|
|
- set.clone(this);
|
|
|
set.constrainWidth(titleText.getId(),ConstraintSet.WRAP_CONTENT);
|
|
|
set.constrainWidth(detailText.getId(),0);
|
|
|
set.applyTo(this);
|