CP用名称文字渐变调整
This commit is contained in:
@@ -47,7 +47,7 @@ class MultipleGraduallyTextView(context: Context, attr: AttributeSet?, def: Int)
|
||||
endColor,
|
||||
afterEndColor
|
||||
),
|
||||
null,
|
||||
floatArrayOf(0f,0.2f,0.4f,0.6f,0.8f,1.0f),
|
||||
Shader.TileMode.CLAMP
|
||||
)
|
||||
paint.shader = gradient
|
||||
@@ -55,7 +55,7 @@ class MultipleGraduallyTextView(context: Context, attr: AttributeSet?, def: Int)
|
||||
}
|
||||
|
||||
override fun onDraw(canvas: Canvas) {
|
||||
super.onDraw(canvas)
|
||||
canvas.drawRect(0f, 0f, width.toFloat(), height.toFloat(), paint)
|
||||
super.onDraw(canvas)
|
||||
}
|
||||
}
|
@@ -52,13 +52,14 @@
|
||||
|
||||
<com.yizhuan.erban.ui.widget.MultipleGraduallyTextView
|
||||
android:id="@+id/tv_mine_name"
|
||||
android:layout_width="90dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constrainedWidth="true"
|
||||
android:layout_marginLeft="@dimen/dp_4"
|
||||
android:layout_marginTop="@dimen/dp_6"
|
||||
android:background="@drawable/bg_cp_text_perpule"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center_horizontal"
|
||||
android:gravity="center"
|
||||
android:paddingLeft="@dimen/dp_6"
|
||||
android:paddingRight="@dimen/dp_6"
|
||||
android:singleLine="true"
|
||||
@@ -141,13 +142,14 @@
|
||||
|
||||
<com.yizhuan.erban.ui.widget.MultipleGraduallyTextView
|
||||
android:id="@+id/tv_other_name"
|
||||
android:layout_width="90dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_6"
|
||||
android:background="@drawable/bg_cp_text_perpule"
|
||||
android:ellipsize="end"
|
||||
android:paddingLeft="@dimen/dp_6"
|
||||
android:paddingRight="@dimen/dp_6"
|
||||
android:gravity="center"
|
||||
android:singleLine="true"
|
||||
android:text="@{inviteData==null?(cpEntity.cpUid==0?@string/invite_cp:cpEntity.cpNick):inviteData.acceptNick}"
|
||||
android:textColor="@color/white"
|
||||
|
Reference in New Issue
Block a user