jenkins-bot has submitted this change and it was merged.

Change subject: Add description editing success activity
......................................................................


Add description editing success activity

Bug: T148202
Change-Id: I5039df3e428cd7564b126ebb50cc4a095a2cf6ec
---
M app/src/main/AndroidManifest.xml
M app/src/main/java/org/wikipedia/Constants.java
A 
app/src/main/java/org/wikipedia/activity/SingleFragmentActivityTransparent.java
M app/src/main/java/org/wikipedia/descriptions/DescriptionEditFragment.java
A 
app/src/main/java/org/wikipedia/descriptions/DescriptionEditSuccessActivity.java
A 
app/src/main/java/org/wikipedia/descriptions/DescriptionEditSuccessFragment.java
A app/src/main/java/org/wikipedia/descriptions/DescriptionEditSuccessView.java
A app/src/main/java/org/wikipedia/views/AppTextViewWithImages.java
A app/src/main/res/drawable/button_selector_blue.xml
A app/src/main/res/drawable/button_shape_blue.xml
A app/src/main/res/drawable/button_shape_blue_highlight.xml
A app/src/main/res/drawable/edit.png
A app/src/main/res/drawable/ic_illustration_description_success.xml
A app/src/main/res/drawable/shape_border_1dp_gray.xml
A app/src/main/res/layout/fragment_description_edit_success.xml
A app/src/main/res/layout/view_description_edit_success.xml
M app/src/main/res/values-qq/strings.xml
M app/src/main/res/values/colors.xml
M app/src/main/res/values/strings.xml
M app/src/main/res/values/styles.xml
20 files changed, 521 insertions(+), 2 deletions(-)

Approvals:
  jenkins-bot: Verified
  Niedzielski: Looks good to me, approved



diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index f54183c..b94add0 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -161,6 +161,10 @@
             android:windowSoftInputMode="stateVisible|adjustResize"
             android:exported="false"/>
 
+        <activity android:name=".descriptions.DescriptionEditSuccessActivity"
+            android:theme="@style/AppTheme.TranslucentDark"
+            android:windowSoftInputMode="stateAlwaysHidden" />
+
         <provider
                 android:authorities="${applicationId}"
                 android:name=".database.AppContentProvider"
diff --git a/app/src/main/java/org/wikipedia/Constants.java 
b/app/src/main/java/org/wikipedia/Constants.java
index 7763570..2d95471 100644
--- a/app/src/main/java/org/wikipedia/Constants.java
+++ b/app/src/main/java/org/wikipedia/Constants.java
@@ -16,6 +16,7 @@
     public static final int ACTIVITY_REQUEST_EDIT_SECTION = 51;
     public static final int ACTIVITY_REQUEST_GALLERY = 52;
     public static final int ACTIVITY_REQUEST_LOGIN = 53;
+    public static final int ACTIVITY_REQUEST_DESCRIPTION_EDIT_SUCCESS = 54;
 
     public static final String INTENT_RETURN_TO_MAIN = "returnToMain";
     public static final String INTENT_SEARCH_FROM_WIDGET = "searchFromWidget";
diff --git 
a/app/src/main/java/org/wikipedia/activity/SingleFragmentActivityTransparent.java
 
