diff --git a/app/src/main/java/fr/free/nrw/commons/WelcomeActivity.java b/app/src/main/java/fr/free/nrw/commons/WelcomeActivity.java
index 16e1d7f6f..93cd38b80 100644
--- a/app/src/main/java/fr/free/nrw/commons/WelcomeActivity.java
+++ b/app/src/main/java/fr/free/nrw/commons/WelcomeActivity.java
@@ -3,19 +3,14 @@ package fr.free.nrw.commons;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
-import androidx.viewpager.widget.ViewPager;
import android.view.View;
import com.viewpagerindicator.CirclePageIndicator;
-import javax.inject.Inject;
-import javax.inject.Named;
-
+import androidx.viewpager.widget.ViewPager;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
-import fr.free.nrw.commons.kvstore.JsonKvStore;
-import fr.free.nrw.commons.kvstore.JsonKvStore;
import fr.free.nrw.commons.quiz.QuizActivity;
import fr.free.nrw.commons.theme.BaseActivity;
import fr.free.nrw.commons.utils.ConfigUtils;
@@ -29,7 +24,6 @@ public class WelcomeActivity extends BaseActivity {
private WelcomePagerAdapter adapter = new WelcomePagerAdapter();
private boolean isQuiz;
- static String moreInformation;
/**
* Initialises exiting fields and dependencies
@@ -41,8 +35,6 @@ public class WelcomeActivity extends BaseActivity {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_welcome);
- moreInformation = this.getString(R.string.welcome_help_button_text);
-
if (getIntent() != null) {
Bundle bundle = getIntent().getExtras();
if (bundle != null) {
@@ -61,7 +53,6 @@ public class WelcomeActivity extends BaseActivity {
pager.setAdapter(adapter);
indicator.setViewPager(pager);
- adapter.setCallback(this::finishTutorial);
}
/**
@@ -73,7 +64,6 @@ public class WelcomeActivity extends BaseActivity {
Intent i = new Intent(WelcomeActivity.this, QuizActivity.class);
startActivity(i);
}
- adapter.setCallback(null);
super.onDestroy();
}
diff --git a/app/src/main/java/fr/free/nrw/commons/WelcomePagerAdapter.java b/app/src/main/java/fr/free/nrw/commons/WelcomePagerAdapter.java
index 611f28544..02eddf561 100644
--- a/app/src/main/java/fr/free/nrw/commons/WelcomePagerAdapter.java
+++ b/app/src/main/java/fr/free/nrw/commons/WelcomePagerAdapter.java
@@ -1,13 +1,14 @@
package fr.free.nrw.commons;
import android.net.Uri;
+import android.text.Html;
import androidx.annotation.Nullable;
import androidx.viewpager.widget.PagerAdapter;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
-
+import androidx.viewpager.widget.PagerAdapter;
import org.wikipedia.util.StringUtil;
public class WelcomePagerAdapter extends PagerAdapter {
@@ -15,22 +16,9 @@ public class WelcomePagerAdapter extends PagerAdapter {
R.layout.welcome_wikipedia,
R.layout.welcome_do_upload,
R.layout.welcome_dont_upload,
- R.layout.welcome_image_details,
+ R.layout.welcome_image_example,
R.layout.welcome_final
};
- private static final int PAGE_FINAL = 4;
- private Callback callback;
- private ViewGroup container;
-
- /**
- * Changes callback to provided one
- *
- * @param callback New callback
- * it can be null.
- */
- public void setCallback(@Nullable Callback callback) {
- this.callback = callback;
- }
/**
* Gets total number of layouts
@@ -54,29 +42,22 @@ public class WelcomePagerAdapter extends PagerAdapter {
@Override
public Object instantiateItem(ViewGroup container, int position) {
- this.container = container;
LayoutInflater inflater = LayoutInflater.from(container.getContext());
ViewGroup layout = (ViewGroup) inflater.inflate(PAGE_LAYOUTS[position], container, false);
// If final page
- if (position == PAGE_FINAL) {
+ if (position == PAGE_LAYOUTS.length - 1) {
// Add link to more information
TextView moreInfo = layout.findViewById(R.id.welcomeInfo);
- moreInfo.setText(StringUtil.fromHtml(WelcomeActivity.moreInformation));
- moreInfo.setOnClickListener(view -> {
- try {
- Utils.handleWebUrl(
- container.getContext(),
- Uri.parse("https://commons.wikimedia.org/wiki/Help:Contents")
- );
- } catch (Exception e) {
- e.printStackTrace();
- }
- });
+ moreInfo.setText(Html.fromHtml(container.getContext().getString(R.string.welcome_help_button_text)));
+ moreInfo.setOnClickListener(view -> Utils.handleWebUrl(
+ container.getContext(),
+ Uri.parse("https://commons.wikimedia.org/wiki/Help:Contents")
+ ));
// Handle click of finishTutorialButton ("YES!" button) inside layout
layout.findViewById(R.id.finishTutorialButton)
- .setOnClickListener(view -> callback.finishTutorial());
+ .setOnClickListener(view -> ((WelcomeActivity) container.getContext()).finishTutorial());
}
container.addView(layout);
@@ -93,8 +74,4 @@ public class WelcomePagerAdapter extends PagerAdapter {
public void destroyItem(ViewGroup container, int position, Object obj) {
container.removeView((View) obj);
}
-
- public interface Callback {
- void finishTutorial();
- }
}
diff --git a/app/src/main/res/drawable-xxhdpi/welcome_dont_upload.webp b/app/src/main/res/drawable-xxhdpi/welcome_dont_upload.webp
new file mode 100644
index 000000000..f6b1c3d08
Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/welcome_dont_upload.webp differ
diff --git a/app/src/main/res/drawable/llamas.webp b/app/src/main/res/drawable/llamas.webp
deleted file mode 100644
index 6e9b013d6..000000000
Binary files a/app/src/main/res/drawable/llamas.webp and /dev/null differ
diff --git a/app/src/main/res/drawable/mount_zao.webp b/app/src/main/res/drawable/mount_zao.webp
deleted file mode 100644
index 83fd07b30..000000000
Binary files a/app/src/main/res/drawable/mount_zao.webp and /dev/null differ
diff --git a/app/src/main/res/drawable/rainbow_bridge.webp b/app/src/main/res/drawable/rainbow_bridge.webp
deleted file mode 100644
index 890ebbca5..000000000
Binary files a/app/src/main/res/drawable/rainbow_bridge.webp and /dev/null differ
diff --git a/app/src/main/res/drawable/tulip.webp b/app/src/main/res/drawable/tulip.webp
deleted file mode 100644
index 21a8a21df..000000000
Binary files a/app/src/main/res/drawable/tulip.webp and /dev/null differ
diff --git a/app/src/main/res/drawable/welcome_do_upload.webp b/app/src/main/res/drawable/welcome_do_upload.webp
new file mode 100644
index 000000000..8dd3fef9b
Binary files /dev/null and b/app/src/main/res/drawable/welcome_do_upload.webp differ
diff --git a/app/src/main/res/drawable/sydney_opera_house.webp b/app/src/main/res/drawable/welcome_image_example.webp
similarity index 100%
rename from app/src/main/res/drawable/sydney_opera_house.webp
rename to app/src/main/res/drawable/welcome_image_example.webp
diff --git a/app/src/main/res/layout-land/welcome_do_upload.xml b/app/src/main/res/layout-land/welcome_do_upload.xml
index 93c02c155..0ec9bc8b3 100644
--- a/app/src/main/res/layout-land/welcome_do_upload.xml
+++ b/app/src/main/res/layout-land/welcome_do_upload.xml
@@ -1,85 +1,32 @@
-
-
+ android:paddingLeft="@dimen/huge_gap"
+ android:paddingRight="@dimen/huge_gap">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ android:layout_marginRight="@dimen/large_gap"
+ android:layout_weight="0.5"
+ android:adjustViewBounds="true"
+ android:contentDescription="@string/welcome_do_upload_content_description"
+ android:src="@drawable/welcome_do_upload" />
-
+ android:layout_weight="0.5"
+ android:orientation="vertical">
-
+
-
+
-
-
+
-
-
-
+
diff --git a/app/src/main/res/layout-land/welcome_dont_upload.xml b/app/src/main/res/layout-land/welcome_dont_upload.xml
index ddb2e8f5a..037950491 100644
--- a/app/src/main/res/layout-land/welcome_dont_upload.xml
+++ b/app/src/main/res/layout-land/welcome_dont_upload.xml
@@ -1,62 +1,32 @@
-
-
+ android:background="?attr/tutorialBackground"
+ android:gravity="center"
+ android:paddingLeft="@dimen/huge_gap"
+ android:paddingRight="@dimen/huge_gap">
-
-
-
-
-
-
-
-
-
-
+ android:layout_marginRight="@dimen/large_gap"
+ android:layout_weight="0.5"
+ android:adjustViewBounds="true"
+ android:contentDescription="@string/welcome_dont_upload_content_description"
+ android:src="@drawable/welcome_dont_upload" />
-
+
-
+
-
+
-
-
-
+
\ No newline at end of file
diff --git a/app/src/main/res/layout-land/welcome_final.xml b/app/src/main/res/layout-land/welcome_final.xml
deleted file mode 100644
index f534a31e6..000000000
--- a/app/src/main/res/layout-land/welcome_final.xml
+++ /dev/null
@@ -1,85 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/app/src/main/res/layout-land/welcome_image_details.xml b/app/src/main/res/layout-land/welcome_image_details.xml
deleted file mode 100644
index 0c111be0a..000000000
--- a/app/src/main/res/layout-land/welcome_image_details.xml
+++ /dev/null
@@ -1,138 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/app/src/main/res/layout-land/welcome_image_example.xml b/app/src/main/res/layout-land/welcome_image_example.xml
new file mode 100644
index 000000000..82a8ae29c
--- /dev/null
+++ b/app/src/main/res/layout-land/welcome_image_example.xml
@@ -0,0 +1,80 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout-land/welcome_wikipedia.xml b/app/src/main/res/layout-land/welcome_wikipedia.xml
index 21722676d..6104bb6e3 100644
--- a/app/src/main/res/layout-land/welcome_wikipedia.xml
+++ b/app/src/main/res/layout-land/welcome_wikipedia.xml
@@ -1,47 +1,32 @@
-
-
-
-
-
+ android:background="?attr/tutorialBackground"
+ android:gravity="center"
+ android:paddingLeft="@dimen/huge_gap"
+ android:paddingRight="@dimen/huge_gap">
+ android:src="@drawable/welcome_wikipedia" />
+ android:layout_weight="0.5"
+ android:orientation="vertical">
-
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_welcome.xml b/app/src/main/res/layout/activity_welcome.xml
index a3db374d8..2e23a8901 100644
--- a/app/src/main/res/layout/activity_welcome.xml
+++ b/app/src/main/res/layout/activity_welcome.xml
@@ -11,24 +11,21 @@
android:fadingEdge="none" />
+ android:visibility="gone" />
diff --git a/app/src/main/res/layout/welcome_bullet.xml b/app/src/main/res/layout/welcome_bullet.xml
new file mode 100644
index 000000000..0baea2af6
--- /dev/null
+++ b/app/src/main/res/layout/welcome_bullet.xml
@@ -0,0 +1,14 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/welcome_do_upload.xml b/app/src/main/res/layout/welcome_do_upload.xml
index 8bf38f772..5303986f6 100644
--- a/app/src/main/res/layout/welcome_do_upload.xml
+++ b/app/src/main/res/layout/welcome_do_upload.xml
@@ -1,168 +1,72 @@
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+ android:layout_height="wrap_content"
+ android:adjustViewBounds="true"
+ android:contentDescription="@string/welcome_do_upload_content_description"
+ android:src="@drawable/welcome_do_upload" />
+ android:textSize="@dimen/normal_text"
+ android:textStyle="bold" />
-
+
+ android:textColor="@android:color/white" />
-
+
-
+ android:textColor="@android:color/white" />
-
-
-
-
-
+
+ android:textColor="@android:color/white" />
+
-
-
-
-
+
diff --git a/app/src/main/res/layout/welcome_dont_upload.xml b/app/src/main/res/layout/welcome_dont_upload.xml
index 7fca27955..cbf1fd11a 100644
--- a/app/src/main/res/layout/welcome_dont_upload.xml
+++ b/app/src/main/res/layout/welcome_dont_upload.xml
@@ -1,141 +1,73 @@
-
-
+
+
-
-
-
-
-
-
-
-
+ android:layout_height="wrap_content"
+ android:adjustViewBounds="true"
+ android:contentDescription="@string/welcome_dont_upload_content_description"
+ android:src="@drawable/welcome_dont_upload" />
+ android:textSize="@dimen/normal_text"
+ android:textStyle="bold" />
-
+
+ android:textColor="@android:color/white" />
-
+
+ android:textColor="@android:color/white" />
-
+
+ android:textColor="@android:color/white" />
-
-
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/welcome_final.xml b/app/src/main/res/layout/welcome_final.xml
index 08b275291..0152f2580 100644
--- a/app/src/main/res/layout/welcome_final.xml
+++ b/app/src/main/res/layout/welcome_final.xml
@@ -66,19 +66,14 @@
+ android:padding="@dimen/standard_gap"
+ android:layout_marginBottom="@dimen/standard_gap"
+ android:text="@string/welcome_help_button_text" />
\ No newline at end of file
diff --git a/app/src/main/res/layout/welcome_image_details.xml b/app/src/main/res/layout/welcome_image_details.xml
deleted file mode 100644
index 2ad758a20..000000000
--- a/app/src/main/res/layout/welcome_image_details.xml
+++ /dev/null
@@ -1,139 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/app/src/main/res/layout/welcome_image_example.xml b/app/src/main/res/layout/welcome_image_example.xml
new file mode 100644
index 000000000..04451dd8c
--- /dev/null
+++ b/app/src/main/res/layout/welcome_image_example.xml
@@ -0,0 +1,72 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/welcome_wikipedia.xml b/app/src/main/res/layout/welcome_wikipedia.xml
index 502c1fea9..f8999a7f3 100644
--- a/app/src/main/res/layout/welcome_wikipedia.xml
+++ b/app/src/main/res/layout/welcome_wikipedia.xml
@@ -1,53 +1,36 @@
-
-
+ android:gravity="center"
+ android:orientation="vertical"
+ android:paddingLeft="@dimen/huge_gap"
+ android:paddingRight="@dimen/huge_gap">
+ android:src="@drawable/welcome_wikipedia" />
+ android:textSize="@dimen/normal_text"
+ android:textStyle="bold" />
-
-
-
+ android:textColor="@android:color/white" />
+
+
\ No newline at end of file
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 93bbc69a2..f7981a3ee 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -533,6 +533,8 @@ Upload your first media by tapping on the add button.
Featured pictures are images from highly skilled photographers and illustrators that the Wikimedia Commons community has chosen as some of the highest quality on the site.
Images Uploaded via Nearby places are the images which are uploaded by discovering places on the map.
This feature allows editors to send a Thank you notification to users who make useful edits – by using a small thank link on the history page or diff page.
+ Examples of good images to upload to Commons
+ Examples of images not to upload
SKIP THIS IMAGE
Download Failed!!. We cannot download the file without external storage permission.