Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# coloringbook-lib-utils

This is a utility library for [coloring-book](https://github.com/niccokunzmann/coloring-book).

Binary file added releases/androidsoft-utils-1.0.1.jar
Binary file not shown.
16 changes: 12 additions & 4 deletions src/main/java/org/androidsoft/utils/ui/WhatsNewActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -64,25 +64,33 @@ private void checkLastVersion()
if (lastVersion < currentVersion)
{
int resTitle;
int resMessage;
String resMessage;
if (lastVersion == DEFAULT_VERSION)
{
// This is a new install
resTitle = getFirstRunDialogTitleRes();
resMessage = getFirstRunDialogMsgRes();
resMessage = getFirstRunDialogMsgString();
}
else
{
// This is an upgrade.
resTitle = getWhatsNewDialogTitleRes();
resMessage = getWhatsNewDialogMsgRes();
resMessage = getWhatsNewDialogMsgString();
}
// show what's new message
saveVersion(currentVersion);
showWhatsNewDialog(resTitle, resMessage);
}
}

public String getFirstRunDialogMsgString() {
return getResources().getString(getFirstRunDialogMsgRes());
}

public String getWhatsNewDialogMsgString() {
return getResources().getString(getWhatsNewDialogMsgRes());
}

/**
* Gets a version number stored in preferences
* @return The version number
Expand Down Expand Up @@ -110,7 +118,7 @@ private void saveVersion(int version)
* @param title The dialog's title
* @param message The dialog's message
*/
private void showWhatsNewDialog(int title, int message)
private void showWhatsNewDialog(int title, String message)
{
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setTitle(title);
Expand Down