Skip to content

Commit 07f5d95

Browse files
revamped participation activity content based on the feedback
1 parent 67940c5 commit 07f5d95

File tree

7 files changed

+152
-70
lines changed

7 files changed

+152
-70
lines changed

res/drawable-xxxhdpi/fdroid.png

14.8 KB
Loading

res/drawable-xxxhdpi/playstore.png

13.6 KB
Loading

res/layout/participate_layout.xml

+84-16
Original file line numberDiff line numberDiff line change
@@ -46,42 +46,110 @@
4646
android:padding="@dimen/standard_padding">
4747

4848
<TextView
49-
android:id="@+id/participate_header"
49+
android:id="@+id/participate_headline"
5050
android:layout_width="fill_parent"
51-
android:layout_height="fill_parent"
51+
android:layout_height="wrap_content"
52+
android:text="@string/participate_testing_headline"
53+
android:textAppearance="?android:attr/textAppearanceLarge"/>
54+
55+
<TextView
56+
android:id="@+id/participate_testing_bug_text"
57+
android:layout_width="fill_parent"
58+
android:layout_height="wrap_content"
5259
android:paddingBottom="@dimen/standard_half_padding"
53-
android:text="@string/participate_header"
60+
android:text="@string/participate_testing_bug_text"
5461
android:textAppearance="?android:attr/textAppearanceMedium"/>
5562

63+
<android.support.v7.widget.AppCompatButton
64+
android:layout_width="wrap_content"
65+
android:layout_height="wrap_content"
66+
android:onClick="onReportIssueClick"
67+
android:text="@string/participate_testing_report_text"
68+
android:theme="@style/Button.Primary"/>
69+
5670
<TextView
57-
android:id="@+id/participate_betaView"
71+
android:id="@+id/participate_text"
5872
android:layout_width="fill_parent"
59-
android:layout_height="fill_parent"
73+
android:layout_height="wrap_content"
6074
android:paddingBottom="@dimen/standard_half_padding"
61-
android:text="@string/participate_beta"
75+
android:paddingTop="@dimen/standard_half_padding"
76+
android:text="@string/participate_testing_version_text"
6277
android:textAppearance="?android:attr/textAppearanceMedium"/>
6378

6479
<TextView
65-
android:id="@+id/participate_rcView"
80+
android:id="@+id/participate_release_candidate_headline"
6681
android:layout_width="fill_parent"
67-
android:layout_height="fill_parent"
68-
android:paddingBottom="@dimen/standard_half_padding"
69-
android:text="@string/participate_release_candidate"
82+
android:layout_height="wrap_content"
83+
android:text="@string/participate_release_candidate_headline"
84+
android:textAppearance="?android:attr/textAppearanceLarge"/>
85+
86+
<TextView
87+
android:id="@+id/participate_release_candidate_text"
88+
android:layout_width="fill_parent"
89+
android:layout_height="wrap_content"
90+
android:text="@string/participate_release_candidate_text"
7091
android:textAppearance="?android:attr/textAppearanceMedium"/>
7192

93+
<LinearLayout
94+
android:layout_width="match_parent"
95+
android:layout_height="wrap_content">
96+
97+
<ImageButton
98+
android:id="@+id/participate_release_candidate_playstore"
99+
android:layout_width="wrap_content"
100+
android:layout_height="wrap_content"
101+
android:background="@color/white"
102+
android:onClick="onGetRCPlayStoreClick"
103+
android:padding="0dp"
104+
android:src="@drawable/playstore"/>
105+
106+
<ImageButton
107+
android:id="@+id/participate_release_candidate_fdroid"
108+
android:layout_width="wrap_content"
109+
android:layout_height="wrap_content"
110+
android:background="@color/white"
111+
android:onClick="onGetRCFDroidClick"
112+
android:padding="0dp"
113+
android:src="@drawable/fdroid"/>
114+
115+
</LinearLayout>
116+
72117
<TextView
73-
android:id="@+id/participate_participateView"
118+
android:id="@+id/participate_beta_headline"
74119
android:layout_width="fill_parent"
75-
android:layout_height="fill_parent"
76-
android:paddingBottom="@dimen/standard_half_padding"
77-
android:text="@string/participate_participate"
120+
android:layout_height="wrap_content"
121+
android:text="@string/participate_beta_headline"
122+
android:textAppearance="?android:attr/textAppearanceLarge"/>
123+
124+
<TextView
125+
android:id="@+id/participate_beta_text"
126+
android:layout_width="fill_parent"
127+
android:layout_height="wrap_content"
128+
android:text="@string/participate_beta_text"
78129
android:textAppearance="?android:attr/textAppearanceMedium"/>
79130

