更改底部Tab
@@ -24,6 +24,7 @@ public class MainRedPointTab extends RelativeLayout {
|
||||
private int mTabIcon, mTabIconSelect;
|
||||
private MainTab mMainTab;
|
||||
private TextView mTvNum;
|
||||
private String mTabText;
|
||||
|
||||
private RedPointDismissListener mListener;
|
||||
|
||||
@@ -42,11 +43,12 @@ public class MainRedPointTab extends RelativeLayout {
|
||||
TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.MainTab);
|
||||
mTabIcon = typedArray.getResourceId(R.styleable.MainTab_tab_icon, R.mipmap.ic_main_tab_game_home);
|
||||
mTabIconSelect = typedArray.getResourceId(R.styleable.MainTab_tab_icon_select, R.mipmap.ic_main_tab_game_pressed);
|
||||
|
||||
mTabText = typedArray.getString(R.styleable.MainTab_tab_text);
|
||||
boolean draggable = typedArray.getBoolean(R.styleable.MainTab_tab_draggable, false);
|
||||
mMainTab = findViewById(R.id.main_tab_msg);
|
||||
mMainTab.setmTabIcon(mTabIcon);
|
||||
mMainTab.setmTabIconSelect(mTabIconSelect);
|
||||
mMainTab.setText(mTabText);
|
||||
mTvNum = findViewById(R.id.msg_number);
|
||||
|
||||
if (draggable) {
|
||||
|
@@ -16,9 +16,9 @@
|
||||
android:textSize="10sp"
|
||||
app:tab_icon="@mipmap/ic_main_tab_game_home"
|
||||
app:tab_icon_select="@mipmap/ic_main_tab_game_pressed"
|
||||
app:tab_text=""
|
||||
app:tab_text_color_select="@color/color_1A1A1A"
|
||||
app:tab_text_color="@color/color_CCCCCC" />
|
||||
app:tab_text="首页"
|
||||
app:tab_text_color_select="@color/appColor"
|
||||
app:tab_text_color="@color/color_999999" />
|
||||
|
||||
<com.yizhuan.erban.ui.widget.MainTab
|
||||
android:id="@+id/main_home_tab"
|
||||
@@ -26,24 +26,13 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_weight="1"
|
||||
android:textSize="10sp"
|
||||
android:textSize="@dimen/sp_10"
|
||||
android:visibility="gone"
|
||||
app:tab_icon="@mipmap/ic_main_tab_home"
|
||||
app:tab_icon_select="@mipmap/ic_main_tab_home_pressed"
|
||||
app:tab_text=""
|
||||
app:tab_text_color_select="@color/color_1A1A1A"
|
||||
app:tab_text_color="@color/color_CCCCCC" />
|
||||
|
||||
<com.yizhuan.erban.ui.widget.MainRedPointTab
|
||||
android:id="@+id/main_msg_tab"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_weight="1"
|
||||
app:tab_icon="@mipmap/ic_main_tab_msg"
|
||||
app:tab_icon_select="@mipmap/ic_main_tab_msg_pressed"
|
||||
app:tab_draggable="true"
|
||||
/>
|
||||
app:tab_text_color_select="@color/appColor"
|
||||
app:tab_text_color="@color/color_999999" />
|
||||
|
||||
<com.yizhuan.erban.ui.widget.MainRedPointTab
|
||||
android:id="@+id/main_attention_tab"
|
||||
@@ -51,13 +40,27 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_weight="1"
|
||||
android:textSize="10sp"
|
||||
android:textSize="@dimen/sp_10"
|
||||
app:tab_icon="@mipmap/ic_main_tab_find"
|
||||
app:tab_icon_select="@mipmap/ic_main_tab_find_pressed"
|
||||
app:tab_text=""
|
||||
app:tab_text_color_select="@color/color_1A1A1A"
|
||||
app:tab_text_color="@color/color_CCCCCC"
|
||||
app:tab_draggable="false"/>
|
||||
app:tab_text="广场"
|
||||
app:tab_text_color_select="@color/appColor"
|
||||
app:tab_text_color="@color/color_999999"
|
||||
/>
|
||||
|
||||
<com.yizhuan.erban.ui.widget.MainRedPointTab
|
||||
android:id="@+id/main_msg_tab"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_weight="1"
|
||||
android:textSize="@dimen/sp_10"
|
||||
app:tab_icon="@mipmap/ic_main_tab_msg"
|
||||
app:tab_icon_select="@mipmap/ic_main_tab_msg_pressed"
|
||||
app:tab_text="消息"
|
||||
app:tab_text_color_select="@color/appColor"
|
||||
app:tab_text_color="@color/color_999999"
|
||||
/>
|
||||
|
||||
<com.yizhuan.erban.ui.widget.MainTab
|
||||
android:id="@+id/main_me_tab"
|
||||
@@ -65,11 +68,11 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_weight="1"
|
||||
android:textSize="10sp"
|
||||
android:textSize="@dimen/sp_10"
|
||||
app:tab_icon="@mipmap/ic_main_tab_me"
|
||||
app:tab_icon_select="@mipmap/ic_main_tab_me_pressed"
|
||||
app:tab_text=""
|
||||
app:tab_text_color_select="@color/color_1A1A1A"
|
||||
app:tab_text_color="@color/color_CCCCCC" />
|
||||
app:tab_text="我的"
|
||||
app:tab_text_color_select="@color/appColor"
|
||||
app:tab_text_color="@color/color_999999" />
|
||||
|
||||
</merge>
|
@@ -10,11 +10,13 @@
|
||||
android:id="@+id/main_tab_msg"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="0sp"
|
||||
app:tab_text=""
|
||||
android:layout_centerInParent="true"
|
||||
app:tab_text_color_select="@color/color_1A1A1A"
|
||||
app:tab_text_color="@color/color_CCCCCC" />
|
||||
android:textSize="10sp"
|
||||
app:tab_icon="@mipmap/ic_main_tab_game_home"
|
||||
app:tab_icon_select="@mipmap/ic_main_tab_game_pressed"
|
||||
app:tab_text="首页"
|
||||
app:tab_text_color_select="@color/appColor"
|
||||
app:tab_text_color="@color/color_999999" />
|
||||
|
||||
<com.netease.nim.uikit.common.ui.draggablebubbles.BubbleView
|
||||
android:id="@+id/msg_number"
|
||||
|
Before Width: | Height: | Size: 809 B After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 899 B After Width: | Height: | Size: 808 B |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 649 B After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 969 B After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 744 B After Width: | Height: | Size: 999 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.8 KiB |
@@ -51,7 +51,7 @@
|
||||
<color name="white_transparent_12">#1EFFFFFF</color>
|
||||
<color name="white_transparent_14">#23FFFFFF</color>
|
||||
|
||||
<color name="appColor">@color/color_34EBDE</color>
|
||||
<color name="appColor">@color/color_7154EE</color>
|
||||
<color name="color_common_text_content">#2C2C2E</color>
|
||||
<!-- 灰色 对应以前的 666666 -->
|
||||
<color name="color_common_text_gray">#626166</color>
|
||||
@@ -256,6 +256,7 @@
|
||||
<color name="bubbleView_dark_press_background">#E6000000</color>
|
||||
|
||||
|
||||
<color name="color_7154EE">#7154EE</color>
|
||||
<color name="color_333333">#333333</color>
|
||||
<color name="color_666666">#666666</color>
|
||||
<color name="color_ffc160">#ffc160</color>
|
||||
|