修改消息红点
@ -25,6 +25,7 @@
|
|||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:paddingStart="10dp"
|
android:paddingStart="10dp"
|
||||||
android:paddingEnd="10dp"
|
android:paddingEnd="10dp"
|
||||||
|
android:paddingBottom="5dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center_horizontal"
|
android:layout_gravity="center_horizontal"
|
||||||
android:text="@string/loading"
|
android:text="@string/loading"
|
||||||
|
@ -1544,12 +1544,17 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
|||||||
messageNumber = event.getNumber();
|
messageNumber = event.getNumber();
|
||||||
if (event.getNumber() > 0) {
|
if (event.getNumber() > 0) {
|
||||||
v_table_redpoint.setVisibility(View.VISIBLE);
|
v_table_redpoint.setVisibility(View.VISIBLE);
|
||||||
|
if (event.getNumber()>9){
|
||||||
|
v_table_redpoint.setBackgroundResource(R.mipmap.ic_yola_msg_red2);
|
||||||
if (event.getNumber() > 99) {
|
if (event.getNumber() > 99) {
|
||||||
v_table_redpoint.setText("99+");
|
v_table_redpoint.setText("99+");
|
||||||
}else{
|
}else{
|
||||||
v_table_redpoint.setText(event.getNumber() + "");
|
v_table_redpoint.setText(event.getNumber() + "");
|
||||||
}
|
}
|
||||||
|
}else {
|
||||||
|
v_table_redpoint.setBackgroundResource(R.mipmap.ic_yola_msg_red1);
|
||||||
|
v_table_redpoint.setText(event.getNumber() + "");
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
v_table_redpoint.setVisibility(View.GONE);
|
v_table_redpoint.setVisibility(View.GONE);
|
||||||
v_table_redpoint.setText("");
|
v_table_redpoint.setText("");
|
||||||
|
@ -105,12 +105,13 @@
|
|||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/v_table_redpoint"
|
android:id="@+id/v_table_redpoint"
|
||||||
android:layout_width="8dp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="8dp"
|
android:layout_height="wrap_content"
|
||||||
android:background="@drawable/background_ff5075"
|
android:background="@mipmap/ic_yola_msg_red2"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
|
tools:text="12"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
android:textSize="10dp"
|
android:textSize="8sp"
|
||||||
android:visibility="visible"
|
android:visibility="visible"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
BIN
main/src/main/res/mipmap-hdpi/ic_yola_msg_red1.png
Normal file
After Width: | Height: | Size: 414 B |
BIN
main/src/main/res/mipmap-hdpi/ic_yola_msg_red2.png
Normal file
After Width: | Height: | Size: 432 B |
BIN
main/src/main/res/mipmap-mdpi/ic_yola_msg_red1.png
Normal file
After Width: | Height: | Size: 266 B |
BIN
main/src/main/res/mipmap-mdpi/ic_yola_msg_red2.png
Normal file
After Width: | Height: | Size: 276 B |
BIN
main/src/main/res/mipmap-xhdpi/ic_yola_msg_red1.png
Normal file
After Width: | Height: | Size: 464 B |
BIN
main/src/main/res/mipmap-xhdpi/ic_yola_msg_red2.png
Normal file
After Width: | Height: | Size: 486 B |
BIN
main/src/main/res/mipmap-xxhdpi/ic_yola_msg_red1.png
Normal file
After Width: | Height: | Size: 841 B |
BIN
main/src/main/res/mipmap-xxhdpi/ic_yola_msg_red2.png
Normal file
After Width: | Height: | Size: 863 B |
BIN
main/src/main/res/mipmap-xxxhdpi/ic_yola_msg_red1.png
Normal file
After Width: | Height: | Size: 770 B |
BIN
main/src/main/res/mipmap-xxxhdpi/ic_yola_msg_red2.png
Normal file
After Width: | Height: | Size: 789 B |