導航:首頁 > 操作系統 > android圖標角標

android圖標角標

發布時間:2022-06-11 22:24:27

『壹』 安卓手機如何讓qq消息顯示角標

安卓系統是一款手機系統,手機系統是沒有類似電腦操作系統顯示角標的,只能在通知欄顯示當前運行程序圖標。


設置步驟如下:

1、手機登錄QQ;

2、點擊左上方頭像,在彈出頁面的左下方點擊」設置「按鈕;

3、在設置頁面點擊下方」輔助功能「;

4、在」輔助功能「頁面打開」系統通知欄顯示QQ圖標「即可,如圖。

『貳』 android桌面角標提醒功能

您好!
QQ是沒有顯示消息數字提醒的哦,這個是不能設置的。

如果有任何問題可以隨時來咨詢我們的。非常感謝您對我們vivo的支持,祝您生活愉快!

『叄』 android 角標紅點怎麼設置

角標實現

要實現這個角標:

1、放置一個隱藏的圖片在app中,在需要它顯示的時候,顯示該圖片,並以該圖片為背景,顯示新增消息數;

2、自定義一個控制項,用於顯示該角標信息。例如,角標相對於控制項的位置、底色、數字等;

對比或者使用後,你會發現,自定義一個控制項,無疑更符合我們的使用習慣。無需特定的圖片,減少了app的大小等,更重要的是,這樣方便我們的使用。

在角標實現中,有個開源代碼BadgeView寫的很符合我們的心理預期。實現了我們常用的所有功能。

BadgeView

這是一個繼承TextView控制項,自定義而成的一個簡單控制項。我們通過它,可輕易實現對角標位置、角標底色、角標內容等控制。

java">
packagecom.readystatesoftware.viewbadger;

importandroid.content.Context;
importandroid.content.res.Resources;
importandroid.graphics.Color;
importandroid.graphics.Typeface;
importandroid.graphics.drawable.ShapeDrawable;
importandroid.graphics.drawable.shapes.RoundRectShape;
importandroid.util.AttributeSet;
importandroid.util.TypedValue;
importandroid.view.Gravity;
importandroid.view.View;
importandroid.view.ViewGroup;
importandroid.view.ViewGroup.LayoutParams;
importandroid.view.ViewParent;
importandroid.view.animation.AccelerateInterpolator;
importandroid.view.animation.AlphaAnimation;
importandroid.view.animation.Animation;
importandroid.view.animation.DecelerateInterpolator;
importandroid.widget.FrameLayout;
importandroid.widget.TabWidget;
importandroid.widget.TextView;