131+
<ImageButton
132+
android:id="@+id/participate_beta_fdroid"
133+
android:layout_width="wrap_content"
134+
android:layout_height="wrap_content"
135+
android:background="@color/white"
136+
android:onClick="onGetBetaFDroidClick"
137+
android:padding="0dp"
138+
android:src="@drawable/fdroid"/>
139+
140+
<TextView
141+
android:id="@+id/participate_contribute_headline"
142+
android:layout_width="wrap_content"
143+
android:layout_height="wrap_content"
144+
android:text="@string/participate_contribute_headline"
145+
android:textAppearance="?android:attr/textAppearanceLarge"/>
146+
80147
<TextView
81-
android:id="@+id/participate_contributeView"
148+
android:id="@+id/participate_contribute_text"
82149
android:layout_width="wrap_content"
83150
android:layout_height="wrap_content"
84-
android:text="@string/participate_contribute"
151+
android:text="@string/participate_contribute_text"
152+
android:paddingLeft="@dimen/standard_half_padding"
85153
android:textAppearance="?android:attr/textAppearanceMedium"/>
86154
</LinearLayout>
87155
</ScrollView>

res/menu/drawer_menu.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
android:orderInCategory="3"
7171
android:id="@+id/nav_participate"
7272
android:icon="@drawable/ic_participate"
73-
android:title="@string/actionbar_participate"/>
73+
android:title="@string/drawer_participate"/>
7474
</group>
7575

7676
<!--

res/values/setup.xml

+1
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@
7979
<string name="irc_weblink" translatable="false">http://webchat.freenode.net?channels=nextcloud-mobile</string>
8080
<string name="help_link" translatable="false">https://help.nextcloud.com/c/clients/android</string>
8181
<string name="contributing_link" translatable="false">https://github.com/nextcloud/android/blob/master/CONTRIBUTING.md</string>
82+
<string name="report_issue_link" translatable="false">https://github.com/nextcloud/android/issues</string>
8283

8384
</resources>
8485

res/values/strings.xml

