Merge branch 'master' into feat/weeklyview-drag-drop

This commit is contained in:
darthpaul
2021-09-20 15:38:19 +01:00
13 changed files with 124 additions and 24 deletions

View File

@@ -1,6 +1,14 @@
Changelog
==========
Version 6.15.1 *(2021-08-23)*
----------------------------
* Calculate ages at birthdays and anniversaries, if a year is available
* Add a new Busy/Free field at CalDAV synced calendars
* Allow hiding the weekly view day customizing slider
* Some bottom quick event type filter improvements
Version 6.15.0 *(2021-07-27)*
----------------------------

View File

@@ -17,8 +17,8 @@ android {
applicationId "com.simplemobiletools.calendar.pro"
minSdkVersion 21
targetSdkVersion 30
versionCode 203
versionName "6.15.0"
versionCode 204
versionName "6.15.1"
multiDexEnabled true
setProperty("archivesBaseName", "calendar")
vectorDrawables.useSupportLibrary = true
@@ -63,10 +63,10 @@ android {
}
dependencies {
implementation 'com.github.SimpleMobileTools:Simple-Commons:16ae1d2c03'
implementation 'com.github.SimpleMobileTools:Simple-Commons:03149a0586'
implementation 'joda-time:joda-time:2.10.3'
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'androidx.constraintlayout:constraintlayout:2.1.0'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
implementation "androidx.print:print:1.0.0"

View File

@@ -515,6 +515,7 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
if (result != ImportResult.IMPORT_FAIL) {
runOnUiThread {
updateViewPager()
setupQuickFilter()
}
}
}
@@ -536,6 +537,7 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
it > 0 -> {
toast(R.string.birthdays_added)
updateViewPager()
setupQuickFilter()
}
it == -1 -> toast(R.string.no_new_birthdays)
else -> toast(R.string.no_birthdays)
@@ -565,6 +567,7 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
it > 0 -> {
toast(R.string.anniversaries_added)
updateViewPager()
setupQuickFilter()
}
it == -1 -> toast(R.string.no_new_anniversaries)
else -> toast(R.string.no_anniversaries)
@@ -899,6 +902,7 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
if (it) {
runOnUiThread {
updateViewPager()
setupQuickFilter()
}
}
}

View File

