삼성 갤럭시 노트 2 안드로이드 버전 4.1.2
이전에이 질문을했지만 답변이 불가능하다는 것을 알고 있습니다.
Android에서 응용 프로그램 실행기 아이콘 위에 풍선 카운터를 표시하는 방법
그럼에도 불구하고 어제 나는 facebook 앱을 업데이트했고 읽지 않은 메시지 개인 메시지 카운터를 표시하기 시작했습니다. 페이스 북 앱이 내 앱에 대해 그렇게 할 수없는 이유는 무엇입니까?
삼성 갤럭시 노트 2 안드로이드 버전 4.1.2
Android ("vanilla" android without custom launchers and touch interfaces) does not allow changing of the application icon, because it is sealed in the .apk
tightly once the program is compiled. There is no way to change it to a 'drawable' programmatically using standard APIs. You may achieve your goal by using a widget instead of an icon. Widgets are customisable. Please read this :http://www.cnet.com/8301-19736_1-10278814-251.html and this http://developer.android.com/guide/topics/appwidgets/index.html. Also look here: https://github.com/jgilfelt/android-viewbadger. It can help you.
As for badge numbers. As I said before - there is no standard way for doing this. But we all know that Android is an open operating system and we can do everything we want with it, so the only way to add a badge number - is either to use some 3-rd party apps or custom launchers, or front-end touch interfaces: Samsung TouchWiz or Sony Xperia's interface. Other answers use this capabilities and you can search for this on stackoverflow, e.g. here. But I will repeat one more time: there is no standard API for this and I want to say it is a bad practice. App's icon notification badge is an iOS pattern and it should not be used in Android apps anyway. In Andrioid there is a status bar notifications for these purposes:http://developer.android.com/guide/topics/ui/notifiers/notifications.html 따라서 Facebook이나 다른 누군가가 이것을 사용한다면 우리가 고려해야 할 일반적인 패턴이나 추세가 아닙니다. 그러나 어쨌든 홈 화면 위젯을 사용하고 싶지 않다면 여기를보십시오.
Facebook은 Android의 앱 아이콘에 배지 번호를 어떻게 추가하나요?
보시다시피 이것은 실제 Facebook 앱이 아니라 TouchWiz입니다. 바닐라 안드로이드에서 이것은 Nova Launcher http://forums.androidcentral.com/android-applications/199709-how-guide-global-badge-notifications.html 로 달성 할 수 있습니다. 따라서 어딘가에 아이콘 배지가 보이면 타사 런처 또는 터치 인터페이스 (프런트 엔드 래퍼). Google은 언젠가이 기능을 표준 Android API에 추가 할 수 있습니다.
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다