features = new LinkedList<>();
for (FeatureItem item : get()) {
- final int itemVersionCode = isBeta ? item.getBetaVersionNumber() : item.getVersionNumber();
+ final int itemVersionCode = isBeta ? item.getBetaVersionNumber() : item.getVersionCode();
if (isFirstRun && item.shouldShowOnFirstRun()) {
features.add(item);
} else if (!isFirstRun && !item.shouldShowOnFirstRun() &&
@@ -81,21 +93,29 @@ static public class FeatureItem implements Parcelable {
private int image;
private int titleText;
private int contentText;
- private int versionNumber;
+ private int versionCode;
private int betaVersion;
private boolean showOnInitialRun;
+ private boolean contentCentered;
- public FeatureItem(int image, int titleText, int contentText, String version, String betaVersion) {
- this(image, titleText, contentText, version, betaVersion, false);
+ public FeatureItem(int image, int titleText, int contentText, int version, int betaVersion) {
+ this(image, titleText, contentText, version, betaVersion, false, true);
}
- public FeatureItem(int image, int titleText, int contentText, String version, String betaVersion, boolean showOnInitialRun) {
+ public FeatureItem(int image, int titleText, int contentText, int version, int betaVersion,
+ boolean showOnInitialRun) {
+ this(image, titleText, contentText, version, betaVersion, showOnInitialRun, true);
+ }
+
+ public FeatureItem(int image, int titleText, int contentText, int versionCode, int betaVersion,
+ boolean showOnInitialRun, boolean contentCentered) {
this.image = image;
this.titleText = titleText;
this.contentText = contentText;
- this.versionNumber = versionCodeFromString(version);
- this.betaVersion = Integer.parseInt(betaVersion);
+ this.versionCode = versionCode;
+ this.betaVersion = betaVersion;
this.showOnInitialRun = showOnInitialRun;
+ this.contentCentered = contentCentered;
}
public boolean shouldShowImage() { return image != DO_NOT_SHOW; }
@@ -107,10 +127,16 @@ public FeatureItem(int image, int titleText, int contentText, String version, St
public boolean shouldShowContentText() { return contentText != DO_NOT_SHOW; }
public int getContentText() { return contentText; }
- public int getVersionNumber() { return versionNumber; }
+ public int getVersionCode() {
+ return versionCode;
+ }
public int getBetaVersionNumber() { return betaVersion; }
public boolean shouldShowOnFirstRun() { return showOnInitialRun; }
+ public boolean shouldContentCentered() {
+ return contentCentered;
+ }
+
@Override
public int describeContents() {
return 0;
@@ -121,18 +147,20 @@ public void writeToParcel(Parcel dest, int flags) {
dest.writeInt(image);
dest.writeInt(titleText);
dest.writeInt(contentText);
- dest.writeInt(versionNumber);
+ dest.writeInt(versionCode);
dest.writeInt(betaVersion);
dest.writeByte((byte) (showOnInitialRun ? 1 : 0));
+ dest.writeByte((byte) (contentCentered ? 1 : 0));
}
private FeatureItem(Parcel p) {
image = p.readInt();
titleText = p.readInt();
contentText = p.readInt();
- versionNumber = p.readInt();
+ versionCode = p.readInt();
betaVersion = p.readInt();
showOnInitialRun = p.readByte() == 1;
+ contentCentered = p.readByte() == 1;
}
public static final Parcelable.Creator CREATOR =
new Parcelable.Creator() {
@@ -156,7 +184,7 @@ private static int versionCodeFromString(String version) {
return 0;
}
return Integer.parseInt(v[0])*(int)(10e6) +
- Integer.parseInt(v[1])*(int)(10e4) +
+ Integer.parseInt(v[1])*(int)(10e3) +
Integer.parseInt(v[2])*100;
}
}
diff --git a/src/main/java/com/owncloud/android/ui/activity/WhatsNewActivity.java b/src/main/java/com/owncloud/android/ui/activity/WhatsNewActivity.java
index e632cfc454bc..fae5287ae224 100644
--- a/src/main/java/com/owncloud/android/ui/activity/WhatsNewActivity.java
+++ b/src/main/java/com/owncloud/android/ui/activity/WhatsNewActivity.java
@@ -1,23 +1,23 @@
/**
- * Nextcloud Android client application
+ * Nextcloud Android client application
*
- * @author Bartosz Przybylski
- * Copyright (C) 2015 Bartosz Przybylski
- * Copyright (C) 2015 ownCloud Inc.
- * Copyright (C) 2016 Nextcloud.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
- *
- * You should have received a copy of the GNU Affero General Public
- * License along with this program. If not, see .
+ * @author Bartosz Przybylski
+ * Copyright (C) 2015 Bartosz Przybylski
+ * Copyright (C) 2015 ownCloud Inc.
+ * Copyright (C) 2016 Nextcloud.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public
+ * License along with this program. If not, see .
*/
package com.owncloud.android.ui.activity;
@@ -36,6 +36,7 @@
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.support.v4.view.ViewPager;
+import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@@ -77,7 +78,7 @@ protected void onCreate(Bundle savedInstanceState) {
setContentView(R.layout.whats_new_activity);
mProgress = (ProgressIndicator) findViewById(R.id.progressIndicator);
- mPager = (ViewPager)findViewById(R.id.contentPanel);
+ mPager = (ViewPager) findViewById(R.id.contentPanel);
final boolean isBeta = getResources().getBoolean(R.bool.is_beta);
String[] urls = getResources().getStringArray(R.array.whatsnew_urls);
@@ -109,8 +110,8 @@ protected void onCreate(Bundle savedInstanceState) {
@Override
public void onClick(View view) {
if (mProgress.hasNextStep()) {
- mPager.setCurrentItem(mPager.getCurrentItem()+1, true);
- mProgress.animateToStep(mPager.getCurrentItem()+1);
+ mPager.setCurrentItem(mPager.getCurrentItem() + 1, true);
+ mProgress.animateToStep(mPager.getCurrentItem() + 1);
} else {
onFinish();
finish();
@@ -134,14 +135,14 @@ public void onClick(View view) {
}
});
- TextView tv = (TextView)findViewById(R.id.welcomeText);
+ TextView tv = (TextView) findViewById(R.id.welcomeText);
if (showWebView) {
tv.setText(R.string.app_name);
} else if (isFirstRun()) {
tv.setText(R.string.empty);
} else {
- tv.setText(R.string.whats_new_title);
+ tv.setText(String.format(getString(R.string.whats_new_title), MainApp.getVersionName()));
}
updateNextButtonIfNeeded();
@@ -205,8 +206,8 @@ static private boolean shouldShow(Context context) {
return (isFirstRun() && context instanceof AccountAuthenticatorActivity) ||
(
!(isFirstRun() && (context instanceof FileDisplayActivity)) &&
- !(context instanceof PassCodeActivity) &&
- (FeatureList.getFiltered(getLastSeenVersionCode(), isFirstRun(), isBeta).length > 0)
+ !(context instanceof PassCodeActivity) &&
+ (FeatureList.getFiltered(getLastSeenVersionCode(), isFirstRun(), isBeta).length > 0)
);
}
@@ -217,7 +218,7 @@ public void onPageScrolled(int position, float positionOffset, int positionOffse
@Override
public void onPageSelected(int position) {
- mProgress.animateToStep(position+1);
+ mProgress.animateToStep(position + 1);
updateNextButtonIfNeeded();
}
@@ -284,7 +285,7 @@ private final class FeaturesViewAdapter extends FragmentPagerAdapter {
private FeatureItem[] mFeatures;
- public FeaturesViewAdapter(FragmentManager fm, FeatureItem[]features) {
+ public FeaturesViewAdapter(FragmentManager fm, FeatureItem[] features) {
super(fm);
mFeatures = features;
}
@@ -314,7 +315,7 @@ static public FeatureFragment newInstance(FeatureItem item) {
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
- mItem = getArguments() != null ? (FeatureItem)getArguments().getParcelable("feature") : null;
+ mItem = getArguments() != null ? (FeatureItem) getArguments().getParcelable("feature") : null;
}
@Nullable
@@ -324,19 +325,23 @@ public View onCreateView(LayoutInflater inflater,
@Nullable Bundle savedInstanceState) {
View v = inflater.inflate(R.layout.whats_new_element, container, false);
- ImageView iv = (ImageView)v.findViewById(R.id.whatsNewImage);
+ ImageView iv = (ImageView) v.findViewById(R.id.whatsNewImage);
if (mItem.shouldShowImage()) {
iv.setImageResource(mItem.getImage());
}
- TextView tv2 = (TextView)v.findViewById(R.id.whatsNewTitle);
+ TextView tv2 = (TextView) v.findViewById(R.id.whatsNewTitle);
if (mItem.shouldShowTitleText()) {
tv2.setText(mItem.getTitleText());
}
- tv2 = (TextView)v.findViewById(R.id.whatsNewText);
+ tv2 = (TextView) v.findViewById(R.id.whatsNewText);
if (mItem.shouldShowContentText()) {
tv2.setText(mItem.getContentText());
+
+ if (!mItem.shouldContentCentered()) {
+ tv2.setGravity(Gravity.START);
+ }
}
return v;
diff --git a/src/main/res/drawable-hdpi/what_new_instant_upload.png b/src/main/res/drawable-hdpi/whats_new_auto_upload.png
similarity index 100%
rename from src/main/res/drawable-hdpi/what_new_instant_upload.png
rename to src/main/res/drawable-hdpi/whats_new_auto_upload.png
diff --git a/src/main/res/drawable-hdpi/whats_new_fingerprint.png b/src/main/res/drawable-hdpi/whats_new_fingerprint.png
new file mode 100644
index 000000000000..3ad9f072eb3d
Binary files /dev/null and b/src/main/res/drawable-hdpi/whats_new_fingerprint.png differ
diff --git a/src/main/res/drawable-hdpi/whats_new_notification.png b/src/main/res/drawable-hdpi/whats_new_notification.png
new file mode 100644
index 000000000000..50794105503b
Binary files /dev/null and b/src/main/res/drawable-hdpi/whats_new_notification.png differ
diff --git a/src/main/res/drawable-hdpi/whats_new_search.png b/src/main/res/drawable-hdpi/whats_new_search.png
new file mode 100644
index 000000000000..43f81c160124
Binary files /dev/null and b/src/main/res/drawable-hdpi/whats_new_search.png differ
diff --git a/src/main/res/drawable-hdpi/whats_new_theming.png b/src/main/res/drawable-hdpi/whats_new_theming.png
new file mode 100644
index 000000000000..68ffda15bbab
Binary files /dev/null and b/src/main/res/drawable-hdpi/whats_new_theming.png differ
diff --git a/src/main/res/layout/whats_new_activity.xml b/src/main/res/layout/whats_new_activity.xml
index 2136d3d3362f..16f49c867e8a 100644
--- a/src/main/res/layout/whats_new_activity.xml
+++ b/src/main/res/layout/whats_new_activity.xml
@@ -34,7 +34,8 @@
android:layout_marginStart="10dp"
android:layout_marginTop="5dp"
android:layout_weight="6"
- android:gravity="center_vertical"
+ android:textStyle="bold"
+ android:gravity="center"
android:text="@string/placeholder_sentence"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="@color/primary_button_text_color"/>
diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml
index 3ecc70128a00..2b983a0678e9 100644
--- a/src/main/res/values/strings.xml
+++ b/src/main/res/values/strings.xml
@@ -623,7 +623,7 @@
Unknown
- What\'s new in Nextcloud
+ What\'s new in %1$s
A safe home for all your data
@@ -632,9 +632,21 @@
Multi account
Connect to all your clouds
- Instant upload
+ Auto upload
Keep your photos safe
+ Enhanced auto upload
+ \u2022 for all android versions\n\u2022 less battery consumption\n\u2022 more reliable, but not instant\n\u2022 separation of images & videos
+
+ Full server search
+ \u2022 Not only in current folder\n\u2022 Returns results from complete server\n\u2022 Directly open files/folders\n\u2022 Supported in NC12 and above
+
+ Theming support
+ If enabled on server app will show\n\u2022 background image\n\u2022 server name\n\u2022 use color to distinguish accounts
+
+ Notification support
+ Get notifications like\n\u2022 new remote share\n\u2022 comment mentions\n\u2022 admin announcements
+
Skip
Please scan your finger
@@ -690,4 +702,6 @@
Test server connection
,
Resharing is not allowed
+ Unlock with fingerprint
+ Use your fingerprint to unlock the app