光环助手V4.0.0-游戏详情Tab202200509测试问题1 https://gitlab.ghzs.com/pm/halo-app-issues/-/issues/827
This commit is contained in:
@ -52,6 +52,7 @@ public class MarqueeView extends ViewFlipper {
|
||||
textSize = DisplayUtils.px2sp(mContext, textSize);
|
||||
}
|
||||
textColor = typedArray.getColor(R.styleable.MarqueeViewStyle_mvTextColor, textColor);
|
||||
useSingleLineText = typedArray.getBoolean(R.styleable.MarqueeViewStyle_mvSingleLine, useSingleLineText);
|
||||
typedArray.recycle();
|
||||
|
||||
setFlipInterval(interval);
|
||||
@ -115,14 +116,14 @@ public class MarqueeView extends ViewFlipper {
|
||||
// 创建ViewFlipper下的TextView
|
||||
private TextView createTextView(String text) {
|
||||
TextView tv = new TextView(mContext);
|
||||
tv.setGravity(Gravity.LEFT | Gravity.CENTER_VERTICAL);
|
||||
tv.setText(text);
|
||||
tv.setTextColor(textColor);
|
||||
tv.setTextSize(textSize);
|
||||
if (useSingleLineText) {
|
||||
tv.setSingleLine(true);
|
||||
tv.setEllipsize(TextUtils.TruncateAt.END);
|
||||
}
|
||||
tv.setGravity(Gravity.LEFT | Gravity.CENTER_VERTICAL);
|
||||
tv.setText(text);
|
||||
tv.setTextColor(textColor);
|
||||
tv.setTextSize(textSize);
|
||||
return tv;
|
||||
}
|
||||
|
||||
|
||||
@ -64,9 +64,11 @@
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="4dp"
|
||||
android:layout_marginRight="16dp"
|
||||
android:layout_toLeftOf="@id/arrowIv"
|
||||
android:layout_toRightOf="@id/iconIv"
|
||||
app:mvAnimDuration="1000"
|
||||
app:mvSingleLine="true"
|
||||
app:mvInterval="3000"
|
||||
app:mvTextColor="@color/fuli_detail"
|
||||
app:mvTextSize="12sp" />
|
||||
|
||||
@ -16,6 +16,7 @@
|
||||
android:gravity = "center_vertical"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginRight="20dp"
|
||||
android:orientation="horizontal"
|
||||
android:padding="12dp">
|
||||
|
||||
<ImageView
|
||||
@ -26,12 +27,21 @@
|
||||
|
||||
<com.gh.common.view.MarqueeView
|
||||
android:id = "@+id/gamedetail_item_notice"
|
||||
android:layout_width = "match_parent"
|
||||
android:layout_width = "0dp"
|
||||
android:layout_height = "wrap_content"
|
||||
android:layout_marginRight="4dp"
|
||||
android:layout_weight="1"
|
||||
app:mvAnimDuration = "1000"
|
||||
app:mvInterval = "3000"
|
||||
app:mvTextColor = "@color/fuli_detail"
|
||||
app:mvSingleLine="true"
|
||||
app:mvTextSize = "12sp" />
|
||||
<ImageView
|
||||
android:id="@+id/arrowIv"
|
||||
android:layout_width="12dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:src="@drawable/ic_arrow_gray" />
|
||||
</LinearLayout >
|
||||
|
||||
</LinearLayout >
|
||||
@ -6,6 +6,7 @@
|
||||
<attr name = "mvAnimDuration" format = "integer|reference" />
|
||||
<attr name = "mvTextSize" format = "dimension|reference" />
|
||||
<attr name = "mvTextColor" format = "color|reference" />
|
||||
<attr name = "mvSingleLine" format = "boolean" />
|
||||
</declare-styleable >
|
||||
|
||||
<declare-styleable name = "CardLayout" >
|
||||
|
||||
Reference in New Issue
Block a user