forked from plusonelabs/calendar-widget
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#88 "Text shadow" option added to Colors section with these values: "…
…No shadow" (default, nothing changes for existing widgets), "Dark shadow" and "Light shadow". For simplicity the same shadow applies to all parts of the widget.
- Loading branch information
Showing
42 changed files
with
1,299 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 3 additions & 4 deletions
7
app/src/main/kotlin/org/andstatus/todoagenda/widget/EventEntryLayout.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,18 @@ | ||
package org.andstatus.todoagenda.widget | ||
|
||
import androidx.annotation.LayoutRes | ||
import androidx.annotation.StringRes | ||
import org.andstatus.todoagenda.R | ||
|
||
/** | ||
* @author [email protected] | ||
*/ | ||
enum class EventEntryLayout( | ||
@field:LayoutRes @param:LayoutRes val layoutId: Int, | ||
val widgetLayout: WidgetLayout, | ||
val value: String, | ||
@field:StringRes val summaryResId: Int | ||
) { | ||
DEFAULT(R.layout.event_entry, "DEFAULT", R.string.default_multiline_layout), | ||
ONE_LINE(R.layout.event_entry_one_line, "ONE_LINE", R.string.single_line_layout); | ||
DEFAULT(WidgetLayout.EVENT_ENTRY_DEFAULT, "DEFAULT", R.string.default_multiline_layout), | ||
ONE_LINE(WidgetLayout.EVENT_ENTRY_ONE_LINE, "ONE_LINE", R.string.single_line_layout); | ||
|
||
companion object { | ||
const val SPACE_PIPE_SPACE = " | " | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
app/src/main/kotlin/org/andstatus/todoagenda/widget/TextShadow.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package org.andstatus.todoagenda.widget | ||
|
||
import androidx.annotation.StringRes | ||
import org.andstatus.todoagenda.R | ||
|
||
enum class TextShadow(val value: String, | ||
@field:StringRes val titleResId: Int, | ||
) { | ||
NO_SHADOW("no", R.string.text_shadow_no_shadow), | ||
DARK_SHADOW("dark", R.string.text_shadow_dark), | ||
LIGHT_SHADOW("light", R.string.text_shadow_light); | ||
|
||
companion object { | ||
fun fromValue(value: String?): TextShadow { | ||
for (item in entries) { | ||
if (item.value == value) { | ||
return item | ||
} | ||
} | ||
return NO_SHADOW | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 4 additions & 5 deletions
9
app/src/main/kotlin/org/andstatus/todoagenda/widget/WidgetHeaderLayout.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,19 @@ | ||
package org.andstatus.todoagenda.widget | ||
|
||
import androidx.annotation.LayoutRes | ||
import androidx.annotation.StringRes | ||
import org.andstatus.todoagenda.R | ||
|
||
/** | ||
* @author [email protected] | ||
*/ | ||
enum class WidgetHeaderLayout( | ||
@field:LayoutRes @param:LayoutRes val layoutId: Int, | ||
val widgetLayout: WidgetLayout?, | ||
val value: String, | ||
@field:StringRes @param:StringRes val summaryResId: Int | ||
) { | ||
ONE_ROW(R.layout.widget_header_one_row, "ONE_ROW", R.string.single_line_layout), | ||
TWO_ROWS(R.layout.widget_header_two_rows, "TWO_ROWS", R.string.two_rows_layout), | ||
HIDDEN(0, "HIDDEN", R.string.hidden); | ||
ONE_ROW(WidgetLayout.WIDGET_HEADER_ONE_ROW, "ONE_ROW", R.string.single_line_layout), | ||
TWO_ROWS(WidgetLayout.WIDGET_HEADER_TWO_ROWS, "TWO_ROWS", R.string.two_rows_layout), | ||
HIDDEN(null, "HIDDEN", R.string.hidden); | ||
|
||
companion object { | ||
var defaultValue = ONE_ROW | ||
|
Oops, something went wrong.