Add translators and contributors to About

This commit is contained in:
Jakob Nixdorf 2017-08-10 11:31:17 +02:00
parent 85dbeae388
commit 8c1d5580de
No known key found for this signature in database
GPG key ID: BE99BF86574A7DBC
3 changed files with 83 additions and 3 deletions

View file

@ -51,13 +51,16 @@ public class AboutActivity extends BaseActivity {
private static final String AUTHOR2_GITHUB = "https://github.com/0xbb";
private static final String AUTHOR2_APP = AUTHOR2_GITHUB + "/otp-authenticator";
private static final String CONTRIBUTORS_URI = GITHUB_URI + "/blob/master/README.md#contributors";
private static final String TRANSLATORS_URI = GITHUB_URI + "/blob/master/README.md#translators";
private static final String BUGREPORT_URI = GITHUB_URI + "/issues";
private static final String TRANSLATE_URI = "https://crowdin.com/project/andotp";
int[] imageResources = {
R.id.aboutImgVersion, R.id.aboutImgLicense, R.id.aboutImgChangelog, R.id.aboutImgSource,
R.id.aboutImgOpenSource, R.id.aboutImgAuthor1, R.id.aboutImgAuthor2, R.id.aboutImgBugs,
R.id.aboutImgTranslate
R.id.aboutImgOpenSource, R.id.aboutImgAuthor1, R.id.aboutImgAuthor2, R.id.aboutImgContributors,
R.id.aboutImgTranslators, R.id.aboutImgBugs, R.id.aboutImgTranslate
};
@Override
@ -150,6 +153,21 @@ public class AboutActivity extends BaseActivity {
}
});
LinearLayout contributors = (LinearLayout) v.findViewById(R.id.about_layout_contributors);
LinearLayout translators = (LinearLayout) v.findViewById(R.id.about_layout_translators);
contributors.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
openURI(CONTRIBUTORS_URI);
}
});
translators.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
openURI(TRANSLATORS_URI);
}
});
LinearLayout bugReport = (LinearLayout) v.findViewById(R.id.about_layout_bugs);
LinearLayout translate = (LinearLayout) v.findViewById(R.id.about_layout_translate);
bugReport.setOnClickListener(new View.OnClickListener() {

View file

@ -326,7 +326,6 @@
</LinearLayout>
<View
android:id="@+id/view_divider_authors"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/divider"
@ -399,6 +398,66 @@
</LinearLayout>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/divider"
android:layout_margin="@dimen/activity_margin" />
<!-- contributors -->
<LinearLayout
android:id="@+id/about_layout_contributors"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="?android:attr/listPreferredItemHeight"
android:padding="@dimen/activity_margin_small"
android:background="?android:attr/selectableItemBackground"
android:gravity="center_vertical" >
<ImageView
android:id="@+id/aboutImgContributors"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/activity_margin"
android:layout_marginEnd="@dimen/activity_margin_large"
android:src="@drawable/ic_code_gray" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/about_label_contributors"
android:textStyle="bold"
android:textAppearance="?android:attr/textAppearanceMedium" />
</LinearLayout>
<!-- translators -->
<LinearLayout
android:id="@+id/about_layout_translators"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="?android:attr/listPreferredItemHeight"
android:padding="@dimen/activity_margin_small"
android:background="?android:attr/selectableItemBackground"
android:gravity="center_vertical" >
<ImageView
android:id="@+id/aboutImgTranslators"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/activity_margin"
android:layout_marginEnd="@dimen/activity_margin_large"
android:src="@drawable/ic_translate_gray" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/about_label_translators"
android:textStyle="bold"
android:textAppearance="?android:attr/textAppearanceMedium" />
</LinearLayout>
</LinearLayout>
</android.support.v7.widget.CardView>

View file

@ -26,6 +26,9 @@
<string name="about_name_author1" translatable="false">Jakob Nixdorf</string>
<string name="about_name_author2" translatable="false">Bruno Bierbaumer</string>
<string name="about_label_contributors">Contributors</string>
<string name="about_label_translators">Translators</string>
<!-- Support -->
<string name="about_title_support">Support development</string>