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.
plusonelabs#356 "Lock list of events (Snapshot mode)" option added al…
…lowing to see not only live data, but a snapshot of events, taken on this on on another device. Snapshot is transferred using "Share events and settings for debugging" on one device -> and "Restore settings from a backup" on another device or a widget.
- Loading branch information
Showing
9 changed files
with
95 additions
and
4 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
34 changes: 34 additions & 0 deletions
34
app/src/main/java/org/andstatus/todoagenda/prefs/SnapshotMode.java
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,34 @@ | ||
package org.andstatus.todoagenda.prefs; | ||
|
||
import androidx.annotation.StringRes; | ||
|
||
import org.andstatus.todoagenda.R; | ||
|
||
/** | ||
* @author [email protected] | ||
*/ | ||
public enum SnapshotMode { | ||
LIVE_DATA("live_data", R.string.snapshot_mode_live_data), | ||
SNAPSHOT_TIME("snapshot_time", R.string.snapshot_mode_time), | ||
SNAPSHOT_NOW("snapshot_now", R.string.snapshot_mode_now); | ||
|
||
public final static SnapshotMode defaultValue = LIVE_DATA; | ||
|
||
public final String value; | ||
@StringRes | ||
public final int valueResId; | ||
|
||
SnapshotMode(String value, int valueResId) { | ||
this.value = value; | ||
this.valueResId = valueResId; | ||
} | ||
|
||
public static SnapshotMode fromValue(String value) { | ||
for (SnapshotMode item : SnapshotMode.values()) { | ||
if (item.value.equals(value)) { | ||
return item; | ||
} | ||
} | ||
return defaultValue; | ||
} | ||
} |
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