From e4c8b3d0941f4501646c0d856d0eee511da1dc76 Mon Sep 17 00:00:00 2001
From: chaychan <844738237@qq.com>
Date: Sun, 10 Sep 2017 13:47:03 +0800
Subject: [PATCH 1/4] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=AE=BE=E7=BD=AE?=
=?UTF-8?q?=E6=9C=AA=E8=AF=BB=E6=95=B0=E3=80=81=E6=8F=90=E7=A4=BA=E5=B0=8F?=
=?UTF-8?q?=E7=BA=A2=E7=82=B9=E3=80=81=E6=8F=90=E7=A4=BA=E6=B6=88=E6=81=AF?=
=?UTF-8?q?=E7=9A=84=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../bottombarlayout/MainActivity.java | 5 ++
library/build.gradle | 2 +-
.../com/chaychan/library/BottomBarItem.java | 66 +++++++++++++++++--
.../com/chaychan/library/BottomBarLayout.java | 42 ++++++++++++
.../main/res/drawable/shape_notify_point.xml | 9 +++
.../src/main/res/drawable/shape_unread.xml | 6 ++
.../src/main/res/layout/item_bottom_bar.xml | 60 +++++++++++++++--
library/src/main/res/values/attr.xml | 4 ++
library/src/main/res/values/colors.xml | 1 +
9 files changed, 181 insertions(+), 14 deletions(-)
create mode 100644 library/src/main/res/drawable/shape_notify_point.xml
create mode 100644 library/src/main/res/drawable/shape_unread.xml
diff --git a/demo/src/main/java/com/chaychan/bottombarlayout/MainActivity.java b/demo/src/main/java/com/chaychan/bottombarlayout/MainActivity.java
index f416d64..105e4c6 100644
--- a/demo/src/main/java/com/chaychan/bottombarlayout/MainActivity.java
+++ b/demo/src/main/java/com/chaychan/bottombarlayout/MainActivity.java
@@ -113,6 +113,11 @@ public void run() {
cancelTabLoading(bottomItem);//停止旋转动画
}
});
+
+ mBottomBarLayout.setUnread(0,20);//设置第一个页签的未读数为20
+ mBottomBarLayout.setUnread(1,101);//设置第二个页签的未读书
+ mBottomBarLayout.showNotify(2);//设置第三个页签显示提示的小红点
+ mBottomBarLayout.setMsg(3,"NEW");//设置第四个页签显示NEW提示文字
}
/**停止首页页签的旋转动画*/
diff --git a/library/build.gradle b/library/build.gradle
index 841548e..90c8b69 100644
--- a/library/build.gradle
+++ b/library/build.gradle
@@ -22,7 +22,7 @@ android {
}
dependencies {
- compile fileTree(dir: 'libs', include: ['*.jar'])
+ compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
diff --git a/library/src/main/java/com/chaychan/library/BottomBarItem.java b/library/src/main/java/com/chaychan/library/BottomBarItem.java
index 5e92a1b..a11edd9 100644
--- a/library/src/main/java/com/chaychan/library/BottomBarItem.java
+++ b/library/src/main/java/com/chaychan/library/BottomBarItem.java
@@ -5,6 +5,7 @@
import android.graphics.drawable.Drawable;
import android.support.annotation.Nullable;
import android.util.AttributeSet;
+import android.util.TypedValue;
import android.view.Gravity;
import android.view.View;
import android.widget.ImageView;
@@ -12,7 +13,6 @@
import android.widget.TextView;
-
/**
* @author ChayChan
* @description: 底部tab条目
@@ -35,9 +35,15 @@ public class BottomBarItem extends LinearLayout {
private int mIconHeight;//图标的高度
private int mItemPadding;//BottomBarItem的padding
- private TextView mTextView;
+
private ImageView mImageView;
+ private TextView mTvUnread;
+ private TextView mTvNotify;
+ private TextView mTvMsg;
+ private TextView mTextView;
+ private int mUnreadTextSize = 10; //未读数默认字体大小10sp
+ private int mMsgTextSize = 6; //消息默认字体大小6sp
public BottomBarItem(Context context) {
@@ -73,6 +79,9 @@ public BottomBarItem(Context context, @Nullable AttributeSet attrs, int defStyle
mIconHeight = ta.getDimensionPixelSize(R.styleable.BottomBarItem_iconHeight, 0);
mItemPadding = ta.getDimensionPixelSize(R.styleable.BottomBarItem_itemPadding, 0);
+ mUnreadTextSize = ta.getDimensionPixelSize(R.styleable.BottomBarItem_unreadTextSize, UIUtils.sp2px(mContext,mUnreadTextSize));
+ mMsgTextSize = ta.getDimensionPixelSize(R.styleable.BottomBarItem_msgTextSize, UIUtils.sp2px(mContext,mMsgTextSize));
+
ta.recycle();
checkValues();
@@ -107,9 +116,11 @@ private void init() {
view.setPadding(mItemPadding,mItemPadding,mItemPadding,mItemPadding);
}
mImageView = (ImageView) view.findViewById(R.id.iv_icon);
+ mTvUnread = (TextView) view.findViewById(R.id.tv_unred_num);
+ mTvMsg = (TextView) view.findViewById(R.id.tv_msg);
+ mTvNotify = (TextView) view.findViewById(R.id.tv_point);
mTextView = (TextView) view.findViewById(R.id.tv_text);
-
mImageView.setImageResource(mIconNormalResourceId);
if (mIconWidth != 0 && mIconHeight != 0){
@@ -120,9 +131,12 @@ private void init() {
mImageView.setLayoutParams(imageLayoutParams);
}
- mTextView.getPaint().setTextSize(mTextSize);
- mTextView.setText(mText);
- mTextView.setTextColor(mTextColorNormal);
+ mTextView.setTextSize(TypedValue.COMPLEX_UNIT_PX,mTextSize);//设置底部文字字体大小
+ mTvUnread.setTextSize(TypedValue.COMPLEX_UNIT_PX,mUnreadTextSize);//设置未读数的字体大小
+ mTvMsg.setTextSize(TypedValue.COMPLEX_UNIT_PX,mMsgTextSize);//设置提示文字的字体大小
+
+ mTextView.setTextColor(mTextColorNormal);//设置底部文字字体颜色
+ mTextView.setText(mText);//设置标签文字
LayoutParams textLayoutParams = (LayoutParams) mTextView.getLayoutParams();
textLayoutParams.topMargin = mMarginTop;
@@ -156,4 +170,44 @@ public void setStatus(boolean isSelected){
mImageView.setImageResource(isSelected?mIconSelectedResourceId:mIconNormalResourceId);
mTextView.setTextColor(isSelected?mTextColorSelected:mTextColorNormal);
}
+
+ private void setTvVisiable(TextView tv){
+ //都设置为不可见
+ mTvUnread.setVisibility(GONE);
+ mTvMsg.setVisibility(GONE);
+ mTvNotify.setVisibility(GONE);
+
+ tv.setVisibility(VISIBLE);//设置为可见
+ }
+
+ /**
+ * 设置未读数
+ * @param unreadNum 小于等于0则隐藏,大于0小于99则显示对应数字,超过99显示99+
+ */
+ public void setUnreadNum(int unreadNum){
+ setTvVisiable(mTvUnread);
+ if (unreadNum <= 0){
+ mTvUnread.setVisibility(GONE);
+ }else if (unreadNum <= 99){
+ mTvUnread.setText(String.valueOf(unreadNum));
+ }else{
+ mTvUnread.setText("99+");
+ }
+ }
+ public void setMsg(String msg){
+ setTvVisiable(mTvMsg);
+ mTvMsg.setText(msg);
+ }
+
+ public void hideMsg(){
+ mTvMsg.setVisibility(GONE);
+ }
+
+ public void showNotify(){
+ setTvVisiable(mTvNotify);
+ }
+
+ public void hideNotify(){
+ mTvNotify.setVisibility(GONE);
+ }
}
diff --git a/library/src/main/java/com/chaychan/library/BottomBarLayout.java b/library/src/main/java/com/chaychan/library/BottomBarLayout.java
index 337d8a6..7858c37 100644
--- a/library/src/main/java/com/chaychan/library/BottomBarLayout.java
+++ b/library/src/main/java/com/chaychan/library/BottomBarLayout.java
@@ -136,6 +136,48 @@ public void setCurrentItem(int currentItem) {
mViewPager.setCurrentItem(mCurrentItem,mSmoothScroll);
}
+ /**
+ * 设置未读数
+ * @param position 底部标签的下标
+ * @param unreadNum 未读数
+ */
+ public void setUnread(int position,int unreadNum){
+ mItemViews.get(position).setUnreadNum(unreadNum);
+ }
+
+ /**
+ * 设置提示消息
+ * @param position 底部标签的下标
+ * @param msg 未读数
+ */
+ public void setMsg(int position,String msg){
+ mItemViews.get(position).setMsg(msg);
+ }
+
+ /**
+ * 隐藏提示消息
+ * @param position 底部标签的下标
+ */
+ public void hideMsg(int position){
+ mItemViews.get(position).hideMsg();
+ }
+
+ /**
+ * 显示提示的小红点
+ * @param position 底部标签的下标
+ */
+ public void showNotify(int position){
+ mItemViews.get(position).showNotify();
+ }
+
+ /**
+ * 隐藏提示的小红点
+ * @param position 底部标签的下标
+ */
+ public void hideNotify(int position){
+ mItemViews.get(position).hideNotify();
+ }
+
public int getCurrentItem() {
return mCurrentItem;
}
diff --git a/library/src/main/res/drawable/shape_notify_point.xml b/library/src/main/res/drawable/shape_notify_point.xml
new file mode 100644
index 0000000..9507100
--- /dev/null
+++ b/library/src/main/res/drawable/shape_notify_point.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/library/src/main/res/drawable/shape_unread.xml b/library/src/main/res/drawable/shape_unread.xml
new file mode 100644
index 0000000..8290ce8
--- /dev/null
+++ b/library/src/main/res/drawable/shape_unread.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/library/src/main/res/layout/item_bottom_bar.xml b/library/src/main/res/layout/item_bottom_bar.xml
index 78f25ba..e7ca1a5 100644
--- a/library/src/main/res/layout/item_bottom_bar.xml
+++ b/library/src/main/res/layout/item_bottom_bar.xml
@@ -1,18 +1,64 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/library/src/main/res/values/colors.xml b/library/src/main/res/values/colors.xml
index 73bb0c1..caa2a19 100644
--- a/library/src/main/res/values/colors.xml
+++ b/library/src/main/res/values/colors.xml
@@ -1,5 +1,6 @@
#ffffff
+ #ff0000
#DDDDDD
\ No newline at end of file
From 63b497918e8abda3b0fac141e576b0c0ec00de0f Mon Sep 17 00:00:00 2001
From: chaychan <844738237@qq.com>
Date: Sun, 10 Sep 2017 14:00:15 +0800
Subject: [PATCH 2/4] =?UTF-8?q?=E6=9B=B4=E6=96=B0README?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
README.md | 79 +++++++++++++++++++++++++++++++-----------------
intro_img/4.png | Bin 0 -> 21700 bytes
2 files changed, 51 insertions(+), 28 deletions(-)
create mode 100644 intro_img/4.png
diff --git a/README.md b/README.md
index e097a8d..a9dbe76 100644
--- a/README.md
+++ b/README.md
@@ -3,9 +3,43 @@
![](./intro_img/display1.gif)
+####显示未读数、提示小红点、提示消息
+
+![](./intro_img/4.png)
### BottomBarLayout的使用
+#### BottomBarItem属性介绍
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#### 布局文件中配置
在xml文件中,配置BottomBarLayout,包裹子条目BottomBarItem
@@ -94,33 +128,6 @@
-#### BottomBarItem属性介绍
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
#### java文件中设置
找过对应的ViewPager和BottomBarLayout,为ViewPager设置Adapter,然后为BottomBarLayout设置ViewPager
@@ -149,6 +156,22 @@
}
});
+#### 显示未读数、提示小红点、提示消息
+
+ mBottomBarLayout.setUnread(0,20);//设置第一个页签的未读数为20
+ mBottomBarLayout.setUnread(1,101);//设置第二个页签的未读书
+ mBottomBarLayout.showNotify(2);//设置第三个页签显示提示的小红点
+ mBottomBarLayout.setMsg(3,"NEW");//设置第四个页签显示NEW提示文字
+
+当设置的未读数小于或等于0时,消失未读数的小红点将会消失;
+当未读数为1-99时,则显示对应的数字;
+当未读数大于99时,显示99+;
+
+#### 隐藏提示小红点、提示消息
+
+ mBottomBarLayout.hideNotify(2);//隐藏第三个页签显示提示的小红点
+ mBottomBarLayout.hideMsg(3);//隐藏第四个页签显示的提示文字
+
#### BottomBarItem的介绍
BottomBarItem继承于LinearLayout,其子View有显示图标的ImageView和展示文字的TextView,分别可以通过getImageView()和getTextView()方法获取到对应的子控件。github上不少底部导航栏的控件都没能获取到对应的子控件,所以在需要对子控件进行操作的时候极不方便,有一些的思路并不是用ImageView和TextView,而是用绘制的,所以也不能获取到对应的显示图标的控件或展示文字的控件,造成无法获取到该控件,无法进行一些业务上的操作,比如类似今日头条的底部的首页,点击首页的页签,会更换成加载中的图标,执行旋转动画,BottomBarLayout可以轻松地做到这个需求。
@@ -233,7 +256,7 @@
打开app的module中的build.gradle,在dependencies{}中,添加依赖,如下:
dependencies {
- compile 'com.github.chaychan:BottomBarLayout:1.0.2'
+ compile 'com.github.chaychan:BottomBarLayout:1.0.3'
}
diff --git a/intro_img/4.png b/intro_img/4.png
new file mode 100644
index 0000000000000000000000000000000000000000..b0581f59165ac07a40d2c3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sPAi6J#%`xd9eV77
zPD-gvZJX-Ra#LqLS-!|5^WX=HIb(W804;N~hq&%mELA~MyKhHs{ur)Bs;(
z)|7B?D&Ohv6M14{P$hSrN<5-2IdVQgy@*Ew`;+;Yux%Hh*T*K;++_!rF9EDI!b9d=
z4qx2mLXf{fzaQCrBbB9!`Uwkq+qWhF+sd0U$Q@u`b`>qX_lX_LIg`OrcZynel
z$%%zTti?e%zE_tShNTk_G16Y!U%9!V?mVV-Tby-PV}-G2pDbE9Oz%!eu3lLK43C^g
zvIW1$sVrUxz_FvLPTg_0B%d|89H!&XkKy}Eea_Q$jkOa6Qg*5qV`3TVDM5Sv&|t`o
z9)|U=5DN$L3R-(lAXvl{Gn!_t#>{FnqS`|WkWP-In2I@V)~L*6$v8Qz$7y>jBMW0Q
z5}A!0k%hsPS~rI8HK;MW-Q&JGU6_?
z*tXFEiCM4Zz3c7b&a=f{BQ!_OzVnr$cJsmK&LAIGR|~dVZ+z2S6}=8uJEE4QuA2v1
zd0FIZq03BaBI3SkCkQgg5SM2#_
zeJG45#+P6KmvjU1>r6&;2Z5b&{_;Fr4w+G_soh*(@
zmg9Ujm64db^HnQL+!js6U3(|x+`RQ(-npXZlej*;G3XtU=cvJw8)IWr#0JCHs86kO
zkIKPBzC-4bCT-U&waSCOI%~aiNpF*aGcF(2jFGSPt_;-t6W5(J*LG$nAa?W>ir5r)
z^5h@uZRTWef+
Date: Wed, 13 Sep 2017 23:00:10 +0800
Subject: [PATCH 3/4] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=9B=B4=E6=94=B9?=
=?UTF-8?q?=E5=9B=BE=E6=A0=87=E5=A4=A7=E5=B0=8F=E5=87=BA=E7=8E=B0=E7=9A=84?=
=?UTF-8?q?BUG?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
library/src/main/java/com/chaychan/library/BottomBarItem.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/library/src/main/java/com/chaychan/library/BottomBarItem.java b/library/src/main/java/com/chaychan/library/BottomBarItem.java
index a11edd9..aa8169b 100644
--- a/library/src/main/java/com/chaychan/library/BottomBarItem.java
+++ b/library/src/main/java/com/chaychan/library/BottomBarItem.java
@@ -8,6 +8,7 @@
import android.util.TypedValue;
import android.view.Gravity;
import android.view.View;
+import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
@@ -125,7 +126,7 @@ private void init() {
if (mIconWidth != 0 && mIconHeight != 0){
//如果有设置图标的宽度和高度,则设置ImageView的宽高
- LayoutParams imageLayoutParams = (LayoutParams) mImageView.getLayoutParams();
+ FrameLayout.LayoutParams imageLayoutParams = (FrameLayout.LayoutParams) mImageView.getLayoutParams();
imageLayoutParams.width = mIconWidth;
imageLayoutParams.height = mIconHeight;
mImageView.setLayoutParams(imageLayoutParams);
From e4ab5a5f1ec3c62200bd664e9a8e0b192c7413ce Mon Sep 17 00:00:00 2001
From: chaychan <844738237@qq.com>
Date: Wed, 13 Sep 2017 23:03:36 +0800
Subject: [PATCH 4/4] =?UTF-8?q?=E6=9B=B4=E6=96=B0README?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index a9dbe76..c82c723 100644
--- a/README.md
+++ b/README.md
@@ -256,7 +256,7 @@
打开app的module中的build.gradle,在dependencies{}中,添加依赖,如下:
dependencies {
- compile 'com.github.chaychan:BottomBarLayout:1.0.3'
+ compile 'com.github.chaychan:BottomBarLayout:1.0.4'
}