Rework the author section in About a bit

This commit is contained in:
Jakob Nixdorf 2018-03-28 14:20:18 +02:00
parent 69ed48842a
commit 2b319149da
No known key found for this signature in database
GPG key ID: BE99BF86574A7DBC
9 changed files with 57 additions and 103 deletions

View file

@ -49,7 +49,7 @@ public class AboutFragment extends Fragment {
static final int[] imageResources = { static final int[] imageResources = {
R.id.aboutImgVersion, R.id.aboutImgLicense, R.id.aboutImgChangelog, R.id.aboutImgSource, R.id.aboutImgVersion, R.id.aboutImgLicense, R.id.aboutImgChangelog, R.id.aboutImgSource,
R.id.aboutImgAuthor1, R.id.aboutImgAuthorOriginal, R.id.aboutImgContributors, R.id.aboutImgAuthor2, R.id.aboutImgAuthorOriginal, R.id.aboutImgContributors,
R.id.aboutImgTranslators, R.id.aboutImgBugs, R.id.aboutImgTranslate R.id.aboutImgTranslators, R.id.aboutImgBugs, R.id.aboutImgTranslate
}; };
@ -137,15 +137,15 @@ public class AboutFragment extends Fragment {
} }
}); });
TextView author1GitHub = v.findViewById(R.id.about_author1_github); LinearLayout author1Layout = v.findViewById(R.id.aboutLayoutAuthor1);
TextView author1Paypal = v.findViewById(R.id.about_author1_extra); TextView author1Donate = v.findViewById(R.id.about_author1_extra);
author1GitHub.setOnClickListener(new View.OnClickListener() { author1Layout.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View view) { public void onClick(View view) {
openURI(AUTHOR1_GITHUB); openURI(AUTHOR1_GITHUB);
} }
}); });
author1Paypal.setOnClickListener(new View.OnClickListener() { author1Donate.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View view) { public void onClick(View view) {
try { try {
@ -157,15 +157,15 @@ public class AboutFragment extends Fragment {
}); });
TextView author2GitHub = v.findViewById(R.id.about_author2_github); LinearLayout author2Layout = v.findViewById(R.id.aboutLayoutAuthor2);
TextView author2Paypal = v.findViewById(R.id.about_author2_extra); TextView author2Donate = v.findViewById(R.id.about_author2_extra);
author2GitHub.setOnClickListener(new View.OnClickListener() { author2Layout.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View view) { public void onClick(View view) {
openURI(AUTHOR2_GITHUB); openURI(AUTHOR2_GITHUB);
} }
}); });
author2Paypal.setOnClickListener(new View.OnClickListener() { author2Donate.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View view) { public void onClick(View view) {
try { try {
@ -176,9 +176,9 @@ public class AboutFragment extends Fragment {
} }
}); });
TextView authorOriginalGitHub = v.findViewById(R.id.about_author_original_github); LinearLayout authorOrigialLayout = v.findViewById(R.id.aboutLayoutOriginalAuthor);
TextView authorOriginalApp = v.findViewById(R.id.about_author_original_extra); TextView authorOriginalApp = v.findViewById(R.id.about_author_original_extra);
authorOriginalGitHub.setOnClickListener(new View.OnClickListener() { authorOrigialLayout.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View view) { public void onClick(View view) {
openURI(AUTHOR_ORIGINAL_GITHUB); openURI(AUTHOR_ORIGINAL_GITHUB);

View file

@ -226,6 +226,7 @@
<!-- 1st author --> <!-- 1st author -->
<LinearLayout <LinearLayout
android:id="@+id/aboutLayoutAuthor1"
android:orientation="horizontal" android:orientation="horizontal"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -237,11 +238,11 @@
<ImageView <ImageView
android:id="@+id/aboutImgAuthor1" android:id="@+id/aboutImgAuthor1"
android:layout_width="wrap_content" android:layout_width="@dimen/author_image_size"
android:layout_height="wrap_content" android:layout_height="@dimen/author_image_size"
android:layout_marginStart="@dimen/activity_margin" android:layout_marginStart="@dimen/activity_margin"
android:layout_marginEnd="@dimen/activity_margin_large" android:layout_marginEnd="@dimen/activity_margin"
android:src="@drawable/ic_account_circle_gray" /> android:src="@mipmap/ic_author_flocke" />
<LinearLayout <LinearLayout
android:orientation="vertical" android:orientation="vertical"
@ -262,34 +263,16 @@
android:textAppearance="?android:attr/textAppearanceSmall" android:textAppearance="?android:attr/textAppearanceSmall"
android:text="@string/about_label_main_developer"/> android:text="@string/about_label_main_developer"/>
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/activity_margin"
android:layout_gravity="center_vertical">
<TextView
android:id="@+id/about_author1_github"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="?android:attr/selectableItemBackground"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textStyle="bold"
android:textColor="?attr/colorGithub"
android:text="@string/about_label_github" />
<TextView <TextView
android:id="@+id/about_author1_extra" android:id="@+id/about_author1_extra"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="@dimen/activity_margin_large" android:layout_marginTop="@dimen/activity_margin_small"
android:background="?android:attr/selectableItemBackground" android:background="?android:attr/selectableItemBackground"
android:textAppearance="?android:attr/textAppearanceMedium" android:textAppearance="?android:attr/textAppearanceMedium"
android:textStyle="bold" android:textStyle="bold"
android:textColor="?attr/colorPaypal" android:textColor="?attr/colorPaypal"
android:text="@string/about_label_donate" /> android:text="@string/about_label_donate_paypal" />
</LinearLayout>
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
@ -301,6 +284,7 @@
<!-- Original author --> <!-- Original author -->
<LinearLayout <LinearLayout
android:id="@+id/aboutLayoutAuthor2"
android:orientation="horizontal" android:orientation="horizontal"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -311,10 +295,11 @@
<ImageView <ImageView
android:id="@+id/aboutImgAuthor2" android:id="@+id/aboutImgAuthor2"
android:layout_width="wrap_content" android:layout_width="@dimen/author_image_size"
android:layout_height="wrap_content" android:layout_height="@dimen/author_image_size"
android:layout_marginStart="@dimen/activity_margin" android:layout_marginStart="@dimen/activity_margin"
android:layout_marginEnd="@dimen/activity_margin_large" android:layout_marginEnd="@dimen/activity_margin"
android:padding="@dimen/activity_margin_small"
android:src="@drawable/ic_account_circle_gray" /> android:src="@drawable/ic_account_circle_gray" />
<LinearLayout <LinearLayout
@ -336,34 +321,16 @@
android:textAppearance="?android:attr/textAppearanceSmall" android:textAppearance="?android:attr/textAppearanceSmall"
android:text="@string/about_label_developer"/> android:text="@string/about_label_developer"/>
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/activity_margin"
android:layout_gravity="center_vertical">
<TextView
android:id="@+id/about_author2_github"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="?android:attr/selectableItemBackground"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textStyle="bold"
android:textColor="?attr/colorGithub"
android:text="@string/about_label_github" />
<TextView <TextView
android:id="@+id/about_author2_extra" android:id="@+id/about_author2_extra"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="@dimen/activity_margin_large" android:layout_marginTop="@dimen/activity_margin_small"
android:background="?android:attr/selectableItemBackground" android:background="?android:attr/selectableItemBackground"
android:textAppearance="?android:attr/textAppearanceMedium" android:textAppearance="?android:attr/textAppearanceMedium"
android:textStyle="bold" android:textStyle="bold"
android:textColor="?attr/colorPaypal" android:textColor="?attr/colorPaypal"
android:text="@string/about_label_donate" /> android:text="@string/about_label_donate_bitcoin" />
</LinearLayout>
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
@ -375,6 +342,7 @@
<!-- Original author --> <!-- Original author -->
<LinearLayout <LinearLayout
android:id="@+id/aboutLayoutOriginalAuthor"
android:orientation="horizontal" android:orientation="horizontal"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -385,10 +353,11 @@
<ImageView <ImageView
android:id="@+id/aboutImgAuthorOriginal" android:id="@+id/aboutImgAuthorOriginal"
android:layout_width="wrap_content" android:layout_width="@dimen/author_image_size"
android:layout_height="wrap_content" android:layout_height="@dimen/author_image_size"
android:layout_marginStart="@dimen/activity_margin" android:layout_marginStart="@dimen/activity_margin"
android:layout_marginEnd="@dimen/activity_margin_large" android:layout_marginEnd="@dimen/activity_margin"
android:padding="@dimen/activity_margin_small"
android:src="@drawable/ic_account_circle_gray" /> android:src="@drawable/ic_account_circle_gray" />
<LinearLayout <LinearLayout
@ -410,28 +379,11 @@
android:textAppearance="?android:attr/textAppearanceSmall" android:textAppearance="?android:attr/textAppearanceSmall"
android:text="@string/about_label_original_author"/> android:text="@string/about_label_original_author"/>
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/activity_margin"
android:layout_gravity="center_vertical">
<TextView
android:id="@+id/about_author_original_github"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="?android:attr/selectableItemBackground"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textStyle="bold"
android:textColor="?attr/colorGithub"
android:text="@string/about_label_github" />
<TextView <TextView
android:id="@+id/about_author_original_extra" android:id="@+id/about_author_original_extra"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="@dimen/activity_margin_large" android:layout_marginTop="@dimen/activity_margin_small"
android:background="?android:attr/selectableItemBackground" android:background="?android:attr/selectableItemBackground"
android:textAppearance="?android:attr/textAppearanceMedium" android:textAppearance="?android:attr/textAppearanceMedium"
android:textStyle="bold" android:textStyle="bold"
@ -439,7 +391,6 @@
android:text="@string/about_label_original_app" /> android:text="@string/about_label_original_app" />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
</LinearLayout>
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5 KiB

View file

@ -12,6 +12,8 @@
<dimen name="card_padding_without_corners">14dp</dimen> <dimen name="card_padding_without_corners">14dp</dimen>
<dimen name="card_thumbnail_size">46dp</dimen> <dimen name="card_thumbnail_size">46dp</dimen>
<dimen name="author_image_size">64dp</dimen>
<!-- The default letter tile text size --> <!-- The default letter tile text size -->
<dimen name="tile_letter_font_size">33sp</dimen> <dimen name="tile_letter_font_size">33sp</dimen>

View file

@ -23,7 +23,8 @@
<string name="about_label_original_app">Original App</string> <string name="about_label_original_app">Original App</string>
<string name="about_label_website">Website</string> <string name="about_label_website">Website</string>
<string name="about_label_github" translatable="false">Github</string> <string name="about_label_github" translatable="false">Github</string>
<string name="about_label_donate">Donate</string> <string name="about_label_donate_paypal">Donate (PayPal)</string>
<string name="about_label_donate_bitcoin">Donate (Bitcoin)</string>
<string name="about_name_author1" translatable="false">Jakob Nixdorf</string> <string name="about_name_author1" translatable="false">Jakob Nixdorf</string>
<string name="about_name_author_original" translatable="false">Bruno Bierbaumer</string> <string name="about_name_author_original" translatable="false">Bruno Bierbaumer</string>