b/app/src/main/java/org/wikipedia/activity/SingleFragmentActivityTransparent.java
new file mode 100644
index 0000000..4679f84
--- /dev/null
+++ 
b/app/src/main/java/org/wikipedia/activity/SingleFragmentActivityTransparent.java
@@ -0,0 +1,64 @@
+package org.wikipedia.activity;
+
+import android.os.Bundle;
+import android.support.annotation.IdRes;
+import android.support.annotation.LayoutRes;
+import android.support.v4.app.Fragment;
+import android.support.v7.app.AppCompatActivity;
+import android.view.MenuItem;
+
+import org.wikipedia.R;
+
+/**
+ * Boilerplate for a {@link android.support.v4.app.FragmentActivity} 
containing a single stack of
+ * Fragments, with a transparent background.
+ *
+ * Set a theme on the activity in AndroidManifest.xml to specify a background 
tint.
+ */
+public abstract class SingleFragmentActivityTransparent<T extends Fragment> 
extends AppCompatActivity {
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(getLayout());
+        findViewById(getContainerId()).setBackground(null);
+
+        if (!isFragmentCreated()) {
+            addFragment(createFragment());
+        }
+    }
+
+    @Override
+    public boolean onOptionsItemSelected(MenuItem item) {
+        return ActivityUtil.defaultOnOptionsItemSelected(this, item)
+                || super.onOptionsItemSelected(item);
+    }
+
+    protected void addFragment(T fragment) {
+        getSupportFragmentManager().beginTransaction().add(getContainerId(), 
fragment).commit();
+    }
+
+    protected abstract T createFragment();
+
+    /** @return The Fragment added to the stack. */
+    protected T getFragment() {
+        //noinspection unchecked
+        return (T) 
getSupportFragmentManager().findFragmentById(getContainerId());
+    }
+
+    /** @return The resource layout to inflate which must contain a {@link 
android.view.ViewGroup}
+     * whose ID is {@link #getContainerId()}. */
+    @LayoutRes
+    protected int getLayout() {
+        return R.layout.activity_single_fragment;
+    }
+
+    /** @return The resource identifier for the Fragment container. */
+    @IdRes
+    protected int getContainerId() {
+        return R.id.fragment_container;
+    }
+
+    protected boolean isFragmentCreated() {
+        return getFragment() != null;
+    }
+}
\ No newline at end of file
diff --git 
a/app/src/main/java/org/wikipedia/descriptions/DescriptionEditFragment.java 
b/app/src/main/java/org/wikipedia/descriptions/DescriptionEditFragment.java
index 9b5f5f7..74e9e9b 100644
--- a/app/src/main/java/org/wikipedia/descriptions/DescriptionEditFragment.java
+++ b/app/src/main/java/org/wikipedia/descriptions/DescriptionEditFragment.java
@@ -1,5 +1,6 @@
 package org.wikipedia.descriptions;
 
+import android.content.Intent;
 import android.os.Bundle;
 import android.support.annotation.NonNull;
 import android.support.annotation.Nullable;
@@ -11,6 +12,7 @@
 import android.view.View;
 import android.view.ViewGroup;
 
+import org.wikipedia.Constants;
 import org.wikipedia.R;
 import org.wikipedia.json.GsonMarshaller;
 import org.wikipedia.json.GsonUnmarshaller;
@@ -94,6 +96,14 @@
         }
     }
 
