mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-06-05 21:59:17 +02:00
use smaller, but bold font for day letters and week numbers
This commit is contained in:
@@ -144,13 +144,13 @@ class WidgetMonthlyConfigureActivity : AppCompatActivity(), MonthlyCalendar {
|
|||||||
val len = mDays!!.size
|
val len = mDays!!.size
|
||||||
|
|
||||||
if (applicationContext.config.displayWeekNumbers) {
|
if (applicationContext.config.displayWeekNumbers) {
|
||||||
week_num.setTextColor(mWeakTextColor)
|
week_num.setTextColor(mTextColor)
|
||||||
week_num.visibility = View.VISIBLE
|
week_num.visibility = View.VISIBLE
|
||||||
|
|
||||||
for (i in 0..5) {
|
for (i in 0..5) {
|
||||||
(findViewById(mRes.getIdentifier("week_num_$i", "id", mPackageName)) as TextView).apply {
|
(findViewById(mRes.getIdentifier("week_num_$i", "id", mPackageName)) as TextView).apply {
|
||||||
text = "${mDays!![i * 7 + 3].weekOfYear}:"
|
text = "${mDays!![i * 7 + 3].weekOfYear}:"
|
||||||
setTextColor(mWeakTextColor)
|
setTextColor(mTextColor)
|
||||||
visibility = View.VISIBLE
|
visibility = View.VISIBLE
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -160,13 +160,13 @@ class MonthFragment : Fragment(), MonthlyCalendar {
|
|||||||
if (week_num == null)
|
if (week_num == null)
|
||||||
return
|
return
|
||||||
|
|
||||||
week_num.setTextColor(mWeakTextColor)
|
week_num.setTextColor(mTextColor)
|
||||||
week_num.beVisibleIf(displayWeekNumbers)
|
week_num.beVisibleIf(displayWeekNumbers)
|
||||||
|
|
||||||
for (i in 0..5) {
|
for (i in 0..5) {
|
||||||
(mHolder.findViewById(mRes.getIdentifier("week_num_$i", "id", mPackageName)) as TextView).apply {
|
(mHolder.findViewById(mRes.getIdentifier("week_num_$i", "id", mPackageName)) as TextView).apply {
|
||||||
text = "${days[i * 7 + 3].weekOfYear}:"
|
text = "${days[i * 7 + 3].weekOfYear}:"
|
||||||
setTextColor(mWeakTextColor)
|
setTextColor(mTextColor)
|
||||||
beVisibleIf(displayWeekNumbers)
|
beVisibleIf(displayWeekNumbers)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -110,14 +110,14 @@ class MyWidgetMonthlyProvider : AppWidgetProvider(), MonthlyCalendar {
|
|||||||
val displayWeekNumbers = mContext.config.displayWeekNumbers
|
val displayWeekNumbers = mContext.config.displayWeekNumbers
|
||||||
val len = days.size
|
val len = days.size
|
||||||
val packageName = mContext.packageName
|
val packageName = mContext.packageName
|
||||||
mRemoteViews.setInt(R.id.week_num, "setTextColor", mWeakTextColor)
|
mRemoteViews.setInt(R.id.week_num, "setTextColor", mTextColor)
|
||||||
mRemoteViews.setViewVisibility(R.id.week_num, if (displayWeekNumbers) View.VISIBLE else View.GONE)
|
mRemoteViews.setViewVisibility(R.id.week_num, if (displayWeekNumbers) View.VISIBLE else View.GONE)
|
||||||
|
|
||||||
for (i in 0..5) {
|
for (i in 0..5) {
|
||||||
val id = mRes.getIdentifier("week_num_$i", "id", packageName)
|
val id = mRes.getIdentifier("week_num_$i", "id", packageName)
|
||||||
mRemoteViews.apply {
|
mRemoteViews.apply {
|
||||||
setTextViewText(id, days[i * 7 + 3].weekOfYear.toString() + ":")
|
setTextViewText(id, days[i * 7 + 3].weekOfYear.toString() + ":")
|
||||||
setInt(id, "setTextColor", mWeakTextColor)
|
setInt(id, "setTextColor", mTextColor)
|
||||||
setViewVisibility(id, if (displayWeekNumbers) View.VISIBLE else View.GONE)
|
setViewVisibility(id, if (displayWeekNumbers) View.VISIBLE else View.GONE)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyTextView
|
<com.simplemobiletools.commons.views.MyTextView
|
||||||
android:id="@+id/week_num"
|
android:id="@+id/week_num"
|
||||||
style="@style/DayView"
|
style="@style/MetaView"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
@@ -17,65 +17,58 @@
|
|||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyTextView
|
<com.simplemobiletools.commons.views.MyTextView
|
||||||
android:id="@+id/label_0"
|
android:id="@+id/label_0"
|
||||||
style="@style/DayView"
|
style="@style/MetaView"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:text="@string/monday_letter"
|
android:text="@string/monday_letter"/>
|
||||||
android:textStyle="bold"/>
|
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyTextView
|
<com.simplemobiletools.commons.views.MyTextView
|
||||||
android:id="@+id/label_1"
|
android:id="@+id/label_1"
|
||||||
style="@style/DayView"
|
style="@style/MetaView"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:text="@string/tuesday_letter"
|
android:text="@string/tuesday_letter"/>
|
||||||
android:textStyle="bold"/>
|
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyTextView
|
<com.simplemobiletools.commons.views.MyTextView
|
||||||
android:id="@+id/label_2"
|
android:id="@+id/label_2"
|
||||||
style="@style/DayView"
|
style="@style/MetaView"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:text="@string/wednesday_letter"
|
android:text="@string/wednesday_letter"/>
|
||||||
android:textStyle="bold"/>
|
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyTextView
|
<com.simplemobiletools.commons.views.MyTextView
|
||||||
android:id="@+id/label_3"
|
android:id="@+id/label_3"
|
||||||
style="@style/DayView"
|
style="@style/MetaView"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:text="@string/thursday_letter"
|
android:text="@string/thursday_letter"/>
|
||||||
android:textStyle="bold"/>
|
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyTextView
|
<com.simplemobiletools.commons.views.MyTextView
|
||||||
android:id="@+id/label_4"
|
android:id="@+id/label_4"
|
||||||
style="@style/DayView"
|
style="@style/MetaView"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:text="@string/friday_letter"
|
android:text="@string/friday_letter"/>
|
||||||
android:textStyle="bold"/>
|
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyTextView
|
<com.simplemobiletools.commons.views.MyTextView
|
||||||
android:id="@+id/label_5"
|
android:id="@+id/label_5"
|
||||||
style="@style/DayView"
|
style="@style/MetaView"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:text="@string/saturday_letter"
|
android:text="@string/saturday_letter"/>
|
||||||
android:textStyle="bold"/>
|
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyTextView
|
<com.simplemobiletools.commons.views.MyTextView
|
||||||
android:id="@+id/label_6"
|
android:id="@+id/label_6"
|
||||||
style="@style/DayView"
|
style="@style/MetaView"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:text="@string/sunday_letter"
|
android:text="@string/sunday_letter"/>
|
||||||
android:textStyle="bold"/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyTextView
|
<com.simplemobiletools.commons.views.MyTextView
|
||||||
android:id="@+id/week_num_0"
|
android:id="@+id/week_num_0"
|
||||||
style="@style/DayView"
|
style="@style/MetaView"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
@@ -93,7 +93,7 @@
|
|||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyTextView
|
<com.simplemobiletools.commons.views.MyTextView
|
||||||
android:id="@+id/week_num_1"
|
android:id="@+id/week_num_1"
|
||||||
style="@style/DayView"
|
style="@style/MetaView"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
@@ -157,7 +157,7 @@
|
|||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyTextView
|
<com.simplemobiletools.commons.views.MyTextView
|
||||||
android:id="@+id/week_num_2"
|
android:id="@+id/week_num_2"
|
||||||
style="@style/DayView"
|
style="@style/MetaView"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
@@ -221,7 +221,7 @@
|
|||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyTextView
|
<com.simplemobiletools.commons.views.MyTextView
|
||||||
android:id="@+id/week_num_3"
|
android:id="@+id/week_num_3"
|
||||||
style="@style/DayView"
|
style="@style/MetaView"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
@@ -285,7 +285,7 @@
|
|||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyTextView
|
<com.simplemobiletools.commons.views.MyTextView
|
||||||
android:id="@+id/week_num_4"
|
android:id="@+id/week_num_4"
|
||||||
style="@style/DayView"
|
style="@style/MetaView"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
@@ -349,7 +349,7 @@
|
|||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyTextView
|
<com.simplemobiletools.commons.views.MyTextView
|
||||||
android:id="@+id/week_num_5"
|
android:id="@+id/week_num_5"
|
||||||
style="@style/DayView"
|
style="@style/MetaView"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
|
@@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/week_num_0"
|
android:id="@+id/week_num_0"
|
||||||
style="@style/DayView"
|
style="@style/MetaView"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
@@ -170,7 +170,7 @@
|
|||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/week_num_1"
|
android:id="@+id/week_num_1"
|
||||||
style="@style/DayView"
|
style="@style/MetaView"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
@@ -312,7 +312,7 @@
|
|||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/week_num_2"
|
android:id="@+id/week_num_2"
|
||||||
style="@style/DayView"
|
style="@style/MetaView"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
@@ -453,7 +453,7 @@
|
|||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/week_num_3"
|
android:id="@+id/week_num_3"
|
||||||
style="@style/DayView"
|
style="@style/MetaView"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
@@ -594,7 +594,7 @@
|
|||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/week_num_4"
|
android:id="@+id/week_num_4"
|
||||||
style="@style/DayView"
|
style="@style/MetaView"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
@@ -735,7 +735,7 @@
|
|||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/week_num_5"
|
android:id="@+id/week_num_5"
|
||||||
style="@style/DayView"
|
style="@style/MetaView"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
|
@@ -12,6 +12,7 @@
|
|||||||
<dimen name="min_widget_width">250dp</dimen>
|
<dimen name="min_widget_width">250dp</dimen>
|
||||||
<dimen name="min_widget_height">250dp</dimen>
|
<dimen name="min_widget_height">250dp</dimen>
|
||||||
|
|
||||||
<dimen name="day_text_size">16sp</dimen>
|
<dimen name="meta_text_size">14sp</dimen>
|
||||||
|
<dimen name="day_text_size">17sp</dimen>
|
||||||
<dimen name="month_text_size">22sp</dimen>
|
<dimen name="month_text_size">22sp</dimen>
|
||||||
</resources>
|
</resources>
|
||||||
|
@@ -8,6 +8,11 @@
|
|||||||
<item name="android:fontFamily">sans-serif-light</item>
|
<item name="android:fontFamily">sans-serif-light</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<style name="MetaView" parent="DayView">
|
||||||
|
<item name="android:textStyle">bold</item>
|
||||||
|
<item name="android:textSize">@dimen/meta_text_size</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
<style name="ArrowStyle">
|
<style name="ArrowStyle">
|
||||||
<item name="android:background">@drawable/transparent_button</item>
|
<item name="android:background">@drawable/transparent_button</item>
|
||||||
</style>
|
</style>
|
||||||
|
Reference in New Issue
Block a user