Extract last about content

This commit is contained in:
Pfaffenrodt
2022-10-29 13:40:12 +02:00
parent 653606fae3
commit d91c207b60
2 changed files with 10 additions and 2 deletions

View File

@@ -29,9 +29,9 @@ public class AboutActivity extends CatimaAppCompatActivity {
content = new AboutContent(this);
TextView copyright = binding.creditsSub;
copyright.setText(String.format(getString(R.string.app_copyright_fmt), content.getCurrentYear()));
copyright.setText(content.getCopyright());
TextView versionHistory = binding.versionHistorySub;
versionHistory.setText(String.format(getString(R.string.debug_version_fmt), content.getAppVersion()));
versionHistory.setText(content.getVersionHistory());
bindClickListeners();
}

View File

@@ -45,6 +45,10 @@ public class AboutContent {
return Calendar.getInstance().get(Calendar.YEAR);
}
public String getCopyright() {
return String.format(context.getString(R.string.app_copyright_fmt), getCurrentYear());
}
public String getContributors() {
StringBuilder contributors = new StringBuilder().append("<br/>");
@@ -109,4 +113,8 @@ public class AboutContent {
return contributorInfo.toString();
}
public String getVersionHistory() {
return String.format(context.getString(R.string.debug_version_fmt), getAppVersion());
}
}