/**
*"badge"toanygiven{@linkandroid.view.View}.
*outs.
*
*@authorJeffGilfelt
*/
{

publicstaticfinalintPOSITION_TOP_LEFT=1;
publicstaticfinalintPOSITION_TOP_RIGHT=2;
publicstaticfinalintPOSITION_BOTTOM_LEFT=3;
publicstaticfinalintPOSITION_BOTTOM_RIGHT=4;
publicstaticfinalintPOSITION_CENTER=5;

privatestaticfinalintDEFAULT_MARGIN_DIP=5;
privatestaticfinalintDEFAULT_LR_PADDING_DIP=5;
privatestaticfinalintDEFAULT_CORNER_RADIUS_DIP=8;
privatestaticfinalintDEFAULT_POSITION=POSITION_TOP_RIGHT;
privatestaticfinalintDEFAULT_BADGE_COLOR=Color.parseColor("#CCFF0000");//Color.RED;
privatestaticfinalintDEFAULT_TEXT_COLOR=Color.WHITE;

privatestaticAnimationfadeIn;
privatestaticAnimationfadeOut;

privateContextcontext;
privateViewtarget;

privateintbadgePosition;
privateintbadgeMarginH;
privateintbadgeMarginV;
privateintbadgeColor;

privatebooleanisShown;

privateShapeDrawablebadgeBg;

privateinttargetTabIndex;

publicBadgeView(Contextcontext){
this(context,(AttributeSet)null,android.R.attr.textViewStyle);
}

publicBadgeView(Contextcontext,AttributeSetattrs){
this(context,attrs,android.R.attr.textViewStyle);
}

/**
*Constructor-
*
*{@linkandroid.view.View}.
*
*@.
*@.
*/
publicBadgeView(Contextcontext,Viewtarget){
this(context,null,android.R.attr.textViewStyle,target,0);
}

/**
*Constructor-
*
*{@linkandroid.widget.TabWidget}
*tabatagivenindex.
*
*@.
*@.
*@.
*/
publicBadgeView(Contextcontext,TabWidgettarget,intindex){
this(context,null,android.R.attr.textViewStyle,target,index);
}

publicBadgeView(Contextcontext,AttributeSetattrs,intdefStyle){
this(context,attrs,defStyle,null,0);
}

publicBadgeView(Contextcontext,AttributeSetattrs,intdefStyle,Viewtarget,inttabIndex){
super(context,attrs,defStyle);
init(context,target,tabIndex);
}

privatevoidinit(Contextcontext,Viewtarget,inttabIndex){

this.context=context;
this.target=target;
this.targetTabIndex=tabIndex;

//applydefaults
badgePosition=DEFAULT_POSITION;
badgeMarginH=dipToPixels(DEFAULT_MARGIN_DIP);
badgeMarginV=badgeMarginH;
badgeColor=DEFAULT_BADGE_COLOR;

setTypeface(Typeface.DEFAULT_BOLD);
intpaddingPixels=dipToPixels(DEFAULT_LR_PADDING_DIP);
setPadding(paddingPixels,0,paddingPixels,0);
setTextColor(DEFAULT_TEXT_COLOR);

fadeIn=newAlphaAnimation(0,1);
fadeIn.setInterpolator(newDecelerateInterpolator());
fadeIn.setDuration(200);

fadeOut=newAlphaAnimation(1,0);
fadeOut.setInterpolator(newAccelerateInterpolator());
fadeOut.setDuration(200);

isShown=false;

if(this.target!=null){
applyTo(this.target);
}else{
show();
}

}

privatevoidapplyTo(Viewtarget){

LayoutParamslp=target.getLayoutParams();
ViewParentparent=target.getParent();
FrameLayoutcontainer=newFrameLayout(context);

if(targetinstanceofTabWidget){

//
target=((TabWidget)target).getChildTabViewAt(targetTabIndex);
this.target=target;

((ViewGroup)target).addView(container,
newLayoutParams(LayoutParams.FILL_PARENT,LayoutParams.FILL_PARENT));

this.setVisibility(View.GONE);
container.addView(this);

}else{

//
ViewGroupgroup=(ViewGroup)parent;
intindex=group.indexOfChild(target);

group.removeView(target);
group.addView(container,index,lp);

container.addView(target);

this.setVisibility(View.GONE);
container.addView(this);

group.invalidate();

}

}

/**
*MakethebadgevisibleintheUI.
*
*/
publicvoidshow(){
show(false,null);
}

/**
*MakethebadgevisibleintheUI.
*
*@-inanimation.
*/
publicvoidshow(booleananimate){
show(animate,fadeIn);
}

/**
*MakethebadgevisibleintheUI.
*
*@.
*/
publicvoidshow(Animationanim){
show(true,anim);
}

/**
*Makethebadgenon-visibleintheUI.
*
*/
publicvoidhide(){
hide(false,null);
}

/**
*Makethebadgenon-visibleintheUI.
*
*@-outanimation.
*/
publicvoidhide(booleananimate){
hide(animate,fadeOut);
}

/**
*Makethebadgenon-visibleintheUI.
*
*@-visible.
*/
publicvoidhide(Animationanim){
hide(true,anim);
}

/**
*.
*
*/
publicvoidtoggle(){
toggle(false,null,null);
}

/**
*.
*
*@-in/outanimation.
*/
publicvoidtoggle(booleananimate){
toggle(animate,fadeIn,fadeOut);
}

/**
*.
*
*@.
*@-visible.
*/
publicvoidtoggle(AnimationanimIn,AnimationanimOut){
toggle(true,animIn,animOut);
}

privatevoidshow(booleananimate,Animationanim){
if(getBackground()==null){
if(badgeBg==null){
badgeBg=getDefaultBackground();
}
setBackgroundDrawable(badgeBg);
}
applyLayoutParams();

if(animate){
this.startAnimation(anim);
}
this.setVisibility(View.VISIBLE);
isShown=true;
}

privatevoidhide(booleananimate,Animationanim){
this.setVisibility(View.GONE);
if(animate){
this.startAnimation(anim);
}
isShown=false;
}

privatevoidtoggle(booleananimate,AnimationanimIn,AnimationanimOut){
if(isShown){
hide(animate&&(animOut!=null),animOut);
}else{
show(animate&&(animIn!=null),animIn);
}
}

/**
*Incrementthenumericbadgelabel.
*anintegervalue,itslabelwillbesetto"0".
*
*@paramoffsettheincrementoffset.
*/
publicintincrement(intoffset){
CharSequencetxt=getText();
inti;
if(txt!=null){
try{
i=Integer.parseInt(txt.toString());
}catch(NumberFormatExceptione){
i=0;
}
}else{
i=0;
}
i=i+offset;
setText(String.valueOf(i));
returni;
}

/**
*Decrementthenumericbadgelabel.
*anintegervalue,itslabelwillbesetto"0".
*
*@paramoffsetthedecrementoffset.
*/
publicintdecrement(intoffset){
returnincrement(-offset);
}

(){

intr=dipToPixels(DEFAULT_CORNER_RADIUS_DIP);
float[]outerR=newfloat[]{r,r,r,r,r,r,r,r};

RoundRectShaperr=newRoundRectShape(outerR,null,null);
ShapeDrawabledrawable=newShapeDrawable(rr);
drawable.getPaint().setColor(badgeColor);

returndrawable;

}

privatevoidapplyLayoutParams(){

FrameLayout.LayoutParamslp=newFrameLayout.LayoutParams(LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT);

switch(badgePosition){
casePOSITION_TOP_LEFT:
lp.gravity=Gravity.LEFT|Gravity.TOP;
lp.setMargins(badgeMarginH,badgeMarginV,0,0);
break;
casePOSITION_TOP_RIGHT:
lp.gravity=Gravity.RIGHT|Gravity.TOP;
lp.setMargins(0,badgeMarginV,badgeMarginH,0);
break;
casePOSITION_BOTTOM_LEFT:
lp.gravity=Gravity.LEFT|Gravity.BOTTOM;
lp.setMargins(badgeMarginH,0,0,badgeMarginV);
break;
casePOSITION_BOTTOM_RIGHT:
lp.gravity=Gravity.RIGHT|Gravity.BOTTOM;
lp.setMargins(0,0,badgeMarginH,badgeMarginV);
break;
casePOSITION_CENTER:
lp.gravity=Gravity.CENTER;
lp.setMargins(0,0,0,0);
break;
default:
break;
}

setLayoutParams(lp);

}

/**
*.
*
*/
publicViewgetTarget(){
returntarget;
}

/**
*?
*
*/
@Override
publicbooleanisShown(){
returnisShown;
}

/**
*.
*
*oneofPOSITION_TOP_LEFT,POSITION_TOP_RIGHT,POSITION_BOTTOM_LEFT,POSITION_BOTTOM_RIGHT,POSTION_CENTER.
*
*/
publicintgetBadgePosition(){
returnbadgePosition;
}

/**
*Setthepositioningofthisbadge.
*
*@_TOP_LEFT,POSITION_TOP_RIGHT,POSITION_BOTTOM_LEFT,POSITION_BOTTOM_RIGHT,POSTION_CENTER.
*
*/
publicvoidsetBadgePosition(intlayoutPosition){
this.badgePosition=layoutPosition;
}

/**
*.
*
*/
(){
returnbadgeMarginH;
}

/**
*.
*
*/
(){
returnbadgeMarginV;
}

/**
*Setthehorizontal/.
*
*@.
*/
publicvoidsetBadgeMargin(intbadgeMargin){
this.badgeMarginH=badgeMargin;
this.badgeMarginV=badgeMargin;
}

/**
*Setthehorizontal/.
*
*@paramhorizontalmargininpixels.
*@paramverticalmargininpixels.
*/
publicvoidsetBadgeMargin(inthorizontal,intvertical){
this.badgeMarginH=horizontal;
this.badgeMarginV=vertical;
}

/**
*.
*
*/
(){
returnbadgeColor;
}

/**
*.
*
*@.
*/
(intbadgeColor){
this.badgeColor=badgeColor;
badgeBg=getDefaultBackground();
}

privateintdipToPixels(intdip){
Resourcesr=getResources();
floatpx=TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP,dip,r.getDisplayMetrics());
return(int)px;
}

}

