feat:调整礼物面板-tab-new图标
This commit is contained in:
@@ -148,16 +148,16 @@ public class GiftIndicator extends LinearLayout {
|
||||
setPosition(index.getType());
|
||||
emitter.onNext(index.getType());
|
||||
if (index.isNeedNewTips()) {
|
||||
ImageView imageView = index.getItemView().findViewById(R.id.iv_new_tag);
|
||||
if (imageView.getVisibility() == VISIBLE) {
|
||||
imageView.setVisibility(GONE);
|
||||
View view = index.getItemView().findViewById(R.id.tv_new_tag);
|
||||
if (view.getVisibility() == VISIBLE) {
|
||||
view.setVisibility(GONE);
|
||||
DemoCache.saveNewGiftTypeTip(index.getType(), false);
|
||||
}
|
||||
}
|
||||
if (index.getType() == TYPE_PENALTY) {
|
||||
ImageView imageView = index.getItemView().findViewById(R.id.iv_new_tag);
|
||||
if (imageView.getVisibility() == VISIBLE) {
|
||||
imageView.setVisibility(GONE);
|
||||
View view = index.getItemView().findViewById(R.id.tv_new_tag);
|
||||
if (view.getVisibility() == VISIBLE) {
|
||||
view.setVisibility(GONE);
|
||||
DemoCache.saveNewGiftTypeTip(false);
|
||||
}
|
||||
} else if (index.getType() == TYPE_KNAP) {
|
||||
@@ -199,14 +199,14 @@ public class GiftIndicator extends LinearLayout {
|
||||
tab.getItemView().setVisibility(VISIBLE);
|
||||
if (tab.isNeedNewTips()) {
|
||||
if (DemoCache.readNewGiftTypeTip(tab.getType())) {
|
||||
ImageView imageView = tab.getItemView().findViewById(R.id.iv_new_tag);
|
||||
imageView.setVisibility(VISIBLE);
|
||||
View view = tab.getItemView().findViewById(R.id.tv_new_tag);
|
||||
view.setVisibility(VISIBLE);
|
||||
}
|
||||
}
|
||||
if (type == TYPE_PENALTY) {
|
||||
if (DemoCache.readNewGiftTypeTip()) {
|
||||
ImageView imageView = tab.getItemView().findViewById(R.id.iv_new_tag);
|
||||
imageView.setVisibility(VISIBLE);
|
||||
View view = tab.getItemView().findViewById(R.id.tv_new_tag);
|
||||
view.setVisibility(VISIBLE);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 1.1 KiB |
6
app/src/main/res/drawable/shape_ff425b_6dp.xml
Normal file
6
app/src/main/res/drawable/shape_ff425b_6dp.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<corners android:radius="6dp"/>
|
||||
<solid android:color="#FFFF425B"/>
|
||||
</shape>
|
@@ -17,12 +17,18 @@
|
||||
tools:ignore="SpUsage"
|
||||
tools:text="全部礼物" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_new_tag"
|
||||
<TextView
|
||||
android:id="@+id/tv_new_tag"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="11dp"
|
||||
android:layout_gravity="top"
|
||||
android:src="@drawable/ic_gift_dialog_new"
|
||||
android:layout_marginStart="-15dp"
|
||||
android:background="@drawable/shape_ff425b_6dp"
|
||||
android:gravity="center"
|
||||
android:paddingHorizontal="3dp"
|
||||
android:text="New"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="8dp"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
|
||||
|
Reference in New Issue
Block a user