+15-6
Original file line numberDiff line numberDiff line change
@@ -469,12 +469,21 @@
469469
<string name="actionbar_search">Search</string>
470470
<string name="files_drop_not_supported">This is a Nextcloud feature, please update.</string>
471471
<string name="learn_more">Learn more</string>
472-
<string name="actionbar_participate">Participate</string>
473-
<string name="participate_beta">&lt;b>Beta version&lt;/b>&lt;br/>This includes all upcoming features and is very bleeding edge. Bugs/errors can occur and if they do, please report them to us.&lt;br>Get it&lt;br>&lt;a href="%1$s">via F-Droid&lt;/a>&lt;br>&lt;a href="%2$s">via APK&lt;/a></string>
474-
<string name="participate_release_candidate">&lt;b>Release candidate&lt;/b>&lt;br>A release candidate is a snapshot of the upcoming release. It is expected to be stable and has no bugs.&lt;br>To ensure this, we need your help testing it on a vary of server versions/settings.&lt;br>Get it&lt;br>&lt;a href="%1$s">via Play Store&lt;/a> (Sign up for testing)&lt;br>&lt;a href="%2$s">via F-Droid&lt;/a> (Manually look in the \"versions\" section.)</string>
475-
<string name="participate_participate">&lt;b>Participate&lt;/b>&lt;br>Report issues on &lt;a href="https://github.com/nextcloud/android/issues">Github&lt;/a>&lt;br>Join the chat on IRC: &lt;a href="%1$s">#nextcloud-mobile&lt;/a>&lt;br>Help others on the &lt;a href="%2$s">forum&lt;/a></string>
476-
<string name="participate_contribute">&lt;b>Contribute as a developer&lt;/b>&lt;br>Everybody is welcome to help us build this app. Just have a look at the open issues, read &lt;a href="%1$s">Contributing.md&lt;/a> or talk to us at &lt;a href="%2$s">#nextcloud-mobile&lt;/a> on IRC about what can be enhanced.</string>
477-
<string name="participate_header"><b>Help us testing</b>\nWe offer two different previews of the upcoming version:</string>
472+
<string name="drawer_participate">Participate</string>
473+
<string name="participate_testing_headline">Help us testing</string>
474+
<string name="participate_testing_bug_text">Found a bug? Something is odd?</string>
475+
<string name="participate_testing_report_text">Report an issue on Github</string>
476+
<string name="participate_testing_version_text">Interested in helping us testing the next Version?</string>
477+
<string name="participate_beta_headline">Test the Beta version</string>
478+
<string name="participate_beta_text">This includes all upcoming features and is very bleeding edge. Bugs/errors can occur and if they do, please report them to us. &lt;a href="%2$s">Download the APK&lt;/a> or</string>
479+
<string name="participate_release_candidate_headline">Release candidate</string>
480+
<string name="participate_release_candidate_text">The release candidate (RC) is a snapshot of the upcoming
481+
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>
482+
<string name="participate_contribute_headline">Actively Contribute</string>
483+
<string name="participate_contribute_text">&lt;ul>&lt;li>Join the chat on IRC: &lt;a
484+
href="%1$s">#nextcloud-mobile&lt;/a>&lt;/li>&lt;li>Help others on the &lt;a
485+
href="%2$s>forum&lt;/a>&lt;/li>&lt;li>Be part of the Team and contribute as a developer: &lt;a
486+
href="https://github.com/nextcloud/android/blob/master/CONTRIBUTING.md">Github CONTRIBUTING.md&lt;/a>&lt;/li&lt;/ul></string>
478487
<plurals name="items_selected_count">
479488
<!--
480489
As a developer, you should always supply "one" and "other"

src/com/owncloud/android/ui/activity/ParticipateActivity.java

+51-47
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,33 @@
11
/**
2-
* Nextcloud Android client application
2+
* Nextcloud Android client application
33
*
4-
* @author Andy Scherzinger
5-
* @author Tobias Kaminsky
6-
* Copyright (C) 2016 Andy Scherzinger
7-
* Copyright (C) 2016 Nextcloud
8-
*
9-
* This program is free software; you can redistribute it and/or
10-
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
11-
* License as published by the Free Software Foundation; either
12-
* version 3 of the License, or any later version.
13-
*
14-
* This program is distributed in the hope that it will be useful,
15-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17-
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
18-
*
19-
* You should have received a copy of the GNU Affero General Public
20-
* License along with this program. If not, see <http://www.gnu.org/licenses/>.
4+
* @author Andy Scherzinger
5+
* @author Tobias Kaminsky
6+
* Copyright (C) 2016 Andy Scherzinger
7+
* Copyright (C) 2016 Nextcloud
8+
* <p/>
9+
* This program is free software; you can redistribute it and/or
10+
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
11+
* License as published by the Free Software Foundation; either
12+
* version 3 of the License, or any later version.
13+
* <p/>
14+
* This program is distributed in the hope that it will be useful,
15+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17+
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
18+
* <p/>
19+
* You should have received a copy of the GNU Affero General Public
20+
* License along with this program. If not, see <http://www.gnu.org/licenses/>.
2121
*/
2222
package com.owncloud.android.ui.activity;
2323

2424
import android.content.Intent;
25+
import android.net.Uri;
2526
import android.os.Bundle;
2627
import android.text.Html;
2728
import android.text.method.LinkMovementMethod;
2829
import android.view.MenuItem;
30+
import android.view.View;
2931
import android.widget.TextView;
3032

3133
import com.owncloud.android.R;
@@ -46,43 +48,45 @@ protected void onCreate(Bundle savedInstanceState) {
4648

4749
// setup drawer
4850
setupDrawer(R.id.nav_participate);
49-
getSupportActionBar().setTitle(getString(R.string.actionbar_participate));
51+
getSupportActionBar().setTitle(getString(R.string.drawer_participate));
5052

5153
setupContent();
5254
}
5355

5456
private void setupContent() {
55-
TextView betaView = (TextView) findViewById(R.id.participate_betaView);
56-
if (betaView != null) {
57-
betaView.setMovementMethod(LinkMovementMethod.getInstance());
58-
betaView.setText(Html.fromHtml(getString(R.string.participate_beta,
59-
getString(R.string.fdroid_beta_link),
60-
getString(R.string.beta_apk_link))));
61-
}
57+
TextView betaView = (TextView) findViewById(R.id.participate_beta_text);
58+
betaView.setMovementMethod(LinkMovementMethod.getInstance());
59+
betaView.setText(Html.fromHtml(getString(R.string.participate_beta_text,
60+
getString(R.string.fdroid_beta_link),
61+
getString(R.string.beta_apk_link))));
6262

63-
TextView rcView = (TextView) findViewById(R.id.participate_rcView);
64-
if (rcView != null) {
65-
rcView.setMovementMethod(LinkMovementMethod.getInstance());
66-
rcView.setText(Html.fromHtml(getString(R.string.participate_release_candidate,
67-
getString(R.string.play_store_register_beta),
68-
getString(R.string.fdroid_link))));
69-
}
7063

71-
TextView participateView = (TextView) findViewById(R.id.participate_participateView);
72-
if (participateView != null) {
73-
participateView.setMovementMethod(LinkMovementMethod.getInstance());
74-
participateView.setText(Html.fromHtml(getString(R.string.participate_participate,
75-
getString(R.string.irc_weblink),
76-
getString(R.string.help_link))));
77-
}
64+
TextView rcView = (TextView) findViewById(R.id.participate_release_candidate_text);
65+
rcView.setMovementMethod(LinkMovementMethod.getInstance());
7866

79-
TextView contributeView = (TextView) findViewById(R.id.participate_contributeView);
80-
if (contributeView != null) {
81-
contributeView.setMovementMethod(LinkMovementMethod.getInstance());
82-
contributeView.setText(Html.fromHtml(getString(R.string.participate_contribute,
83-
getString(R.string.contributing_link),
84-
getString(R.string.irc_weblink))));
85-
}
67+
TextView contributeView = (TextView) findViewById(R.id.participate_contribute_text);
68+
contributeView.setMovementMethod(LinkMovementMethod.getInstance());
69+
contributeView.setText(Html.fromHtml(
70+
getString(R.string.participate_contribute_text,
71+
getString(R.string.irc_weblink),
72+
getString(R.string.help_link)
73+
)));
74+
}
75+
76+
public void onReportIssueClick(View view) {
77+
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(getString(R.string.report_issue_link))));
78+
}
79+
80+
public void onGetBetaFDroidClick(View view) {
81+
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(getString(R.string.fdroid_beta_link))));
82+
}
83+
84+
public void onGetRCFDroidClick(View view) {
85+
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(getString(R.string.fdroid_link))));
86+
}
87+
88+
public void onGetRCPlayStoreClick(View view) {
89+
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(getString(R.string.play_store_register_beta))));
8690
}
8791

8892
@Override

0 commit comments

Comments
 (0)