『肆』 jpush android 的角標是怎麼加的

像a²這樣的上標在word里可以用快捷鍵【ctrl+shift+ 等號鍵】來實現;
在字母、數字或漢字的右下角添加下標內容,快捷鍵是【ctrl+等號鍵】。

『伍』 安卓QQ如何讓他顯示角標,就是在QQ上顯示未讀信息數量,信息。

安卓系統是一款手機系統,手機系統是沒有類似電腦操作系統顯示角標的,只能在通知欄顯示當前運行程序圖標。

設置步驟如下:

1、手機登錄QQ;

2、點擊左上方頭像,在彈出頁面的左下方點擊」設置「按鈕;

3、在設置頁面點擊下方」輔助功能「;

4、在」輔助功能「頁面打開」系統通知欄顯示QQ圖標「即可,如圖。

『陸』 android 微信 角標 怎麼實現

是桌面角標嗎 ,如果是桌面角標每個廠家的定製系統不同需要系統廠商提供的API方法,小米、華為、三星都用自己的調用方法,以小米為例:
NotificationManager mNotificationManager = (NotificationManager) this
.getSystemService(Context.NOTIFICATION_SERVICE);
Notification.Builder builder = new Notification.Builder(this)
.setContentTitle(「title」).setContentText(「text」).setSmallIcon(R.drawable.icon);
Notification notification = builder.build();
try {
Field field = notification.getClass().getDeclaredField(「extraNotification」);
Object extraNotification = field.get(notification);
Method method = extraNotification.getClass().getDeclaredMethod(「setMessageCount」, int.class);
method.invoke(extraNotification, mCount);
} catch (Exception e) {
e.printStackTrace();
}
mNotificationManager.notify(0,notification);
參考地址:http://dev.xiaomi.com/doc/p=3904/

