调整游戏详情自定义栏目间距
This commit is contained in:
@ -17,6 +17,7 @@ import com.gh.gamecenter.R;
|
||||
import androidx.appcompat.widget.AppCompatTextView;
|
||||
import androidx.core.content.ContextCompat;
|
||||
|
||||
// TODO 多次 setText 以后底部会多出一个高度等同于 lineSpacingExtra 的内边距
|
||||
public class ExpandTextView extends AppCompatTextView {
|
||||
|
||||
private CharSequence mSnapshotText;
|
||||
@ -90,7 +91,7 @@ public class ExpandTextView extends AppCompatTextView {
|
||||
float expandTextWidth;
|
||||
if (mUseGradientAlphaEndText) {
|
||||
additionalEndTextCount = DEFAULT_ADDITIONAL_END_TEXT_COUNT;
|
||||
// 如果不加多个括号的话有可能算不对,惊了,明明是同样的 paint 同样的文字,长度却会略有不同
|
||||
// 如果不加多个空格的话有可能算不对,惊了,明明是同样的 paint 同样的文字,长度却会略有不同
|
||||
expandTextWidth = paint.measureText(mEndText + mExpandText + " ");
|
||||
} else {
|
||||
expandTextWidth = paint.measureText(mExpandText);
|
||||
|
||||
@ -229,25 +229,13 @@
|
||||
tools:text="公告文章、权重大于0的自定义栏目和介绍文案,这三类版块内容可组合拼接为一个整体部分,即拼接内容可为其中两种(如公告文章+介绍文案),也可为全部三种(包括多个自定义栏目内容),其中公告文章和自定义栏目之间、公告文章和介绍文案之间、自定义栏目和介绍文案之间加上分割线隔开"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<Space
|
||||
android:id="@+id/marginSpacer"
|
||||
goneIf="@{TextUtils.isEmpty(customColumn.des)}"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/contentTv"
|
||||
app:layout_constraintLeft_toLeftOf="@id/contentTv"
|
||||
app:layout_constraintRight_toRightOf="@id/contentTv" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recyclerview"
|
||||
goneIf="@{customColumn.infoTag == null || customColumn.infoTag.size() == 0}"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="-4dp"
|
||||
android:paddingBottom="3dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/marginSpacer"
|
||||
app:layout_goneMarginTop="0dp" />
|
||||
app:layout_constraintTop_toBottomOf="@id/contentTv" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</FrameLayout>
|
||||
</layout>
|
||||
Reference in New Issue
Block a user