badge

android自定义tabbar,并带badgeview消息提示

Deadly 提交于 2019-12-07 20:09:21
最早的时候,我用的tab都是在屏幕底端的,后来慢慢的流行在屏幕顶端了,按照用户体验来说,顶部确实比底部好,不仅可以防止按到返回键或者Home等引起误操作,而且tab标题在头顶很显眼很醒目。 一开始朋友推荐使用viewpageindicator,这个可以在 github 上有例子,大家如果没什么特殊需求,基本可以满足要求。根据项目要求我就使用了viewpageindicator,后来项目要求有消息提示,就像ios的badge一样,因此就对viewpageindicator进行修改,改了之后,就出现了下图的情况 就是badge是有了,但是把原本的tab给破坏了,后来我按照viewpageindicator的方式自己写了个例子,加上badge也出现了这种情况,估计tabwidget不适合这种模式(也可能是我水平有限,高手们应该有办法),而且viewpageindicator比较负责,有那么多代码和样式,还得引入library,还得把原本的android-support-v4.jar给删除等等,从而会引起别的问题,虽然都能解决,但是觉得很麻烦,就打算自己再重写一个,tabbar不用tabwidget,而是自己自定义布局tabbar.xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http:/

UIBarButtonItem-Badge for iOS

主宰稳场 提交于 2019-12-07 17:38:48
问题 I am using this control for showing badge on barbuttonitem. It works fine for the first controller or root controller in navigation controller stack. While pushing to another controller, I tried to show badge and I cannot see any effect there. 回答1: You should first time set badgeValue in viewDidLayoutSubviews . In this case it'll appear and don't blink, like if you set it in viewDidAppear : - (void)viewDidLayoutSubviews { barButton.badgeValue = @"5"; } 回答2: Setting navigationItem in

Steam Web API get Badge Image URL

安稳与你 提交于 2019-12-07 12:23:25
问题 So I'm looking to get the URL of the badge images from Steam. /IPlayerService/GetBadges/v1/ gives: { "response": { "badges": [ { "badgeid": 2, "level": 2, "completion_time": 1374530451, "xp": 200, "scarcity": 1711283 }, { "badgeid": 8, "level": 1, "completion_time": 1356256226, "xp": 100, "scarcity": 741879 }, { "badgeid": 1, "appid": 245070, "level": 1, "completion_time": 1379186990, "xp": 100, "communityitemid": "227090978", "border_color": 0, "scarcity": 688570 }, { "badgeid": 1, "appid":

how to architect achievements and badging with nosql

南楼画角 提交于 2019-12-07 06:13:58
问题 I currently have an social game app using mongodb for it's database. My question is what are some suggestions if I want to create a points and badging system. The business logic for achievements/badges could become quite complicated and are very ad-hoc so doing real-time awarding of badges would not seem efficient. I am imagining adding tracked actions to a queue somewhere, i.e. Amazon SQS, or just using a user's activity feed as a queue, and have another offline worker process going through

Icon badge overlay for notifications in silverlight/xaml

被刻印的时光 ゝ 提交于 2019-12-06 14:06:41
I've got a ribbon bar in my silverlight app and on one of the icons I would like for there to be a badge icon showing the number of items in the view that the icon activates. Picture the Mail icon in OS X showing the number of unread messages or the notifications counter on an IOS app icon. I don't know much about xaml styles, but it seems to me I could duplicate the default style for the ribbon bar button, then add to it with some sort of red circle, and a white text that took in its value from a new property on the ribbon bar button somehow so I would be able to bind to it. Does anyone have

How to show badge count with app icon on Redmi?

冷暖自知 提交于 2019-12-06 07:23:28
问题 I am able to show Badge count with app icon on Samsung devices with following code - <uses-permission android:name="com.sec.android.provider.badge.permission.READ" /> <uses-permission android:name="com.sec.android.provider.badge.permission.WRITE" /> Intent intent = new Intent("android.intent.action.BADGE_COUNT_UPDATE"); intent.putExtra("badge_count", badgeCount); intent.putExtra("badge_count_package_name", componentName.getPackageName()); intent.putExtra("badge_count_class_name",

Updating application badge at midnight with options: app not launched or in background, badge number can decrease

若如初见. 提交于 2019-12-06 06:04:31
I'm reading many things about Local Notifications and the way they can help to update the app badge number. I'd like to update this badge at midnight, and set its value to a number I can't know before midnight. So I'd like, if possible, to launch a function at midnight that would update/load some datas, check the number to display, and display it on the badge. Of course, the number to display is not relative to the displayed number, and can be lower or greater. This is expected to work : - When app is in background - When app is in foreground - When app is not launched would you know a way to

UIBarButtonItem-Badge for iOS

别说谁变了你拦得住时间么 提交于 2019-12-06 02:49:54
I am using this control for showing badge on barbuttonitem. It works fine for the first controller or root controller in navigation controller stack. While pushing to another controller, I tried to show badge and I cannot see any effect there. You should first time set badgeValue in viewDidLayoutSubviews . In this case it'll appear and don't blink, like if you set it in viewDidAppear : - (void)viewDidLayoutSubviews { barButton.badgeValue = @"5"; } Setting navigationItem in viewDidLayoutSubviews is not recommended because it is not semantic. The key to your problem is that the badge view is

How to do badge increment on iOS push notification

跟風遠走 提交于 2019-12-05 20:22:11
I'm currently getting badge from payload. But how can i update that value. {"aps": {"alert":"Notification Hub test notification2", "badge":1, "sound":"Default"} } when i send this it is always shows 1 in the badge number but when i go inside app and exit it's getting updated.It is because of this, func applicationDidBecomeActive(application: UIApplication) { UIApplication.sharedApplication().applicationIconBadgeNumber = UIApplication.sharedApplication().applicationIconBadgeNumber + 1 } But when i send a new push notification it's again shows 1 as badge number in the icon. How should i do this,

Steam Web API get Badge Image URL

﹥>﹥吖頭↗ 提交于 2019-12-05 19:10:20
So I'm looking to get the URL of the badge images from Steam. /IPlayerService/GetBadges/v1/ gives: { "response": { "badges": [ { "badgeid": 2, "level": 2, "completion_time": 1374530451, "xp": 200, "scarcity": 1711283 }, { "badgeid": 8, "level": 1, "completion_time": 1356256226, "xp": 100, "scarcity": 741879 }, { "badgeid": 1, "appid": 245070, "level": 1, "completion_time": 1379186990, "xp": 100, "communityitemid": "227090978", "border_color": 0, "scarcity": 688570 }, { "badgeid": 1, "appid": 219150, "level": 1, "completion_time": 1379187097, "xp": 100, "communityitemid": "227093331", "border