Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/stefan-niedermann/nextcloud-deck.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstefan-niedermann <info@niedermann.it>2019-10-19 15:27:21 +0300
committerstefan-niedermann <info@niedermann.it>2019-10-19 15:27:21 +0300
commit1f25eb3b662777aa79de4d6220204d6c85581365 (patch)
tree142c88fdcc95ad45adfec55419c778fc1a3edc4c /app/src/main/java/it/niedermann/nextcloud/deck/ui/about/AboutFragmentLicenseTab.java
parent26e5b226cf7939abc9f73e62fca5abbeccf58155 (diff)
Fix #185 Use butterknife resource binding where possible
Diffstat (limited to 'app/src/main/java/it/niedermann/nextcloud/deck/ui/about/AboutFragmentLicenseTab.java')
-rw-r--r--app/src/main/java/it/niedermann/nextcloud/deck/ui/about/AboutFragmentLicenseTab.java20
1 files changed, 10 insertions, 10 deletions
diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/ui/about/AboutFragmentLicenseTab.java b/app/src/main/java/it/niedermann/nextcloud/deck/ui/about/AboutFragmentLicenseTab.java
index d06da58fb..3ab1ea2b1 100644
--- a/app/src/main/java/it/niedermann/nextcloud/deck/ui/about/AboutFragmentLicenseTab.java
+++ b/app/src/main/java/it/niedermann/nextcloud/deck/ui/about/AboutFragmentLicenseTab.java
@@ -13,6 +13,7 @@ import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
+import butterknife.BindString;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
@@ -26,6 +27,11 @@ public class AboutFragmentLicenseTab extends Fragment {
@BindView(R.id.about_app_license_button)
Button appLicenseButton;
+ @BindString(R.string.paragraph_start)
+ String paragraphStart;
+ @BindString(R.string.paragraph_end)
+ String paragraphEnd;
+
@OnClick(R.id.about_app_license_button)
void openLicense() {
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(getString(R.string.url_license))));
@@ -36,21 +42,15 @@ public class AboutFragmentLicenseTab extends Fragment {
View v = inflater.inflate(R.layout.fragment_about_license_tab, container, false);
ButterKnife.bind(this, v);
Resources resources = getResources();
- LinkUtil.setHtml(iconsDisclaimer,
- resources.getString(R.string.paragraph_start),
- resources.getString(R.string.about_icons_disclaimer, getAppIconHint(resources), getMdiLink(resources)),
- resources.getString(R.string.paragraph_end)
- );
+ LinkUtil.setHtml(iconsDisclaimer, paragraphStart, resources.getString(R.string.about_icons_disclaimer, getAppIconHint(resources), getMdiLink(resources)), paragraphEnd);
return v;
}
- private static String getAppIconHint(Resources resources) {
- return LinkUtil.makeLink(resources, R.string.url_about_icon_author, R.string.about_app_icon_author_link_label) +
- resources.getString(R.string.paragraph_end) +
- resources.getString(R.string.paragraph_start);
+ private String getAppIconHint(Resources resources) {
+ return LinkUtil.makeLink(resources, R.string.url_about_icon_author, R.string.about_app_icon_author_link_label) + paragraphEnd + paragraphStart;
}
- private static String getMdiLink(Resources resources) {
+ private String getMdiLink(Resources resources) {
return LinkUtil.makeLink(resources, R.string.url_about_icons_disclaimer_mdi, R.string.about_icons_disclaimer_mdi);
}
} \ No newline at end of file