danimahardhika / candybar-library

Android icon pack material dashboard
Apache License 2.0
495 stars 146 forks source link

[Question] How to set a Dynamic Calendar #149

Closed djdoge closed 5 years ago

djdoge commented 6 years ago

Hi, I've made 31 Calendar icons (one for each day) and I'm wondering (if it's possible) how I can set the icons to automatically change day by day?

I've googled around and found this post: DynamicCalendarExample but I still don't 100% follow. Thank you for the help!

yeyebbc commented 6 years ago

The post explained well in detail. Just like this:

<calendar component="ComponentInfo{com.google.android.calendar/com.android.calendar.LaunchActivity}" prefix="google_calendar_"/>

You should name your 31 icons with the prefix of "googlecalendar", for example: Day 1's name is "google_calendar_1.png" Day 2's name is "google_calendar_2.png" ......

Like this, don't forget to add static icon for launchers that doesn't support dynamic calendar

snipaste_2018-05-09_10-44-33
djdoge commented 6 years ago

I've added "" to appfilter.xml like this:

screen shot 2018-05-09 at 09 08 23

And I wasn't 100% sure if I had to add "...efix="google_calendar_1"/>", "...efix="google_calendar_2"/>" etc.

I've added the icons but it still doesn't work :(

screen shot 2018-05-09 at 09 11 17

(I'm new to all of this as you might see haha)

yeyebbc commented 6 years ago

Hey you only need to use one line of code. Only this line, <calendar component="ComponentInfo{com.google.android.calendar/com.android.calendar.LaunchActivity}" prefix="google_calendar_"/>

djdoge commented 6 years ago

Hello again!

Do I need to edit in AndroidManifest.xml or is it enough that I add to appfilter and the icons to drawable with the names "google_calednar_x"

Thank you!!

yeyebbc commented 6 years ago

The CandyBar Dashboard support dynamic calendar icons by default, no need to edit AndrfoidManifest.xml.

djdoge commented 6 years ago

Huh.. I must be doing something wrong then :( Still isn't working

yeyebbc commented 6 years ago

Oh, no need for this "googlecalendar.png", started them from "google_calendar_1.png"

benneb1020301 commented 5 years ago

Is there any way to make 2 dynamic calendars for one app ? When I add 2 for the same app it's just uses the second one