jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/405306 )
Change subject: Update design of About screen.
......................................................................
Update design of About screen.
Bug: T181640
Change-Id: I09763c10fd8791859d532fb3bd075be8208284a9
---
M app/src/main/java/org/wikipedia/settings/AboutActivity.java
D app/src/main/res/drawable/wikipedia_globe_263dp.jpg
A app/src/main/res/drawable/wikipedia_globe_263dp.png
M app/src/main/res/layout/activity_about.xml
4 files changed, 73 insertions(+), 83 deletions(-)
Approvals:
jenkins-bot: Verified
Cooltey: Looks good to me, approved
diff --git a/app/src/main/java/org/wikipedia/settings/AboutActivity.java
b/app/src/main/java/org/wikipedia/settings/AboutActivity.java
index 2b793a3..67bf3a1 100644
--- a/app/src/main/java/org/wikipedia/settings/AboutActivity.java
+++ b/app/src/main/java/org/wikipedia/settings/AboutActivity.java
@@ -1,12 +1,13 @@
package org.wikipedia.settings;
import android.app.Activity;
+import android.content.Intent;
+import android.net.Uri;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.text.method.LinkMovementMethod;
import android.view.View;
import android.view.ViewGroup;
-import android.widget.ScrollView;
import android.widget.TextView;
import org.wikipedia.BuildConfig;
@@ -18,14 +19,11 @@
import butterknife.BindView;
import butterknife.ButterKnife;
+import butterknife.OnClick;
import static org.wikipedia.util.DeviceUtil.mailAppExists;
public class AboutActivity extends BaseActivity {
- private static final String KEY_SCROLL_X = "KEY_SCROLL_X";
- private static final String KEY_SCROLL_Y = "KEY_SCROLL_Y";
-
- private ScrollView mScrollView;
@BindView(R.id.about_translators) TextView translatorsTextView;
@BindView(R.id.activity_about_libraries) TextView librariesTextView;
@BindView(R.id.about_app_license) TextView appLicenseTextView;
@@ -38,7 +36,6 @@
setContentView(R.layout.activity_about);
ButterKnife.bind(this);
- mScrollView = findViewById(R.id.about_scrollview);
translatorsTextView.setText(StringUtil.fromHtml(getString(R.string.about_translators_translatewiki)));
RichTextUtil.removeUnderlinesFromLinks(translatorsTextView);
wmfTextView.setText(StringUtil.fromHtml(getString(R.string.about_wmf)));
@@ -46,13 +43,6 @@
appLicenseTextView.setText(StringUtil.fromHtml(getString(R.string.about_app_license)));
RichTextUtil.removeUnderlinesFromLinks(appLicenseTextView);
((TextView)
findViewById(R.id.about_version_text)).setText(BuildConfig.VERSION_NAME);
- feedbackTextView.setText(StringUtil.fromHtml(
- "<a
href=\"mailto:[email protected]?subject=Android App "
- + BuildConfig.VERSION_NAME
- + " Feedback\">"
- + getString(R.string.send_feedback)
- + "</a>"));
- RichTextUtil.removeUnderlinesFromLinks(feedbackTextView);
RichTextUtil.removeUnderlinesFromLinks(librariesTextView);
findViewById(R.id.about_logo_image).setOnClickListener(new
AboutLogoClickListener());
@@ -62,27 +52,15 @@
feedbackTextView.setVisibility(View.GONE);
}
- makeEverythingClickable((ViewGroup)
findViewById(R.id.about_container));
+ makeEverythingClickable(findViewById(R.id.about_container));
}
- @Override
- public void onSaveInstanceState(Bundle outState) {
- outState.putInt(KEY_SCROLL_X, mScrollView.getScrollX());
- outState.putInt(KEY_SCROLL_Y, mScrollView.getScrollY());
- super.onSaveInstanceState(outState);
- }
-
- @Override
- public void onRestoreInstanceState(@NonNull Bundle savedInstanceState) {
- super.onRestoreInstanceState(savedInstanceState);
- final int x = savedInstanceState.getInt(KEY_SCROLL_X);
- final int y = savedInstanceState.getInt(KEY_SCROLL_Y);
- mScrollView.post(new Runnable() {
- @Override
- public void run() {
- mScrollView.scrollTo(x, y);
- }
- });
+ @OnClick(R.id.send_feedback_text) void onSendFeedbackClick(View v) {
+ Intent intent = new Intent()
+ .setAction(Intent.ACTION_SENDTO)
+
.setData(Uri.parse("mailto:[email protected]?subject=Android
App "
+ + BuildConfig.VERSION_NAME + " Feedback"));
+ startActivity(intent);
}
private void makeEverythingClickable(ViewGroup vg) {
diff --git a/app/src/main/res/drawable/wikipedia_globe_263dp.jpg
b/app/src/main/res/drawable/wikipedia_globe_263dp.jpg
deleted file mode 100644
index 7a8bf13..0000000
--- a/app/src/main/res/drawable/wikipedia_globe_263dp.jpg
+++ /dev/null
Binary files differ
diff --git a/app/src/main/res/drawable/wikipedia_globe_263dp.png
b/app/src/main/res/drawable/wikipedia_globe_263dp.png
new file mode 100644
index 0000000..9a32076
--- /dev/null
+++ b/app/src/main/res/drawable/wikipedia_globe_263dp.png
Binary files differ
diff --git a/app/src/main/res/layout/activity_about.xml
b/app/src/main/res/layout/activity_about.xml
index 8fed0ed..fb757e0 100644
--- a/app/src/main/res/layout/activity_about.xml
+++ b/app/src/main/res/layout/activity_about.xml
@@ -10,43 +10,53 @@
<LinearLayout
android:id="@+id/about_container"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical">
+
+ <LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:padding="24dp"
+ android:paddingLeft="@dimen/activity_horizontal_margin"
+ android:paddingRight="@dimen/activity_horizontal_margin"
+ android:background="?attr/paper_color"
+ android:elevation="4dp"
android:gravity="center">
<ImageView
android:id="@+id/about_logo_image"
- android:layout_width="48dp"
- android:layout_height="48dp"
- android:src="@drawable/w_nav_mark"
- android:tint="?attr/primary_text_color"
+ android:layout_width="88dp"
+ android:layout_height="80dp"
+ android:layout_marginTop="30dp"
+ android:src="@drawable/wikipedia_globe_263dp"
android:contentDescription="@null" />
<ImageView
- android:layout_width="128dp"
- android:layout_height="wrap_content"
+ android:layout_width="114dp"
+ android:layout_height="22dp"
+ android:layout_marginTop="4dp"
android:src="@drawable/wp_wordmark"
- android:tint="?attr/primary_text_color"
+ android:tint="?attr/chart_shade1"
android:contentDescription="@null" />
<TextView android:id="@+id/about_version_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginBottom="8dp"
+ android:layout_marginTop="16dp"
+ android:layout_marginBottom="16dp"
tools:text="2.x-sample-version"
style="?android:textAppearanceSmall"
android:textIsSelectable="true"
- android:textColor="?attr/primary_text_color" />
+ android:textColor="?attr/material_theme_primary_color" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginTop="8dp"
+ android:layout_marginTop="20dp"
android:layout_marginBottom="8dp"
- style="?android:textAppearanceSmall"
- android:textColor="?attr/primary_text_color"
+ android:textSize="16sp"
+ android:textColor="?attr/material_theme_primary_color"
android:text="@string/about_contributors_heading" />
<org.wikipedia.views.AppTextView
@@ -56,17 +66,17 @@
android:text="@string/contributors_list"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textIsSelectable="true"
- android:lineSpacingMultiplier="1.2"
- android:textColor="?attr/secondary_text_color"
+ android:lineSpacingExtra="6sp"
+ android:textColor="?attr/material_theme_secondary_color"
android:layout_marginBottom="8dp" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginTop="8dp"
+ android:layout_marginTop="20dp"
android:layout_marginBottom="8dp"
- style="?android:textAppearanceSmall"
- android:textColor="?attr/primary_text_color"
+ android:textSize="16sp"
+ android:textColor="?attr/material_theme_primary_color"
android:text="@string/about_translators_heading" />
<org.wikipedia.views.AppTextView
@@ -76,17 +86,17 @@
android:text="@string/about_translators_translatewiki"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textIsSelectable="true"
- android:lineSpacingMultiplier="1.2"
- android:textColor="?attr/secondary_text_color"
+ android:lineSpacingExtra="6sp"
+ android:textColor="?attr/material_theme_secondary_color"
android:layout_marginBottom="8dp" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
- style="?android:textAppearanceSmall"
- android:textColor="?attr/primary_text_color"
+ android:textSize="16sp"
+ android:textColor="?attr/material_theme_primary_color"
android:text="@string/about_libraries_heading"
- android:layout_marginTop="8dp"
+ android:layout_marginTop="20dp"
android:layout_marginBottom="8dp" />
<org.wikipedia.views.AppTextView
@@ -97,17 +107,17 @@
android:text="@string/libraries_list"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textIsSelectable="true"
- android:lineSpacingMultiplier="1.2"
- android:textColor="?attr/secondary_text_color"
+ android:lineSpacingExtra="6sp"
+ android:textColor="?attr/material_theme_secondary_color"
android:layout_marginBottom="8dp" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
- style="?android:textAppearanceSmall"
- android:textColor="?attr/primary_text_color"
+ android:textSize="16sp"
+ android:textColor="?attr/material_theme_primary_color"
android:text="@string/about_app_license_heading"
- android:layout_marginTop="8dp"
+ android:layout_marginTop="20dp"
android:layout_marginBottom="8dp" />
<org.wikipedia.views.AppTextView
@@ -117,31 +127,29 @@
android:text="@string/about_app_license"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textIsSelectable="true"
- android:lineSpacingMultiplier="1.2"
- android:textColor="?attr/secondary_text_color"
- android:layout_marginBottom="8dp" />
+ android:lineSpacingExtra="6sp"
+ android:textColor="?attr/material_theme_secondary_color" />
<TextView
android:id="@+id/send_feedback_text"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- tools:text="@string/send_feedback"
- style="?android:textAppearanceMedium"
- android:layout_marginTop="32dp"
- android:layout_marginBottom="8dp" />
-
- <View
- android:layout_width="match_parent"
- android:layout_height="1px"
- android:layout_marginTop="12dp"
- android:layout_marginBottom="12dp"
- android:background="?attr/material_theme_border_color" />
-
- <ImageView
+ style="@style/TransparentButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_margin="12dp"
- android:padding="4dp"
+ android:layout_gravity="start"
+ android:layout_marginTop="16dp"
+ android:layout_marginBottom="12dp"
+ android:paddingLeft="0dp"
+ android:paddingRight="0dp"
+ android:text="@string/send_feedback"
+ android:textColor="?attr/colorAccent" />
+
+ </LinearLayout>
+
+ <ImageView
+ android:layout_width="24dp"
+ android:layout_height="24dp"
+ android:layout_marginTop="24dp"
+ android:layout_gravity="center_horizontal"
app:srcCompat="@drawable/ic_wmf_logo"
android:tint="?attr/secondary_text_color"
android:contentDescription="@null" />
@@ -149,12 +157,16 @@
<org.wikipedia.views.AppTextView
android:id="@+id/about_wmf"
android:layout_width="wrap_content"
- android:layout_height="0dp"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="14dp"
+ android:layout_marginBottom="16dp"
+ android:layout_gravity="center_horizontal"
+ android:textSize="12sp"
android:text="@string/about_wmf"
style="?android:textAppearanceSmall"
android:textIsSelectable="true"
- android:layout_weight="1"
- android:textColor="?attr/secondary_text_color" />
+ android:textColor="?attr/material_theme_secondary_color" />
</LinearLayout>
+
</ScrollView>
--
To view, visit https://gerrit.wikimedia.org/r/405306
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I09763c10fd8791859d532fb3bd075be8208284a9
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Dbrant <[email protected]>
Gerrit-Reviewer: Brion VIBBER <[email protected]>
Gerrit-Reviewer: Cooltey <[email protected]>
Gerrit-Reviewer: Sharvaniharan <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits