badge

Does BadgeDrawable not work for views within a FrameLayout such as buttons, images, textviews etc.?

我们两清 提交于 2020-03-24 11:10:52
问题 I have this function in my main activity which doesn't display a badge: private fun setFindShiftBadge(state: HomeState) { val findShiftsBadge = BadgeDrawable.create(this) home_framelayout.foreground = findShiftsBadge findShiftsBadge.badgeGravity = BadgeDrawable.TOP_END findShiftsBadge.backgroundColor = resources.getColor(R.color.colorWhite) findShiftsBadge.badgeTextColor = resources.getColor(R.color.colorPrimary) findShiftsBadge.number = state.availableShifts.size } In the same activity, I

Badge on App icon

荒凉一梦 提交于 2020-02-03 08:56:41
问题 I need to show badge on App icon in my application what i have tried: This https://github.com/leolin310148/ShortcutBadger library do it on many devices.I have checked its manifest and saw that there exists a permission for each type of launcher <!--for Samsung--> <uses-permission android:name="com.sec.android.provider.badge.permission.READ"/> <uses-permission android:name="com.sec.android.provider.badge.permission.WRITE"/> <!--for htc--> <uses-permission android:name="com.htc.launcher

Badge on App icon

[亡魂溺海] 提交于 2020-02-03 08:52:47
问题 I need to show badge on App icon in my application what i have tried: This https://github.com/leolin310148/ShortcutBadger library do it on many devices.I have checked its manifest and saw that there exists a permission for each type of launcher <!--for Samsung--> <uses-permission android:name="com.sec.android.provider.badge.permission.READ"/> <uses-permission android:name="com.sec.android.provider.badge.permission.WRITE"/> <!--for htc--> <uses-permission android:name="com.htc.launcher

Badge on App icon

♀尐吖头ヾ 提交于 2020-02-03 08:52:19
问题 I need to show badge on App icon in my application what i have tried: This https://github.com/leolin310148/ShortcutBadger library do it on many devices.I have checked its manifest and saw that there exists a permission for each type of launcher <!--for Samsung--> <uses-permission android:name="com.sec.android.provider.badge.permission.READ"/> <uses-permission android:name="com.sec.android.provider.badge.permission.WRITE"/> <!--for htc--> <uses-permission android:name="com.htc.launcher

Badge on App icon

纵然是瞬间 提交于 2020-02-03 08:52:08
问题 I need to show badge on App icon in my application what i have tried: This https://github.com/leolin310148/ShortcutBadger library do it on many devices.I have checked its manifest and saw that there exists a permission for each type of launcher <!--for Samsung--> <uses-permission android:name="com.sec.android.provider.badge.permission.READ"/> <uses-permission android:name="com.sec.android.provider.badge.permission.WRITE"/> <!--for htc--> <uses-permission android:name="com.htc.launcher

Android Badge number on launcher icon for all mobile manufacturer

前提是你 提交于 2020-01-22 07:41:48
问题 I need a badge counter on my application launcher icon. I know the solution to get Badge counter inside the app, using TextView, But I need a solution to get the badge counter external to the app on the launcher icon. In iOS we get the badge number count by UIApplication.sharedApplication().applicationIconBadgeNumber I am wondering why Android has not included anything like this with their SDK which every developer need. Try 1 : Working only on sony mobiiles : Intent badgeIntent = new Intent(

Android Badge number on launcher icon for all mobile manufacturer

心已入冬 提交于 2020-01-22 07:41:06
问题 I need a badge counter on my application launcher icon. I know the solution to get Badge counter inside the app, using TextView, But I need a solution to get the badge counter external to the app on the launcher icon. In iOS we get the badge number count by UIApplication.sharedApplication().applicationIconBadgeNumber I am wondering why Android has not included anything like this with their SDK which every developer need. Try 1 : Working only on sony mobiiles : Intent badgeIntent = new Intent(

UISegmentedControl with Badge or Highlighting

二次信任 提交于 2020-01-17 01:40:49
问题 Occasionally I want to highlight one of segments of a UISegmentedControl , i.e. the third title is "News" and I want to draw user's attention to it. Ideally with a red badge with a number as on the UITabBar - any idea how to achieve this? Feel free to share other ideas as well. I thought about adding the badge as an image just on top of it, but maybe there is some better way. 回答1: I wouldn't have thought there is a better way to be honest. The easiest way will be (probably) to subclass

iOS 8. Change app badge number without any notifications

回眸只為那壹抹淺笑 提交于 2020-01-16 10:49:08
问题 In my app I need to set badge onto the app icon and set numbers for this badge. The problem is that I need to register user notification settings like this: if ([[UIApplication sharedApplication] respondsToSelector:@selector(registerUserNotificationSettings:)]) { [[UIApplication sharedApplication] registerUserNotificationSettings:[UIUserNotificationSettings settingsForTypes:UIUserNotificationTypeBadge categories:nil]]; } in order to make it work on iOS8. If I run this code then on start

How to use BBBadgeBarButtonItem in swift

让人想犯罪 __ 提交于 2020-01-14 06:03:10
问题 I want badge on a BarButton and I came across BBBadgeBarButtonItem but I am not sure if this will work in swift or not. is it possible ? if yes how ? PS I am very new to iOS and swift When I try to use it like the readme file says, I am getting an error at import line " Expected Identifier at import declaration " 回答1: You need what's called an Objective-C bridging header since BBBadgeBarButtonItem is written in Objective-C and your project is Swift. See http://www.learnswiftonline.com/getting