+    @Override
+    public void onActivityResult(int requestCode, int resultCode, final Intent 
data) {
+        if (requestCode == Constants.ACTIVITY_REQUEST_DESCRIPTION_EDIT_SUCCESS
+                && getActivity() != null) {
+            getActivity().finish();
+        }
+    }
+
     private class EditViewCallback implements DescriptionEditView.Callback {
         @Override
         public void onSaveClick() {
@@ -108,8 +118,9 @@
                         @Override public void success(@NonNull 
Call<DescriptionEdit> call) {
                             if (getActivity() != null) {
                                 DeviceUtil.hideSoftKeyboard(getActivity());
-                                // TODO: go to success fragment
-                                getActivity().finish();
+                                editView.setSaveState(false);
+                                
startActivityForResult(DescriptionEditSuccessActivity.newIntent(getContext()),
+                                        
Constants.ACTIVITY_REQUEST_DESCRIPTION_EDIT_SUCCESS);
                             }
                         }
 
diff --git 
a/app/src/main/java/org/wikipedia/descriptions/DescriptionEditSuccessActivity.java
 
b/app/src/main/java/org/wikipedia/descriptions/DescriptionEditSuccessActivity.java
new file mode 100644
index 0000000..68438b3
--- /dev/null
+++ 
b/app/src/main/java/org/wikipedia/descriptions/DescriptionEditSuccessActivity.java
@@ -0,0 +1,26 @@
+package org.wikipedia.descriptions;
+
+import android.content.Context;
+import android.content.Intent;
+import android.support.annotation.NonNull;
+
+import org.wikipedia.activity.SingleFragmentActivityTransparent;
+
+public class DescriptionEditSuccessActivity
+        extends 
SingleFragmentActivityTransparent<DescriptionEditSuccessFragment>
+        implements DescriptionEditSuccessFragment.Callback {
+
+    static Intent newIntent(@NonNull Context context) {
+        return new Intent(context, DescriptionEditSuccessActivity.class);
+    }
+
+    @Override protected DescriptionEditSuccessFragment createFragment() {
+        return DescriptionEditSuccessFragment.newInstance();
+    }
+
+    @Override
+    public void onDismissClick() {
+        setResult(RESULT_OK);
+        finish();
+    }
+}
diff --git 
a/app/src/main/java/org/wikipedia/descriptions/DescriptionEditSuccessFragment.java
 
b/app/src/main/java/org/wikipedia/descriptions/DescriptionEditSuccessFragment.java
new file mode 100644
index 0000000..ac45251
--- /dev/null
+++ 
b/app/src/main/java/org/wikipedia/descriptions/DescriptionEditSuccessFragment.java
@@ -0,0 +1,53 @@
+package org.wikipedia.descriptions;
+
+import android.os.Bundle;
+import android.support.annotation.NonNull;
+import android.support.v4.app.Fragment;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+import org.wikipedia.R;
+import org.wikipedia.activity.FragmentUtil;
+
+import butterknife.BindView;
+import butterknife.ButterKnife;
+import butterknife.Unbinder;
+
+public class DescriptionEditSuccessFragment extends Fragment implements 
DescriptionEditSuccessView.Callback {
+    @BindView(R.id.fragment_description_edit_success_view) 
DescriptionEditSuccessView successView;
+    private Unbinder unbinder;
+
+    public interface Callback {
+        void onDismissClick();
+    }
+
+    @NonNull public static DescriptionEditSuccessFragment newInstance() {
+        return new DescriptionEditSuccessFragment();
+    }
+
+    @Override public View onCreateView(LayoutInflater inflater, ViewGroup 
container, Bundle savedInstanceState) {
+        super.onCreateView(inflater, container, savedInstanceState);
+        View view = 
inflater.inflate(R.layout.fragment_description_edit_success, container, false);
+        unbinder = ButterKnife.bind(this, view);
+        successView.setCallback(this);
+        return view;
+    }
+
+    @Override public void onDismissClick() {
+        if (callback() != null) {
+            callback().onDismissClick();
+        }
+    }
+
+    @Override public void onDestroyView() {
+        successView.setCallback(null);
+        unbinder.unbind();
+        unbinder = null;
+        super.onDestroyView();
+    }
+
+    private Callback callback() {
+        return FragmentUtil.getCallback(this, Callback.class);
+    }
+}
diff --git 
a/app/src/main/java/org/wikipedia/descriptions/DescriptionEditSuccessView.java 
b/app/src/main/java/org/wikipedia/descriptions/DescriptionEditSuccessView.java
new file mode 100644
index 0000000..3cb8de2
--- /dev/null
+++ 
b/app/src/main/java/org/wikipedia/descriptions/DescriptionEditSuccessView.java
@@ -0,0 +1,67 @@
+package org.wikipedia.descriptions;
+
+import android.annotation.TargetApi;
+import android.content.Context;
+import android.os.Build;
+import android.support.annotation.Nullable;
+import android.util.AttributeSet;
+import android.widget.FrameLayout;
+
+import org.wikipedia.R;
+import org.wikipedia.views.AppTextViewWithImages;
+
+import butterknife.BindView;
+import butterknife.ButterKnife;
+import butterknife.OnClick;
+
+public class DescriptionEditSuccessView extends FrameLayout {
+    @BindView(R.id.view_description_edit_success_hint_text) 
AppTextViewWithImages hintTextView;
+
+    @Nullable private Callback callback;
+
+    public interface Callback {
+        void onDismissClick();
+    }
+
+    public DescriptionEditSuccessView(Context context) {
+        super(context);
+        init();
+    }
+
+    public DescriptionEditSuccessView(Context context, AttributeSet attrs) {
+        super(context, attrs);
+        init();
+    }
+
+    public DescriptionEditSuccessView(Context context, AttributeSet attrs, int 
defStyleAttr) {
+        super(context, attrs, defStyleAttr);
+        init();
+    }
+
+    @TargetApi(Build.VERSION_CODES.LOLLIPOP)
+    public DescriptionEditSuccessView(Context context, AttributeSet attrs, int 
defStyleAttr, int defStyleRes) {
+        super(context, attrs, defStyleAttr, defStyleRes);
+        init();
+    }
+
+    public void setCallback(@Nullable Callback callback) {
+        this.callback = callback;
+    }
+
+    private void init() {
+        inflate(getContext(), R.layout.view_description_edit_success, this);
+        ButterKnife.bind(this);
+        setHintText();
+    }
+
+    private void setHintText() {
+        String editHint = 
getResources().getString(R.string.description_edit_success_article_edit_hint);
+        hintTextView.setTextWithDrawables(editHint, R.drawable.edit);
+    }
+
+    @OnClick(R.id.view_description_edit_success_done_button) void 
onDismissClick() {
+        if (callback != null) {
+            callback.onDismissClick();
+        }
+    }
+}
diff --git a/app/src/main/java/org/wikipedia/views/AppTextViewWithImages.java 
b/app/src/main/java/org/wikipedia/views/AppTextViewWithImages.java
new file mode 100644
index 0000000..10e7aaa
--- /dev/null
+++ b/app/src/main/java/org/wikipedia/views/AppTextViewWithImages.java
@@ -0,0 +1,115 @@
+package org.wikipedia.views;
+
+import android.annotation.TargetApi;
+import android.content.Context;
+import android.content.res.Resources;
+import android.graphics.drawable.Drawable;
+import android.os.Build;
+import android.support.annotation.ColorInt;
+import android.support.annotation.DrawableRes;
+import android.support.annotation.NonNull;
+import android.support.annotation.Nullable;
+import android.support.v4.content.ContextCompat;
+import android.text.Spannable;
+import android.text.Spanned;
+import android.text.TextUtils;
+import android.text.style.ImageSpan;
+import android.util.AttributeSet;
+
+import org.wikipedia.drawable.DrawableUtil;
+import org.wikipedia.util.log.L;
+
+import java.util.ArrayList;
+import java.util.List;
+
+// Credit: https://stackoverflow.com/a/38977396
+public class AppTextViewWithImages extends AppTextView {
+
+    public AppTextViewWithImages(Context context) {
+        super(context);
+    }
+
+    public AppTextViewWithImages(Context context, AttributeSet attrs) {
+        super(context, attrs);
+    }
+
+    public AppTextViewWithImages(Context context, AttributeSet attrs, int 
defStyle) {
+        super(context, attrs, defStyle);
+    }
+
+    @TargetApi(Build.VERSION_CODES.LOLLIPOP)
+    public AppTextViewWithImages(Context context, AttributeSet attrs, int 
defStyleAttr, int defStyleRes) {
+        super(context, attrs, defStyleAttr, defStyleRes);
+    }
+
+    /**
+     * A method to set a Spanned character sequence containing drawable 
resources.
+     *
+     * @param text A CharSequence formatted for use in 
android.text.TextUtils.expandTemplate(),
+     *             e.g.: "^1 is my favorite mobile operating system."  
Placeholders are expected in
+     *             the format "^1", "^2", and so on.
+     * @param drawableIds Numeric drawable IDs for the drawables which are to 
replace the
+     *                    placeholders, in the order in which they should 
appear.
+     */
+    public void setTextWithDrawables(@NonNull CharSequence text, @DrawableRes 
int... drawableIds) {
+        setText(text, getImageSpans(drawableIds));
+    }
+
+    private List<Spanned> getImageSpans(@DrawableRes int... drawableIds) {
+        List<Spanned> result = new ArrayList<>();
+        for (int id : drawableIds) {
+            Spanned span = makeImageSpan(getContext(), id, getTextSize(), 
getCurrentTextColor());
+            result.add(span);
+        }
+        return result;
+    }
+
+    private void setText(@NonNull CharSequence text, @NonNull List<Spanned> 
spans) {
+        if (!spans.isEmpty()) {
+            CharSequence spanned = TextUtils.expandTemplate(text, 
spans.toArray(new CharSequence[spans.size()]));
+            super.setText(spanned, BufferType.SPANNABLE);
+        } else {
+            super.setText(text);
+        }
+    }
+
+    /**
+     * Create an ImageSpan containing a drawable to be inserted in a TextView. 
This also sets the
+     * image size and color.
+     *
+     * @param context       The Android Context.
+     * @param drawableId    A drawable resource Id.
+     * @param size          The desired size (i.e. width and height) of the 
image icon in pixels.
+     * @param color         The color to apply to the image.
+     * @return  A single-length ImageSpan that can be swapped into a 
CharSequence to replace a
+     *          placeholder.
+     */
+    @NonNull
+    private static Spannable makeImageSpan(@NonNull Context context, 
@DrawableRes int drawableId,
+                                           float size, @ColorInt int color) {
+        Spannable result = Spannable.Factory.getInstance().newSpannable(" ");
+        Drawable drawable = getFormattedDrawable(context, drawableId, size, 
color);
+        if (drawable != null) {
+            result.setSpan(new ImageSpan(drawable, ImageSpan.ALIGN_BASELINE), 
0, 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
+        }
+        return result;
+    }
+
+    @Nullable
+    private static Drawable getFormattedDrawable(@NonNull Context context, 
@DrawableRes int drawableId,
+                                                 float size, @ColorInt int 
color) {
+        try {
+            Drawable drawable = ContextCompat.getDrawable(context, drawableId);
+            DrawableUtil.setTint(drawable, color);
+
+            int roundedHeight = Math.round(size);
+            int roundedWidth = Math.round(size * drawable.getIntrinsicWidth() 
/ drawable.getIntrinsicHeight());
+            drawable.setBounds(0, 0, roundedWidth, roundedHeight);
+
+            return drawable;
+        } catch (Resources.NotFoundException caught) {
+            L.e(caught);
+            return null;
+        }
+    }
+}
diff --git a/app/src/main/res/drawable/button_selector_blue.xml 
b/app/src/main/res/drawable/button_selector_blue.xml
new file mode 100644
index 0000000..85fd2c5
--- /dev/null
+++ b/app/src/main/res/drawable/button_selector_blue.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android";>
+    <item android:state_pressed="true" 
android:drawable="@drawable/button_shape_blue_highlight" />
+    <item android:drawable="@drawable/button_shape_blue" />
+</selector>
\ No newline at end of file
diff --git a/app/src/main/res/drawable/button_shape_blue.xml 
b/app/src/main/res/drawable/button_shape_blue.xml
new file mode 100644
index 0000000..c7e0980
--- /dev/null
+++ b/app/src/main/res/drawable/button_shape_blue.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android";
+    android:shape="rectangle" android:padding="10dp">
+    <solid android:color="@color/foundation_blue"/>
+    <corners android:radius="@dimen/corner_radius_smaller"/>
+</shape>
\ No newline at end of file
diff --git a/app/src/main/res/drawable/button_shape_blue_highlight.xml 
b/app/src/main/res/drawable/button_shape_blue_highlight.xml
new file mode 100644
index 0000000..5a1af2e
--- /dev/null
+++ b/app/src/main/res/drawable/button_shape_blue_highlight.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android";
+    android:shape="rectangle" android:padding="10dp">
+    <solid android:color="@color/dark_blue"/>
+    <corners android:radius="@dimen/corner_radius_smaller"/>
+</shape>
\ No newline at end of file
diff --git a/app/src/main/res/drawable/edit.png 
b/app/src/main/res/drawable/edit.png
new file mode 100644
index 0000000..311a211
--- /dev/null
+++ b/app/src/main/res/drawable/edit.png
Binary files differ
diff --git a/app/src/main/res/drawable/ic_illustration_description_success.xml 
b/app/src/main/res/drawable/ic_illustration_description_success.xml
new file mode 100644
index 0000000..3a9aa0f
--- /dev/null
+++ b/app/src/main/res/drawable/ic_illustration_description_success.xml
@@ -0,0 +1,15 @@
+<vector android:autoMirrored="true" android:height="80dp"
+    android:viewportHeight="80.0" android:viewportWidth="80.0"
+    android:width="80dp" 
xmlns:android="http://schemas.android.com/apk/res/android";>
+    <path android:fillColor="#eaf3ff" android:pathData="M40,40m-38,0a38,38 0,1 
1,76 0a38,38 0,1 1,-76 0"/>
+    <path android:fillColor="#fff" android:pathData="M40,0A40,40 0,1 0,80 
40,40 40,0 0,0 40,0ZM40,78A38,38 0,1 1,78 40,38 38,0 0,1 40,78Z"/>
+    <path android:fillColor="#c8ccd1" android:pathData="M40,2A38,38 0,0 0,8 
19.52v12H77A38,38 0,0 0,40 2Z"/>
+    <path android:fillColor="#c8ccd1" android:pathData="M8,35.45h32v8h-32z"/>
+    <path android:fillAlpha="0.31" android:fillColor="#FF000000"
+        android:pathData="M52.62,18.59l-3.87,-3.87 -1.94,1.94 -3.87,-3.87 
-1.94,1 -3.87,4.84ZM54.55,6V20.53H35.2V6Z" android:strokeAlpha="0.31"/>
+    <path android:fillColor="#fc3" 
android:pathData="M8,47.73l65.55,0l0,10.04l-65.55,0l0,-10.04z"/>
+    <path android:fillAlpha="0.08" android:fillColor="#FF000000"
+        android:pathData="M40,3A37,37 0,1 1,3 40,37 37,0 0,1 40,3m0,-1A38,38 
0,1 0,78 40,38 38,0 0,0 40,2Z" android:strokeAlpha="0.08"/>
+    <path android:fillAlpha="0.04" android:fillColor="#FF000000"
+        android:pathData="M40,4A36,36 0,1 1,4 40,36.07 36.07,0 0,1 
40,4m0,-1A37,37 0,1 0,77 40,37 37,0 0,0 40,3Z" android:strokeAlpha="0.04"/>
+</vector>
diff --git a/app/src/main/res/drawable/shape_border_1dp_gray.xml 
b/app/src/main/res/drawable/shape_border_1dp_gray.xml
new file mode 100644
index 0000000..101453c
--- /dev/null
+++ b/app/src/main/res/drawable/shape_border_1dp_gray.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android"; 
android:shape="rectangle" >
+    <stroke android:width="1dp" android:color="@color/light_gray"/>
+</shape>
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_description_edit_success.xml 
b/app/src/main/res/layout/fragment_description_edit_success.xml
new file mode 100644
index 0000000..6dc0451
--- /dev/null
+++ b/app/src/main/res/layout/fragment_description_edit_success.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<org.wikipedia.descriptions.DescriptionEditSuccessView
+    xmlns:android="http://schemas.android.com/apk/res/android";
+    android:id="@+id/fragment_description_edit_success_view"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent" />
\ No newline at end of file
diff --git a/app/src/main/res/layout/view_description_edit_success.xml 
b/app/src/main/res/layout/view_description_edit_success.xml
new file mode 100644
index 0000000..7e6257a
--- /dev/null
+++ b/app/src/main/res/layout/view_description_edit_success.xml
@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="utf-8"?>
+<ScrollView
+    xmlns:android="http://schemas.android.com/apk/res/android";
+    xmlns:app="http://schemas.android.com/apk/res-auto";
+    android:layout_height="match_parent"
+    android:layout_width="match_parent"
+    android:fillViewport="true">
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="vertical"
+        android:gravity="bottom|center_horizontal">
+
+        <LinearLayout
+            android:id="@+id/view_success_edit_center_text_container"
+            android:layout_width="wrap_content"
+            android:layout_height="match_parent"
+            android:layout_weight="1"
+            android:orientation="vertical"
+            android:gravity="center">
+
+            <View
+                android:layout_width="match_parent"
+                android:layout_height="48dp"/>
+
+            <ImageView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_margin="30dp"
+                app:srcCompat="@drawable/ic_illustration_description_success"
+                android:contentDescription="@null"/>
+
+            <org.wikipedia.views.AppTextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="@string/description_edit_success_saved"
+                android:textColor="@android:color/white"
+                android:textSize="30sp"
+                android:fontFamily="sans-serif-light"/>
+
+            <org.wikipedia.views.AppTextView
+                android:layout_height="wrap_content"
+                android:layout_width="wrap_content"
+                android:layout_margin="8dp"
+                android:text="@string/description_edit_success_encouragement"
+                android:textColor="@color/light_gray"
+                android:textAlignment="center"
+                android:textSize="15sp"/>
+
+            <Button
+                android:id="@+id/view_description_edit_success_done_button"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_gravity="center"
+                android:layout_margin="30dp"
+                style="@style/ButtonBlue"
+                android:text="@string/description_edit_success_done"
+                android:textColor="@android:color/white"
+                android:textSize="14sp"
+                android:textAllCaps="true"
+                android:fontFamily="sans-serif-medium" />
+        </LinearLayout>
+
+        <LinearLayout
+            android:id="@+id/view_success_edit_did_you_know_container"
+            android:layout_height="wrap_content"
+            android:layout_width="wrap_content"
+            android:layout_weight="0"
+            android:layout_marginLeft="22dp"
+            android:layout_marginRight="22dp"
+            android:layout_marginBottom="10dp"
+            android:paddingTop="4dp"
+            android:paddingBottom="4dp"
+            android:paddingLeft="24dp"
+            android:paddingRight="24dp"
+            android:background="@drawable/shape_border_1dp_gray"
+            android:gravity="center_horizontal"
+            android:orientation="vertical" >
+
+            <org.wikipedia.views.AppTextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginTop="18dp"
+                android:layout_marginBottom="8dp"
+                android:layout_gravity="center"
+                android:text="@string/description_edit_success_did_you_know"
+                android:textStyle="bold"
+                android:textColor="@color/light_gray"
+                android:textSize="15sp"/>
+
+            <org.wikipedia.views.AppTextViewWithImages
+                android:id="@+id/view_description_edit_success_hint_text"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:maxWidth="336dp"
+                android:layout_marginBottom="18dp"
+                android:layout_gravity="center"
+                android:textColor="@color/light_gray"
+                android:textSize="15sp"
+                android:textAlignment="center"
+                android:lineSpacingExtra="5dp"/>
+        </LinearLayout>
+    </LinearLayout>
+</ScrollView>
\ No newline at end of file
diff --git a/app/src/main/res/values-qq/strings.xml 
b/app/src/main/res/values-qq/strings.xml
index 6e7789a..a021ca6 100644
--- a/app/src/main/res/values-qq/strings.xml
+++ b/app/src/main/res/values-qq/strings.xml
@@ -444,4 +444,10 @@
 {{Identical|Save}}</string>
   <string name="description_edit_char_count">Label that displays the character 
count of the description being entered. The %1$d symbol is replaced with the 
number of characters in the current description, and the %2$d symbol is 
replaced with the maximum allowed characters.</string>
   <string name="description_edit_add_description">Label that prompts the user 
to add a description to an article that does not yet have one.</string>
+
+  <string name="description_edit_success_saved">Message that the description 
the user just added was saved.</string>
+  <string name="description_edit_success_encouragement">Message that the user 
made Wikipedia better for everyone</string>
+  <string name="description_edit_success_done">Button text to dismiss the 
description editing success screen</string>
+  <string name="description_edit_success_did_you_know">Heading for a tip about 
editing articles in the app</string>
+  <string name="description_edit_success_article_edit_hint">A message 
informing the user about how to edit articles in the app.  The \"^1\" symbol is 
replaced with an edit pencil icon.</string>
 </resources>
diff --git a/app/src/main/res/values/colors.xml 
b/app/src/main/res/values/colors.xml
index 192cf10..89b01c5 100644
--- a/app/src/main/res/values/colors.xml
+++ b/app/src/main/res/values/colors.xml
@@ -110,4 +110,6 @@
 
     <color name="feed_window_background_light">#eaecf0</color>
     <color name="feed_window_background_dark">#222</color>
+
+    <color name="translucent_background_dark">#E2000000</color>
 </resources>
diff --git a/app/src/main/res/values/strings.xml 
b/app/src/main/res/values/strings.xml
index 13265a1..d165c46 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -335,4 +335,12 @@
     <string name="description_edit_char_count">%1$d / %2$d</string>
     <string name="description_edit_add_description">Add description</string>
     <!-- /Description editing -->
+
+    <!-- Description editing success -->
+    <string name="description_edit_success_saved">Description saved!</string>
+    <string name="description_edit_success_encouragement">You just made 
Wikipedia better for everyone</string>
+    <string name="description_edit_success_done">Done</string>
+    <string name="description_edit_success_did_you_know">Did you know?</string>
+    <string name="description_edit_success_article_edit_hint">You can also 
edit articles within this app. Try fixing typos and small sentences by clicking 
on the ^1 icon next time</string>
+    <!-- /Description editing success -->
 </resources>
diff --git a/app/src/main/res/values/styles.xml 
b/app/src/main/res/values/styles.xml
index 12d297c..660d6a8 100644
--- a/app/src/main/res/values/styles.xml
+++ b/app/src/main/res/values/styles.xml
@@ -127,6 +127,10 @@
         <item name="android:background">@drawable/button_selector_gray</item>
     </style>
 
+    <style name="ButtonBlue" parent="ButtonProgressive">
+        <item name="android:background">@drawable/button_selector_blue</item>
+    </style>
+
     <style name="TextHeadingGray" 
parent="@android:style/TextAppearance.Medium">
         <item name="android:textAllCaps">false</item>
         <item name="android:textSize">16sp</item>
@@ -238,4 +242,14 @@
         <item name="failureImageScaleType">center</item>
     </style>
 
+    <style name="AppTheme.TranslucentDark">
+        <item 
name="android:windowBackground">@color/translucent_background_dark</item>
+        <item name="android:colorBackgroundCacheHint">@null</item>
+        <item name="android:windowIsTranslucent">true</item>
+        <item name="windowNoTitle">true</item>
+        <item name="windowActionBar">false</item>
+        <item name="android:windowFullscreen">true</item>
+        <item name="android:windowContentOverlay">@null</item>
+    </style>
+
 </resources>
\ No newline at end of file

-- 
To view, visit https://gerrit.wikimedia.org/r/321802
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I5039df3e428cd7564b126ebb50cc4a095a2cf6ec
Gerrit-PatchSet: 12
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Mholloway <mhollo...@wikimedia.org>
Gerrit-Reviewer: BearND <bsitzm...@wikimedia.org>
Gerrit-Reviewer: Brion VIBBER <br...@wikimedia.org>
Gerrit-Reviewer: Dbrant <dbr...@wikimedia.org>
Gerrit-Reviewer: Mholloway <mhollo...@wikimedia.org>
Gerrit-Reviewer: Niedzielski <sniedziel...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to