Skip to content

Commit

Permalink
Multiple "Today" separator fix
Browse files Browse the repository at this point in the history
  • Loading branch information
GreatApo committed Feb 7, 2019
1 parent d5cca7a commit f2af5fa
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 12 deletions.
Binary file modified .idea/caches/build_file_checksums.ser
Binary file not shown.
Binary file modified .idea/caches/gradle_models.ser
Binary file not shown.
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![latest release](https://img.shields.io/github/release/GreatApo/AmazfitPaceCalendarWidget.svg?colorB=green&label=latest%20release&style=flat-square) ![release date](https://img.shields.io/badge/release%20date-2019.02.04-orange.svg?style=flat-square) ![Downloads](https://img.shields.io/github/downloads/GreatApo/AmazfitPaceCalendarWidget/total.svg?style=flat-square) ![HitCount](http://hits.dwyl.io/GreatApo/AmazfitPaceCalendarWidget.svg)](https://github.com/GreatApo/AmazfitPaceCalendarWidget/releases/latest)
[![latest release](https://img.shields.io/github/release/GreatApo/AmazfitPaceCalendarWidget.svg?colorB=green&label=latest%20release&style=flat-square) ![release date](https://img.shields.io/badge/release%20date-2019.02.07-orange.svg?style=flat-square) ![Downloads](https://img.shields.io/github/downloads/GreatApo/AmazfitPaceCalendarWidget/total.svg?style=flat-square) ![HitCount](http://hits.dwyl.io/GreatApo/AmazfitPaceCalendarWidget.svg)](https://github.com/GreatApo/AmazfitPaceCalendarWidget/releases/latest)

# Amazfit Pace/Stratos/Verge Calendar Widget
![Amazfit Pace Calendar Widget Banner](other%20files/amazfit-calendar-widget.png)
Expand All @@ -22,8 +22,9 @@ So, here is the first Calendar Widget for our Amazfit Pace/Stratos!
- Right to left Calendar support
- Settings are saved
- Calendar events are shown (new style, phone events through Amazmod or iCalendar feed/file)
- You can touch on each day for more events info
- [Timeline Widget](https://forum.xda-developers.com/smartwatch/amazfit/app-widget-timeline-v1-0-1-pace-stratos-t3894632) is also integrated in the calendar (for better events view)
- Long press the timer/date at the top of the Timeline to reload iCal events
- Support of iCalendar feed (URL) and local ICS file



Expand Down Expand Up @@ -56,9 +57,10 @@ There are 3 ways to get your calendar evens.



### Screenshots (Version 1.6)
![Amazfit Pace Calendar Widget v1.6](other%20files/com.dinodevs.pacecalendarwidget-1.3.png)
![Amazfit Pace Calendar Widget v1.6](other%20files/com.dinodevs.pacecalendarwidget-1.3-settings.png)
### Screenshots (Version 1.9.3)
![Amazfit Pace Calendar Widget v1.9.3](other%20files/com.dinodevs.pacecalendarwidget-1.9.3.png)
![Amazfit Pace Calendar Widget v1.9.3 Settings](other%20files/com.dinodevs.pacecalendarwidget-1.9.3-settings.png)
![Amazfit Pace Calendar Widget v1.9.3 Timeline](other%20files/com.dinodevs.pacecalendarwidget-1.9.3-timeline.png)



Expand Down
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ android {
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
versionName '1.9.3'
versionCode 20190206
versionCode 20190207
}
buildTypes {
release {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,13 +228,10 @@ private void loadCalendarEvents() {
// Insert day separator, or not :P
if( !current_loop_date.equals(dateToString( calendar,Constants.ELEMENT_PATTERN )) ){
current_loop_date = dateToString(calendar, Constants.ELEMENT_PATTERN);
// Is it today?
if(current_loop_date.equals(dateToString(Calendar.getInstance(), Constants.ELEMENT_PATTERN))){
current_loop_date = getString(R.string.today);
}

HashMap<String, String> date_elem = new HashMap<>();
date_elem.put(TITLE, "");
date_elem.put(SUBTITLE, current_loop_date );
date_elem.put(SUBTITLE, (current_loop_date.equals(dateToString(Calendar.getInstance(), Constants.ELEMENT_PATTERN)))?getString(R.string.today):current_loop_date );
date_elem.put(DOT, "" );
eventsList.add(date_elem);
}
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<string name="today">Today</string>
<string name="all_day">All Day</string>
<string name="no_events">No events</string>
<string name="no_events_description">Make sure you use one of the following ways:\n- Amazmod on your phone/watch and your stock calendar has events\n- You have placed locally an iCalendar feed (create/write the URL in a file named pacecalendar.txt) or ICS file (named pacecalendar.ics) at: /sdcard/Android/data/com.dinodevs.pacecalendarwidget/files/</string>
<string name="no_events_description">Make sure you use one of the following ways:\n\n1. Amazmod on your phone/watch and your stock calendar has events\n\n2. You have placed locally an iCalendar feed (create/write the URL in a file named pacecalendar.txt) or ICS file (named pacecalendar.ics) at:\n/sdcard/Android/data/com.dinodevs.pacecalendarwidget/files/\n\nTouch the refresh button to load them</string>
<!-- Calendar -->
<string name="settings">✎</string>
<string name="events">⌸</string>
Expand Down

0 comments on commit f2af5fa

Please sign in to comment.