Prechádzať zdrojové kódy

bugfix layouting and issue reporting button click

Andy Scherzinger 8 rokov pred
rodič
commit
9a36b3508f

+ 19 - 3
res/layout/participate_layout.xml

@@ -145,11 +145,27 @@
                     android:textAppearance="?android:attr/textAppearanceLarge"/>
 
                 <TextView
-                    android:id="@+id/participate_contribute_text"
+                    android:id="@+id/participate_contribute_irc_text"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:text="@string/participate_contribute_text"
-                    android:paddingLeft="@dimen/standard_half_padding"
+                    android:text="@string/participate_contribute_irc_text"
+                    android:padding="@dimen/standard_half_padding"
+                    android:textAppearance="?android:attr/textAppearanceMedium"/>
+
+                <TextView
+                    android:id="@+id/participate_contribute_forum_text"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:text="@string/participate_contribute_forum_text"
+                    android:padding="@dimen/standard_half_padding"
+                    android:textAppearance="?android:attr/textAppearanceMedium"/>
+
+                <TextView
+                    android:id="@+id/participate_contribute_github_text"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:text="@string/participate_contribute_github_text"
+                    android:padding="@dimen/standard_half_padding"
                     android:textAppearance="?android:attr/textAppearanceMedium"/>
             </LinearLayout>
         </ScrollView>

+ 3 - 4
res/values/strings.xml

@@ -480,10 +480,9 @@
     <string name="participate_release_candidate_text">The release candidate (RC) is a snapshot of the upcoming
         release and it is expected to be stable. Testing your individual setup could help to 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_text">&lt;ul>&lt;li>Join the chat on IRC: &lt;a
-        href="%1$s">#nextcloud-mobile&lt;/a>&lt;/li>&lt;li>Help others on the &lt;a
-        href="%2$s>forum&lt;/a>&lt;/li>&lt;li>Be part of the Team and contribute as a developer: &lt;a
-        href="https://github.com/nextcloud/android/blob/master/CONTRIBUTING.md">Github CONTRIBUTING.md&lt;/a>&lt;/li&lt;/ul></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_github_text">Be part of the Team and contribute as a developer: &lt;a href="https://github.com/nextcloud/android/blob/master/CONTRIBUTING.md">Github CONTRIBUTING.md&lt;/a></string>
     <plurals name="items_selected_count">
         <!--
              As a developer, you should always supply "one" and "other"

+ 15 - 5
src/com/owncloud/android/ui/activity/ParticipateActivity.java

@@ -66,14 +66,24 @@ public class ParticipateActivity extends FileActivity {
         TextView rcView = (TextView) findViewById(R.id.participate_release_candidate_text);
         rcView.setMovementMethod(LinkMovementMethod.getInstance());
 
-        TextView contributeView = (TextView) findViewById(R.id.participate_contribute_text);
-        contributeView.setMovementMethod(LinkMovementMethod.getInstance());
-        contributeView.setText(Html.fromHtml(
-                getString(R.string.participate_contribute_text,
-                        getString(R.string.irc_weblink),
+        TextView contributeIrcView = (TextView) findViewById(R.id.participate_contribute_irc_text);
+        contributeIrcView.setMovementMethod(LinkMovementMethod.getInstance());
+        contributeIrcView.setText(Html.fromHtml(
+                getString(R.string.participate_contribute_irc_text,
+                        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)
                 )));
 
+        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)));
+
         mReportBtn = (Button) findViewById(R.id.participate_testing_report);
         mReportBtn.setOnClickListener(new View.OnClickListener() {
             @Override