@@ -257,14 +257,12 @@ fun Context.getNotification(pendingIntent: PendingIntent, event: Event, content:
if (isOreoPlus()) {
val audioAttributes = AudioAttributes.Builder()
.setUsage(AudioAttributes.USAGE_ALARM)
.setContentType(AudioAttributes.CONTENT_TYPE_SONIFICATION)
.setLegacyStreamType(config.reminderAudioStream)
.build()
val name = eventTypesDB.getEventTypeWithId(event.eventType)?.getDisplayTitle()
val importance = NotificationManager.IMPORTANCE_HIGH
NotificationChannel(channelId, name, importance).apply {
setBypassDnd(true)
enableLights(true)
lightColor = event.color
enableVibration(config.vibrateOnReminder)

View File

@@ -65,6 +65,7 @@ class WeekFragmentsHolder : MyFragmentHolder(), WeekFragmentListener {
weekHolder!!.week_view_days_count.beVisibleIf(allow)
weekHolder!!.week_view_seekbar.beVisibleIf(allow)
}
setupSeekbar()
}
private fun setupFragment() {
@@ -86,13 +87,6 @@ class WeekFragmentsHolder : MyFragmentHolder(), WeekFragmentListener {
}
}
// avoid seekbar width changing if the days count changes to 1, 10 etc
weekHolder!!.week_view_days_count.onGlobalLayout {
weekHolder!!.week_view_seekbar.layoutParams.width = weekHolder!!.week_view_seekbar.width
(weekHolder!!.week_view_seekbar.layoutParams as RelativeLayout.LayoutParams).removeRule(RelativeLayout.START_OF)
}
updateDaysCount(context?.config?.weeklyViewDays ?: 7)
updateActionBarTitle()
}
@@ -216,6 +210,22 @@ class WeekFragmentsHolder : MyFragmentHolder(), WeekFragmentListener {
setupFragment()
}
private fun setupSeekbar() {
if (context?.config?.allowCustomizeDayCount != true) {
return
}
// avoid seekbar width changing if the days count changes to 1, 10 etc
weekHolder!!.week_view_days_count.onGlobalLayout {
if (weekHolder!!.week_view_seekbar.width != 0) {
weekHolder!!.week_view_seekbar.layoutParams.width = weekHolder!!.week_view_seekbar.width
}
(weekHolder!!.week_view_seekbar.layoutParams as RelativeLayout.LayoutParams).removeRule(RelativeLayout.START_OF)
}
updateDaysCount(context?.config?.weeklyViewDays ?: 7)
}
private fun updateWeeklyViewDays(days: Int) {
context!!.config.weeklyViewDays = days
updateDaysCount(days)
@@ -274,7 +284,8 @@ class WeekFragmentsHolder : MyFragmentHolder(), WeekFragmentListener {
(viewPager!!.adapter as? MyWeekPagerAdapter)?.updateNotVisibleScaleLevel(viewPager!!.currentItem)
}
override fun getFullFragmentHeight() = weekHolder!!.week_view_holder.height - weekHolder!!.week_view_seekbar.height - weekHolder!!.week_view_days_count_divider.height
override fun getFullFragmentHeight() =
weekHolder!!.week_view_holder.height - weekHolder!!.week_view_seekbar.height - weekHolder!!.week_view_days_count_divider.height
override fun printView() {
weekHolder!!.apply {

View File

@@ -204,6 +204,7 @@ class MonthView(context: Context, attrs: AttributeSet, defStyle: Int) : View(con
for (i in 0 until ROW_COUNT) {
canvas.drawLine(0f, i * dayHeight + weekDaysLetterHeight, canvas.width.toFloat(), i * dayHeight + weekDaysLetterHeight, gridPaint)
}
canvas.drawLine(0f, canvas.height.toFloat(), canvas.width.toFloat(), canvas.height.toFloat(), gridPaint)
}
private fun addWeekDayLetters(canvas: Canvas) {

View File

@@ -10,7 +10,7 @@ import com.simplemobiletools.calendar.pro.helpers.COLUMN_COUNT
import com.simplemobiletools.calendar.pro.helpers.ROW_COUNT
import com.simplemobiletools.calendar.pro.models.DayMonthly
import com.simplemobiletools.commons.extensions.onGlobalLayout
import kotlinx.android.synthetic.main.month_view.view.*
import kotlinx.android.synthetic.main.month_view.view.month_view
// used in the Monthly view fragment, 1 view per screen
class MonthViewWrapper(context: Context, attrs: AttributeSet, defStyle: Int) : FrameLayout(context, attrs, defStyle) {
@@ -44,6 +44,43 @@ class MonthViewWrapper(context: Context, attrs: AttributeSet, defStyle: Int) : F
}
}
override fun onLayout(changed: Boolean, left: Int, top: Int, right: Int, bottom: Int) {
super.onLayout(changed, left, top, right, bottom)
measureSizes()
var y = 0
var x = 0
var curLeft = dayWidth.toInt()
val end = right + paddingRight
for (i in 0 until childCount) {
val child = getChildAt(i)
if (child is MonthView) {
//ignore the MonthView layout
continue
}
child.measure(MeasureSpec.makeMeasureSpec(dayWidth.toInt(), MeasureSpec.EXACTLY), MeasureSpec.makeMeasureSpec(dayHeight.toInt(), MeasureSpec.EXACTLY))
val childLeft = x * dayWidth + horizontalOffset - child.translationX
val childTop = y * dayHeight + weekDaysLetterHeight - child.translationY
val childWidth = child.measuredWidth
val childHeight = child.measuredHeight
val childRight = childLeft + childWidth
val childBottom = childTop + childHeight
child.layout(childLeft.toInt(), childTop.toInt(), childRight.toInt(), childBottom.toInt())
if (curLeft + childWidth < end) {
curLeft += childWidth
x++
} else {
y++
x = 0
curLeft = childWidth
}
}
}
fun updateDays(newDays: ArrayList<DayMonthly>, addEvents: Boolean, callback: ((DayMonthly) -> Unit)? = null) {
setupHorizontalOffset()
measureSizes()
@@ -63,13 +100,8 @@ class MonthViewWrapper(context: Context, attrs: AttributeSet, defStyle: Int) : F
private fun measureSizes() {
dayWidth = (width - horizontalOffset) / 7f
// avoid updating the height when coming back from a new event screen, when the keyboard was visible
val newHeight = (height - weekDaysLetterHeight) / 6f
if (newHeight > dayHeight) {
dayHeight = (height - weekDaysLetterHeight) / 6f
}
}
private fun addClickableBackgrounds() {
removeAllViews()

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Simple agenda</string>
<string name="app_launcher_name">Simple Agenda</string>
<string name="app_launcher_name">Agenda</string>
<string name="change_view">Autres affichages</string>
<string name="daily_view">Vue Journée</string>
<string name="weekly_view">Vue Semaine</string>

View File

@@ -1,7 +1,7 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.5.21'
ext.kotlin_version = '1.5.30'
repositories {
google()

View File

@@ -0,0 +1,4 @@
* Calculate ages at birthdays and anniversaries, if a year is available
* Add a new Busy/Free field at CalDAV synced calendars
* Allow hiding the weekly view day customizing slider
* Some bottom quick event type filter improvements

View File

@@ -0,0 +1,40 @@
Simple Calendar Pro, tam olarak bir takvimin yapması gerekeni yapmak üzere tasarlanmış, tamamen özelleştirilebilir, çevrimdışı bir takvimdir. <b>Karmaşık özellikler, gereksiz izinler ve reklam yok!</b>
İster tek ister tekrarlanan etkinlikler, doğum günleri, yıl dönümleri, iş toplantıları, randevular, ister başka bir şey düzenliyor olun, Simple Calendar Pro ile <b>düzenli kalmak</b> çok kolay. <b>Özelleştirme seçenekleri</b> ile etkinlik hatırlatıcılarını, bildirim seslerini, takvim widget'larını ve uygulamanın nasıl görüleceğini özelleştirebilirsiniz.
Günlük, haftalık ve aylık görünümler, yaklaşan etkinliklerinizi ve randevularınızı kontrol etmeyi çok kolaylaştırır. Her şeyi takvim görünümü yerine basit bir etkinlik listesi olarak bile görüntüleyebilirsiniz, böylece <b>hayatınızda neyin ne zaman olacağını tam olarak bilirsiniz. </b>
----------------------------------------------------------
<b>Simple Calendar Pro Özellikleri ve Faydaları</b>
----------------------------------------------------------
✔️ Reklam veya rahatsız edici pop-up yok
✔️ İnternet erişimi gerekmez, size daha fazla gizlilik ve güvenlik sağlar
✔️ Sadece mininmum seviyede izin gerekir
✔️ Sadeliğe vurgu - bir takvimin yapması gerekeni yapar!
✔️ Açık kaynak
✔️ Tamamen özelleştirilebilir temalar & takvim / etkinlik widget'ları
✔️ 29 dile çevrildi
✔️ Başka bir cihaza aktarmak için ayarları .txt dosyalarına aktarın
✔️ Cihazlar arasında etkinlikleri senkronize etmek için desteklenen CalDAV takvim senkronizasyonu
✔️ Takvimde günlük, haftalık, aylık, yıllık ve etkinlik görünümleri
✔️ .ics dosyaları aracılığıyla etkinlikleri içe ve dışa aktarmayı destekler
✔️ Birden fazla etkinlik hatırlatıcısı ayarlayın, etkinlik hatırlatıcı sesini ve titreşimi özelleştirin
✔️ Hatırlatıcılar için erteleme seçeneği
✔️ Tatilleri, doğum günlerini, yıldönümlerini ve randevuları kolayca ekleyin
✔️ Etkinlikleri özelleştirin - başlangıç zamanı, süre, hatırlatıcılar vb.
✔️ Her etkinliğe etkinlik katılımcıları ekleyin
✔️ Kişisel takvim veya iş takvimi olarak kullanın
✔️ Bir etkinlik hakkında sizi uyarmak için hatırlatıcılar ve e-posta bildirimleri arasında seçim yapın
SIMPLE CALENDAR PRO'YU İNDİRİN REKLAMSIZ BASİT ÇEVRİMDIŞI TAKVİM!
<b>Basit Araçlar paketinin tamamını buradan inceleyin:</b>
https://www.simplemobiletools.com
<b>Facebook:</b>
https://www.facebook.com/simplemobiletools
<b>Reddit:</b>
https://www.reddit.com/r/SimpleMobileTools

View File

@@ -0,0 +1 @@
Etkinliklerinizi Düzenlemek ve Yönetmek için en iyi Takvim.

View File

@@ -0,0 +1 @@
Simple Calendar Pro - Etkinlikler ve Hatırlatıcılar