tobiasKaminsky 7 роки тому
батько
коміт
d8d03244c0

+ 22 - 8
src/main/java/com/owncloud/android/ui/activity/ParticipateActivity.java

@@ -22,8 +22,10 @@
 package com.owncloud.android.ui.activity;
 
 import android.content.Intent;
+import android.graphics.PorterDuff;
 import android.net.Uri;
 import android.os.Bundle;
+import android.support.v7.widget.AppCompatButton;
 import android.text.Html;
 import android.text.method.LinkMovementMethod;
 import android.view.MenuItem;
@@ -32,6 +34,7 @@ import android.widget.TextView;
 
 import com.owncloud.android.R;
 import com.owncloud.android.utils.AnalyticsUtils;
+import com.owncloud.android.utils.DisplayUtils;
 
 /**
  * Activity providing information about ways to participate in the app's development.
@@ -52,7 +55,11 @@ public class ParticipateActivity extends FileActivity {
 
         // setup drawer
         setupDrawer(R.id.nav_participate);
-        getSupportActionBar().setTitle(getString(R.string.drawer_participate));
+
+        if (getSupportActionBar() != null) {
+            getSupportActionBar().setTitle(DisplayUtils.getColoredTitle(getString(R.string.drawer_participate),
+                    DisplayUtils.fontColor()));
+        }
 
         setupContent();
     }
@@ -71,27 +78,34 @@ public class ParticipateActivity extends FileActivity {
         contributeIrcView.setMovementMethod(LinkMovementMethod.getInstance());
         contributeIrcView.setText(Html.fromHtml(
                 getString(R.string.participate_contribute_irc_text,
-                        getString(R.string.irc_weblink)
-                )));
+                        DisplayUtils.colorToHexString(DisplayUtils.primaryColor()),
+                        getString(R.string.irc_weblink))));
 
         TextView contributeForumView = (TextView) findViewById(R.id.participate_contribute_forum_text);
         contributeForumView.setMovementMethod(LinkMovementMethod.getInstance());
         contributeForumView.setText(Html.fromHtml(
                 getString(R.string.participate_contribute_forum_text,
-                        getString(R.string.help_link)
-                )));
+                        DisplayUtils.colorToHexString(DisplayUtils.primaryColor()),
+                        getString(R.string.help_link))));
 
         TextView contributeTranslationView = (TextView) findViewById(R.id.participate_contribute_translate_text);
         contributeTranslationView.setMovementMethod(LinkMovementMethod.getInstance());
         contributeTranslationView.setText(Html.fromHtml(
-                getString(R.string.participate_contribute_translate_text, getString(R.string.translation_link))));
+                getString(R.string.participate_contribute_translate_text,
+                        DisplayUtils.colorToHexString(DisplayUtils.primaryColor()),
+                        getString(R.string.translation_link))));
 
         TextView contributeGithubView = (TextView) findViewById(R.id.participate_contribute_github_text);
         contributeGithubView.setMovementMethod(LinkMovementMethod.getInstance());
-        contributeGithubView.setText(Html.fromHtml(getString(R.string.participate_contribute_github_text,
+        contributeGithubView.setText(Html.fromHtml(
+                getString(R.string.participate_contribute_github_text,
+                        DisplayUtils.colorToHexString(DisplayUtils.primaryColor()),
                 getString(R.string.contributing_link))));
 
-        findViewById(R.id.participate_testing_report).setOnClickListener(new View.OnClickListener() {
+        AppCompatButton reportButton = (AppCompatButton) findViewById(R.id.participate_testing_report);
+        reportButton.getBackground().setColorFilter(DisplayUtils.primaryColor(), PorterDuff.Mode.SRC_ATOP);
+        reportButton.setTextColor(DisplayUtils.fontColor());
+        reportButton.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View v) {
                 startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(getString(R.string.report_issue_link))));

+ 4 - 4
src/main/res/values/strings.xml

@@ -565,10 +565,10 @@
     <string name="participate_release_candidate_headline">Release candidate</string>
     <string name="participate_release_candidate_text">The release candidate (RC) is a snapshot of the upcoming release and is expected to be stable. Testing your individual setup could help ensure this. Sign up for testing on the Play store or manually look in the \"versions\" section on F-Droid.</string>
     <string name="participate_contribute_headline">Actively Contribute</string>
-    <string name="participate_contribute_irc_text">Join the chat on IRC: &lt;a href=\"%1$s\">#nextcloud-mobile&lt;/a></string>
-    <string name="participate_contribute_forum_text">Help others on the &lt;a href=\"%1$s\">forum&lt;/a></string>
-    <string name="participate_contribute_translate_text">&lt;a href=\"%1$s\">Translate&lt;/a> the app</string>
-    <string name="participate_contribute_github_text">Review, amend and write code, see &lt;a href=\"%1$s\">CONTRIBUTING.md&lt;a> for details</string>
+    <string name="participate_contribute_irc_text">Join the chat on IRC: &lt;font color=\"%1$s\">&lt;a href=\"%2$s\">#nextcloud-mobile&lt;/a>&lt;/font></string>
+    <string name="participate_contribute_forum_text">Help others on the &lt;font color=\"%1$s\">&lt;a href=\"%2$s\">forum&lt;/a>&lt;/font></string>
+    <string name="participate_contribute_translate_text">&lt;font color=\"%1$s\">&lt;a href=\"%2$s\">Translate&lt;/a>&lt;/font> the app</string>
+    <string name="participate_contribute_github_text">Review, amend and write code, see &lt;font color=\"%1$s\">&lt;a href=\"%2$s\">CONTRIBUTING.md&lt;a>&lt;/font> for details</string>
     <string name="move_to">Move to&#8230;</string>
     <string name="copy_to">Copy to&#8230;</string>
     <string name="choose_remote_folder">Choose folder&#8230;</string>