『柒』 如何關閉android 應用角標

  1. 設置

  2. 應用管理

  3. 已安裝

  4. 找到帶有角標的應用

  5. 找到通知管理

  6. 找到在桌面圖標上顯示角標,關閉即可

『捌』 android角標怎麼讓它一直顯示

TextViewellipsize屬性,作用文字,該控制項該何顯示,解釋:
android:ellipsize=start—–省略號顯示
android:ellipsize=end——省略號顯示結尾
android:ellipsize=middle—-省略號顯示間
android:ellipsize=marquee–跑馬燈式顯示(畫橫向移)
文字左右滾三屬性:
android:singleLine="true"
android:ellipsize="marquee"
android:marqueeRepeatLimit="marquee_forever"

『玖』 手機桌面圖標右上角數字如何去掉

如果您使用的是一加手機,可按照以下步驟進行操作:

關閉所有的桌面角標,可通過以下路徑進行設置:

1、進入「設置 - 通知與狀態欄 - 通知管理」;

2、點擊「桌面角標」,選擇「不顯示」,即可隱藏應用上的通知圖標。

以上路徑以ColorOS 11.2系統為例

『拾』 為什麼ANDROID O的角標是個圓點,而不是數字

安卓奧利奧的新特性啊,launcher設置中可以設置的

閱讀全文

與android圖標角標相關的資料

熱點內容
cadq命令 瀏覽:954
python連接本地資料庫報錯 瀏覽:194
手機模擬加密禁卡操作 瀏覽:104
電荷數怎麼演算法 瀏覽:589
cad如何打開命令行 瀏覽:150
php圖片限制大小 瀏覽:163
程序員一夜未歸 瀏覽:592
蘋果xsmaxapp怎麼不顯示更新 瀏覽:600
蘋果app怎麼清除角標 瀏覽:483
解壓屁屁玩具臟了怎麼辦 瀏覽:670
演算法識別自動折疊 瀏覽:9
dos命令遍歷文件 瀏覽:456
翻譯整個pdf 瀏覽:198
怎麼給解壓軟體授權 瀏覽:621
怎麼換手機桌面壁紙安卓 瀏覽:957
pdf轉換閱讀器 瀏覽:344
特斯拉怎麼app預約充電 瀏覽:498
安卓怎麼錄像更清晰 瀏覽:919
怎麼伺服器輸入命令沒有顯示出來 瀏覽:799
玩吃雞怎麼取消資源編譯 瀏覽:616