Merge branch 'master' of https://github.com/commons-app/apps-android-commons into delete-request

This commit is contained in:
Suchit Kar 2018-03-13 02:11:41 +05:30
commit e14cca2fec
17 changed files with 271 additions and 88 deletions

View file

@ -154,6 +154,7 @@ android {
buildConfigField "String", "EVENTLOG_WIKI", "\"commonswiki\"" buildConfigField "String", "EVENTLOG_WIKI", "\"commonswiki\""
buildConfigField "String", "SIGNUP_LANDING_URL", "\"https://commons.m.wikimedia.org/w/index.php?title=Special:CreateAccount&returnto=Main+Page&returntoquery=welcome%3Dyes\"" buildConfigField "String", "SIGNUP_LANDING_URL", "\"https://commons.m.wikimedia.org/w/index.php?title=Special:CreateAccount&returnto=Main+Page&returntoquery=welcome%3Dyes\""
buildConfigField "String", "SIGNUP_SUCCESS_REDIRECTION_URL", "\"https://commons.m.wikimedia.org/w/index.php?title=Main_Page&welcome=yes\"" buildConfigField "String", "SIGNUP_SUCCESS_REDIRECTION_URL", "\"https://commons.m.wikimedia.org/w/index.php?title=Main_Page&welcome=yes\""
buildConfigField "String", "FORGOT_PASSWORD_URL", "\"https://commons.wikimedia.org/wiki/Special:PasswordReset\""
dimension 'tier' dimension 'tier'
} }
@ -168,6 +169,7 @@ android {
buildConfigField "String", "EVENTLOG_WIKI", "\"commonswiki\"" buildConfigField "String", "EVENTLOG_WIKI", "\"commonswiki\""
buildConfigField "String", "SIGNUP_LANDING_URL", "\"https://commons.m.wikimedia.beta.wmflabs.org/w/index.php?title=Special:CreateAccount&returnto=Main+Page&returntoquery=welcome%3Dyes\"" buildConfigField "String", "SIGNUP_LANDING_URL", "\"https://commons.m.wikimedia.beta.wmflabs.org/w/index.php?title=Special:CreateAccount&returnto=Main+Page&returntoquery=welcome%3Dyes\""
buildConfigField "String", "SIGNUP_SUCCESS_REDIRECTION_URL", "\"https://commons.m.wikimedia.beta.wmflabs.org/w/index.php?title=Main_Page&welcome=yes\"" buildConfigField "String", "SIGNUP_SUCCESS_REDIRECTION_URL", "\"https://commons.m.wikimedia.beta.wmflabs.org/w/index.php?title=Main_Page&welcome=yes\""
buildConfigField "String", "FORGOT_PASSWORD_URL", "\"https://commons.wikimedia.beta.wmflabs.org/wiki/Special:PasswordReset\""
dimension 'tier' dimension 'tier'
} }
} }

View file

@ -5,6 +5,7 @@ import android.preference.PreferenceManager;
import android.support.test.espresso.Espresso; import android.support.test.espresso.Espresso;
import android.support.test.espresso.action.ViewActions; import android.support.test.espresso.action.ViewActions;
import android.support.test.espresso.assertion.ViewAssertions; import android.support.test.espresso.assertion.ViewAssertions;
import android.support.test.espresso.matcher.PreferenceMatchers;
import android.support.test.espresso.matcher.ViewMatchers; import android.support.test.espresso.matcher.ViewMatchers;
import android.support.test.filters.LargeTest; import android.support.test.filters.LargeTest;
import android.support.test.rule.ActivityTestRule; import android.support.test.rule.ActivityTestRule;
@ -61,7 +62,7 @@ public class SettingsActivityTest {
@Test @Test
public void oneLicenseIsChecked() { public void oneLicenseIsChecked() {
// click "License" (the first item) // click "License" (the first item)
Espresso.onData(Matchers.anything()) Espresso.onData(PreferenceMatchers.withKey("defaultLicense"))
.inAdapterView(ViewMatchers.withId(android.R.id.list)) .inAdapterView(ViewMatchers.withId(android.R.id.list))
.atPosition(0) .atPosition(0)
.perform(ViewActions.click()); .perform(ViewActions.click());
@ -74,7 +75,7 @@ public class SettingsActivityTest {
@Test @Test
public void afterClickingCcby4ItWillStay() { public void afterClickingCcby4ItWillStay() {
// click "License" (the first item) // click "License" (the first item)
Espresso.onData(Matchers.anything()) Espresso.onData(PreferenceMatchers.withKey("defaultLicense"))
.inAdapterView(ViewMatchers.withId(android.R.id.list)) .inAdapterView(ViewMatchers.withId(android.R.id.list))
.atPosition(0) .atPosition(0)
.perform(ViewActions.click()); .perform(ViewActions.click());
@ -85,7 +86,7 @@ public class SettingsActivityTest {
).perform(ViewActions.click()); ).perform(ViewActions.click());
// click "License" (the first item) // click "License" (the first item)
Espresso.onData(Matchers.anything()) Espresso.onData(PreferenceMatchers.withKey("defaultLicense"))
.inAdapterView(ViewMatchers.withId(android.R.id.list)) .inAdapterView(ViewMatchers.withId(android.R.id.list))
.atPosition(0) .atPosition(0)
.perform(ViewActions.click()); .perform(ViewActions.click());

View file

@ -4,6 +4,8 @@ import android.annotation.SuppressLint;
import android.content.Intent; import android.content.Intent;
import android.net.Uri; import android.net.Uri;
import android.os.Bundle; import android.os.Bundle;
import android.text.SpannableString;
import android.text.style.UnderlineSpan;
import android.util.Log; import android.util.Log;
import android.support.customtabs.CustomTabsIntent; import android.support.customtabs.CustomTabsIntent;
import android.support.v4.content.ContextCompat; import android.support.v4.content.ContextCompat;
@ -25,6 +27,7 @@ import static android.widget.Toast.LENGTH_SHORT;
public class AboutActivity extends NavigationBaseActivity { public class AboutActivity extends NavigationBaseActivity {
@BindView(R.id.about_version) TextView versionText; @BindView(R.id.about_version) TextView versionText;
@BindView(R.id.about_license) HtmlTextView aboutLicenseText; @BindView(R.id.about_license) HtmlTextView aboutLicenseText;
@BindView(R.id.about_faq) TextView faqText;
/** /**
* This method helps in the creation About screen * This method helps in the creation About screen
@ -40,7 +43,9 @@ public class AboutActivity extends NavigationBaseActivity {
ButterKnife.bind(this); ButterKnife.bind(this);
String aboutText = getString(R.string.about_license); String aboutText = getString(R.string.about_license);
aboutLicenseText.setHtmlText(aboutText); aboutLicenseText.setHtmlText(aboutText);
SpannableString content = new SpannableString(getString(R.string.about_faq));
content.setSpan(new UnderlineSpan(), 0, content.length(), 0);
faqText.setText(content);
versionText.setText(BuildConfig.VERSION_NAME); versionText.setText(BuildConfig.VERSION_NAME);
initDrawer(); initDrawer();
} }
@ -113,4 +118,9 @@ public class AboutActivity extends NavigationBaseActivity {
} }
} }
@OnClick(R.id.about_faq)
public void launchFrequentlyAskedQuesions(View view) {
Utils.handleWebUrl(this,Uri.parse("https://github.com/commons-app/apps-android-commons/wiki/Frequently-Asked-Questions\\"));
}
} }

View file

@ -5,6 +5,7 @@ import android.support.v4.view.PagerAdapter;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.widget.TextView;
import butterknife.ButterKnife; import butterknife.ButterKnife;
import butterknife.OnClick; import butterknife.OnClick;
@ -54,11 +55,19 @@ public class WelcomePagerAdapter extends PagerAdapter {
public Object instantiateItem(ViewGroup container, int position) { public Object instantiateItem(ViewGroup container, int position) {
LayoutInflater inflater = LayoutInflater.from(container.getContext()); LayoutInflater inflater = LayoutInflater.from(container.getContext());
ViewGroup layout = (ViewGroup) inflater.inflate(PAGE_LAYOUTS[position], container, false); ViewGroup layout = (ViewGroup) inflater.inflate(PAGE_LAYOUTS[position], container, false);
if( BuildConfig.FLAVOR == "beta"){
TextView textView = (TextView) layout.findViewById(R.id.welcomeYesButton);
if( textView.getVisibility() != View.VISIBLE){
textView.setVisibility(View.VISIBLE);
}
ViewHolder holder = new ViewHolder(layout);
layout.setTag(holder);
} else {
if (position == PAGE_FINAL) { if (position == PAGE_FINAL) {
ViewHolder holder = new ViewHolder(layout); ViewHolder holder = new ViewHolder(layout);
layout.setTag(holder); layout.setTag(holder);
} }
}
container.addView(layout); container.addView(layout);
return layout; return layout;
} }
@ -92,5 +101,6 @@ public class WelcomePagerAdapter extends PagerAdapter {
callback.onYesClicked(); callback.onYesClicked();
} }
} }
} }
} }

View file

@ -8,6 +8,7 @@ import android.app.Activity;
import android.app.ProgressDialog; import android.app.ProgressDialog;
import android.content.Intent; import android.content.Intent;
import android.content.SharedPreferences; import android.content.SharedPreferences;
import android.net.Uri;
import android.os.Bundle; import android.os.Bundle;
import android.support.annotation.ColorRes; import android.support.annotation.ColorRes;
import android.support.annotation.NonNull; import android.support.annotation.NonNull;
@ -27,6 +28,7 @@ import android.view.inputmethod.InputMethodManager;
import android.widget.Button; import android.widget.Button;
import android.widget.EditText; import android.widget.EditText;
import android.widget.TextView; import android.widget.TextView;
import android.widget.Toast;
import java.io.IOException; import java.io.IOException;
@ -44,6 +46,7 @@ import fr.free.nrw.commons.contributions.ContributionsActivity;
import fr.free.nrw.commons.di.ApplicationlessInjection; import fr.free.nrw.commons.di.ApplicationlessInjection;
import fr.free.nrw.commons.mwapi.MediaWikiApi; import fr.free.nrw.commons.mwapi.MediaWikiApi;
import fr.free.nrw.commons.theme.NavigationBaseActivity; import fr.free.nrw.commons.theme.NavigationBaseActivity;
import fr.free.nrw.commons.ui.widget.HtmlTextView;
import io.reactivex.Observable; import io.reactivex.Observable;
import io.reactivex.android.schedulers.AndroidSchedulers; import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.schedulers.Schedulers; import io.reactivex.schedulers.Schedulers;
@ -74,6 +77,8 @@ public class LoginActivity extends AccountAuthenticatorActivity {
@BindView(R.id.error_message) TextView errorMessage; @BindView(R.id.error_message) TextView errorMessage;
@BindView(R.id.login_credentials) TextView loginCredentials; @BindView(R.id.login_credentials) TextView loginCredentials;
@BindView(R.id.two_factor_container) TextInputLayout twoFactorContainer; @BindView(R.id.two_factor_container) TextInputLayout twoFactorContainer;
@BindView(R.id.forgotPassword) HtmlTextView forgotPasswordText;
ProgressDialog progressDialog; ProgressDialog progressDialog;
private AppCompatDelegate delegate; private AppCompatDelegate delegate;
private LoginTextWatcher textWatcher = new LoginTextWatcher(); private LoginTextWatcher textWatcher = new LoginTextWatcher();
@ -114,6 +119,8 @@ public class LoginActivity extends AccountAuthenticatorActivity {
loginButton.setOnClickListener(view -> performLogin()); loginButton.setOnClickListener(view -> performLogin());
signupButton.setOnClickListener(view -> signUp()); signupButton.setOnClickListener(view -> signUp());
forgotPasswordText.setOnClickListener(view -> forgotPassword());
if(BuildConfig.FLAVOR == "beta"){ if(BuildConfig.FLAVOR == "beta"){
loginCredentials.setText(getString(R.string.login_credential)); loginCredentials.setText(getString(R.string.login_credential));
} else { } else {
@ -121,6 +128,10 @@ public class LoginActivity extends AccountAuthenticatorActivity {
} }
} }
private void forgotPassword() {
Utils.handleWebUrl(this, Uri.parse(BuildConfig.FORGOT_PASSWORD_URL));
}
public void hideKeyboard(View view) { public void hideKeyboard(View view) {
InputMethodManager inputMethodManager =(InputMethodManager)this.getSystemService(Activity.INPUT_METHOD_SERVICE); InputMethodManager inputMethodManager =(InputMethodManager)this.getSystemService(Activity.INPUT_METHOD_SERVICE);

View file

@ -10,7 +10,7 @@ import android.content.pm.PackageManager;
import android.net.Uri; import android.net.Uri;
import android.os.Build; import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
import android.preference.CheckBoxPreference; import android.preference.SwitchPreference;
import android.preference.EditTextPreference; import android.preference.EditTextPreference;
import android.preference.ListPreference; import android.preference.ListPreference;
import android.preference.Preference; import android.preference.Preference;
@ -59,7 +59,7 @@ public class SettingsFragment extends PreferenceFragment {
return true; return true;
}); });
CheckBoxPreference themePreference = (CheckBoxPreference) findPreference("theme"); SwitchPreference themePreference = (SwitchPreference) findPreference("theme");
themePreference.setOnPreferenceChangeListener((preference, newValue) -> { themePreference.setOnPreferenceChangeListener((preference, newValue) -> {
getActivity().recreate(); getActivity().recreate();
return true; return true;

View file

@ -187,12 +187,23 @@
</LinearLayout> </LinearLayout>
<fr.free.nrw.commons.ui.widget.HtmlTextView
android:visibility="visible"
android:id="@+id/forgotPassword"
android:layout_width="match_parent"
android:gravity="center_horizontal"
android:layout_height="wrap_content"
android:layout_below="@id/buttonFrame"
android:layout_marginBottom="@dimen/standard_gap"
android:text="@string/forgot_password"
android:textColor="@color/status_bar_blue"/>
<fr.free.nrw.commons.ui.widget.HtmlTextView <fr.free.nrw.commons.ui.widget.HtmlTextView
android:id="@+id/about_privacy_policy" android:id="@+id/about_privacy_policy"
style="?android:textAppearanceSmall" style="?android:textAppearanceSmall"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@id/buttonFrame" android:layout_below="@id/forgotPassword"
android:layout_centerHorizontal="true" android:layout_centerHorizontal="true"
android:layout_gravity="center_horizontal" android:layout_gravity="center_horizontal"
android:layout_marginBottom="@dimen/standard_gap" android:layout_marginBottom="@dimen/standard_gap"

View file

@ -187,12 +187,23 @@
</LinearLayout> </LinearLayout>
<fr.free.nrw.commons.ui.widget.HtmlTextView
android:visibility="visible"
android:id="@+id/forgotPassword"
android:layout_width="match_parent"
android:gravity="center_horizontal"
android:layout_height="wrap_content"
android:layout_below="@id/buttonFrame"
android:layout_marginBottom="@dimen/standard_gap"
android:text="@string/forgot_password"
android:textColor="@color/status_bar_blue" />
<fr.free.nrw.commons.ui.widget.HtmlTextView <fr.free.nrw.commons.ui.widget.HtmlTextView
android:id="@+id/about_privacy_policy" android:id="@+id/about_privacy_policy"
style="?android:textAppearanceSmall" style="?android:textAppearanceSmall"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@id/buttonFrame" android:layout_below="@id/forgotPassword"
android:layout_centerHorizontal="true" android:layout_centerHorizontal="true"
android:layout_gravity="center_horizontal" android:layout_gravity="center_horizontal"
android:layout_marginBottom="@dimen/standard_gap" android:layout_marginBottom="@dimen/standard_gap"

View file

@ -133,6 +133,16 @@
android:gravity="center" android:gravity="center"
android:text="@string/about_credits" /> android:text="@string/about_credits" />
<TextView
android:id="@+id/about_faq"
style="?android:textAppearanceSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/primaryColor"
android:layout_marginTop="@dimen/standard_gap"
android:gravity="center"
/>
<TextView <TextView
android:id="@+id/about_uploads_to" android:id="@+id/about_uploads_to"
style="?android:textAppearanceSmall" style="?android:textAppearanceSmall"

View file

@ -2,12 +2,17 @@
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:fillViewport="true"
android:layout_height="match_parent"> android:layout_height="match_parent">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<FrameLayout <FrameLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_centerInParent="true"
android:layout_gravity="center_vertical"
android:layout_marginTop="@dimen/small_gap"> android:layout_marginTop="@dimen/small_gap">
<android.support.v7.widget.CardView <android.support.v7.widget.CardView
@ -193,17 +198,17 @@
</LinearLayout> </LinearLayout>
<fr.free.nrw.commons.ui.widget.HtmlTextView <fr.free.nrw.commons.ui.widget.HtmlTextView
android:id="@+id/about_privacy_policy" android:visibility="visible"
style="?android:textAppearanceSmall" android:id="@+id/forgotPassword"
android:layout_width="wrap_content" android:layout_width="match_parent"
android:gravity="center_horizontal"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@id/buttonFrame" android:layout_below="@id/buttonFrame"
android:layout_centerHorizontal="true"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="@dimen/standard_gap" android:layout_marginBottom="@dimen/standard_gap"
android:text="@string/about_privacy_policy" /> android:text="@string/forgot_password" />
</RelativeLayout> </RelativeLayout>
</android.support.v7.widget.CardView> </android.support.v7.widget.CardView>
<android.support.v7.widget.AppCompatImageView <android.support.v7.widget.AppCompatImageView
@ -222,7 +227,19 @@
android:elevation="8dp" android:elevation="8dp"
app:srcCompat="@drawable/commons_logo_large" app:srcCompat="@drawable/commons_logo_large"
tools:ignore="UnusedAttribute" /> tools:ignore="UnusedAttribute" />
</FrameLayout> </FrameLayout>
<fr.free.nrw.commons.ui.widget.HtmlTextView
android:id="@+id/about_privacy_policy"
style="?android:textAppearanceSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="@dimen/normal_text"
android:textColor="@color/status_bar_blue"
android:text="@string/about_privacy_policy" />
</RelativeLayout>
</ScrollView> </ScrollView>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:orientation="vertical"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
@ -7,6 +7,13 @@
android:gravity="center" android:gravity="center"
android:weightSum="1" android:weightSum="1"
android:layout_centerHorizontal="true"> android:layout_centerHorizontal="true">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#0c609c"
android:gravity="center_vertical"
>
<GridLayout <GridLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
@ -156,6 +163,21 @@
/> />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="@dimen/overflow_button_dimen"
android:layout_marginTop="@dimen/standard_gap"
android:layout_marginRight="@dimen/standard_gap"
android:text="@string/welcome_skip_button"
android:id="@+id/welcomeYesButton"
android:textSize="@dimen/normal_text"
android:visibility="gone"
android:layout_gravity="right"
android:layout_alignParentRight="true"
android:textColor="#fff"
android:textStyle="bold"
/>
</RelativeLayout>

View file

@ -1,4 +1,11 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#0c609c"
android:gravity="center_vertical"
>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:orientation="vertical"
android:layout_width="match_parent" android:layout_width="match_parent"
@ -130,5 +137,21 @@
/> />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="@dimen/overflow_button_dimen"
android:layout_marginTop="@dimen/standard_gap"
android:layout_marginRight="@dimen/standard_gap"
android:text="@string/welcome_skip_button"
android:id="@+id/welcomeYesButton"
android:textSize="@dimen/normal_text"
android:visibility="gone"
android:layout_gravity="right"
android:layout_alignParentRight="true"
android:textColor="#fff"
android:textStyle="bold"
/>
</RelativeLayout>

View file

@ -1,4 +1,11 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#0c609c"
android:gravity="center_vertical"
>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:orientation="vertical"
android:layout_width="match_parent" android:layout_width="match_parent"
@ -6,7 +13,6 @@
android:background="#0c609c" android:background="#0c609c"
android:gravity="center_vertical" android:gravity="center_vertical"
> >
<ImageView <ImageView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -128,5 +134,19 @@
/> />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="@dimen/overflow_button_dimen"
android:layout_marginTop="@dimen/standard_gap"
android:layout_marginRight="@dimen/standard_gap"
android:text="@string/welcome_skip_button"
android:id="@+id/welcomeYesButton"
android:textSize="@dimen/normal_text"
android:visibility="gone"
android:layout_gravity="right"
android:layout_alignParentRight="true"
android:textColor="#fff"
android:textStyle="bold"
/>
</RelativeLayout>

View file

@ -1,4 +1,11 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#0c609c"
android:gravity="center_vertical"
>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:orientation="vertical"
android:layout_width="match_parent" android:layout_width="match_parent"
@ -42,3 +49,18 @@
android:textColor="@android:color/white" android:textColor="@android:color/white"
/> />
</LinearLayout> </LinearLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="@dimen/overflow_button_dimen"
android:layout_marginTop="@dimen/standard_gap"
android:layout_marginRight="@dimen/standard_gap"
android:text="@string/welcome_skip_button"
android:id="@+id/welcomeYesButton"
android:textSize="@dimen/normal_text"
android:visibility="gone"
android:layout_gravity="right"
android:layout_alignParentRight="true"
android:textColor="#fff"
android:textStyle="bold"
/>
</RelativeLayout>

View file

@ -1,5 +1,9 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<string name="preference_category_appearance">Appearance</string>
<string name="preference_category_general">General</string>
<string name="preference_category_feedback">Feedback</string>
<string name="preference_category_location">Location</string>
<string name="app_name">Commons</string> <string name="app_name">Commons</string>
<string name="bullet">&#8226; </string> <string name="bullet">&#8226; </string>
<string name="menu_settings">Settings</string> <string name="menu_settings">Settings</string>
@ -7,6 +11,7 @@
<string name="password">Password</string> <string name="password">Password</string>
<string name="login_credential">Log in to your Commons Beta account</string> <string name="login_credential">Log in to your Commons Beta account</string>
<string name="login">Log in</string> <string name="login">Log in</string>
<string name="forgot_password">Forgot Password?</string>
<string name="signup">Sign up</string> <string name="signup">Sign up</string>
<string name="logging_in_title">Logging in</string> <string name="logging_in_title">Logging in</string>
<string name="logging_in_message">Please wait…</string> <string name="logging_in_message">Please wait…</string>
@ -80,8 +85,8 @@
<string name="about_license">The Wikimedia Commons app is an open-source app created and maintained by grantees and volunteers of the Wikimedia community. The Wikimedia Foundation is not involved in the creation, development, or maintenance of the app. </string> <string name="about_license">The Wikimedia Commons app is an open-source app created and maintained by grantees and volunteers of the Wikimedia community. The Wikimedia Foundation is not involved in the creation, development, or maintenance of the app. </string>
<string name="trademarked_name" translatable="false">Wikimedia Commons</string> <string name="trademarked_name" translatable="false">Wikimedia Commons</string>
<string name="about_improve">Create a new &lt;a href=\"https://github.com/commons-app/apps-android-commons/issues\"&gt;GitHub issue&lt;/a&gt; for bug reports and suggestions.</string> <string name="about_improve">Create a new &lt;a href=\"https://github.com/commons-app/apps-android-commons/issues\"&gt;GitHub issue&lt;/a&gt; for bug reports and suggestions.</string>
<string name="about_privacy_policy"><u>Privacy policy</u></string> <string name="about_privacy_policy"><![CDATA[<u>Privacy policy</u>]]></string>
<string name="about_credits"><u>Credits</u></string> <string name="about_credits"><![CDATA[<u>Credits</u>]]></string>
<string name="title_activity_about">About</string> <string name="title_activity_about">About</string>
<string name="menu_feedback">Send Feedback (via Email)</string> <string name="menu_feedback">Send Feedback (via Email)</string>
<string name="no_email_client">No email client installed</string> <string name="no_email_client">No email client installed</string>
@ -93,7 +98,7 @@
<string name="share_license_summary">This image will be licensed under %1$s</string> <string name="share_license_summary">This image will be licensed under %1$s</string>
<string name="media_upload_policy">By submitting this picture, I declare that this is my own work, that it does not contain copyrighted material or selfies, and otherwise adheres to &lt;a href=\"https://commons.wikimedia.org/wiki/Commons:Policies_and_guidelines\"&gt;Wikimedia Commons policies&lt;/a&gt;.</string> <string name="media_upload_policy">By submitting this picture, I declare that this is my own work, that it does not contain copyrighted material or selfies, and otherwise adheres to &lt;a href=\"https://commons.wikimedia.org/wiki/Commons:Policies_and_guidelines\"&gt;Wikimedia Commons policies&lt;/a&gt;.</string>
<string name="menu_download">Download</string> <string name="menu_download">Download</string>
<string name="preference_license">License</string> <string name="preference_license">Default License</string>
<string name="use_previous">Use previous title/description</string> <string name="use_previous">Use previous title/description</string>
<string name="allow_gps">Automatically get current location</string> <string name="allow_gps">Automatically get current location</string>
<string name="allow_gps_summary">Retrieve current location to offer category suggestions if image is not geotagged</string> <string name="allow_gps_summary">Retrieve current location to offer category suggestions if image is not geotagged</string>
@ -169,8 +174,6 @@
<string name="become_a_tester_title">Become a Beta Tester</string> <string name="become_a_tester_title">Become a Beta Tester</string>
<string name="become_a_tester_description">Opt-in to our beta channel on Google Play and get early access to new features and bug fixes</string> <string name="become_a_tester_description">Opt-in to our beta channel on Google Play and get early access to new features and bug fixes</string>
<string name="beta_opt_in_link">https://play.google.com/apps/testing/fr.free.nrw.commons</string> <string name="beta_opt_in_link">https://play.google.com/apps/testing/fr.free.nrw.commons</string>
<string name="use_wikidata">Use Wikidata</string>
<string name="use_wikidata_summary">(Warning: disabling this may cause large mobile data consumption)</string>
<string name="map_theme_light">mapbox://styles/mapbox/traffic-day-v2</string> <string name="map_theme_light">mapbox://styles/mapbox/traffic-day-v2</string>
<string name="map_theme_dark">mapbox://styles/mapbox/traffic-night-v2</string> <string name="map_theme_dark">mapbox://styles/mapbox/traffic-night-v2</string>
<string name="mapbox_commons_app_token">pk.eyJ1IjoibWFza2FyYXZpdmVrIiwiYSI6ImNqMmxvdzFjMTAwMHYzM283ZWM3eW5tcDAifQ.ib5SZ9EVjwJe6GSKve0bcg</string> <string name="mapbox_commons_app_token">pk.eyJ1IjoibWFza2FyYXZpdmVrIiwiYSI6ImNqMmxvdzFjMTAwMHYzM283ZWM3eW5tcDAifQ.ib5SZ9EVjwJe6GSKve0bcg</string>
@ -241,4 +244,6 @@
<string name="notifications_mention">%1$s mentioned you on %2$s.</string> <string name="notifications_mention">%1$s mentioned you on %2$s.</string>
<string name="toggle_view_button">Toggle view</string> <string name="toggle_view_button">Toggle view</string>
<string name="about_rate_us"><u>Rate Us</u></string> <string name="about_rate_us"><u>Rate Us</u></string>
<string name="about_faq">Frequently Asked Questions</string>
<string name="welcome_skip_button">Skip Tutorial</string>
</resources> </resources>

View file

@ -1,22 +1,56 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen <PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android">
>
<PreferenceCategory
android:title="@string/preference_category_appearance">
<SwitchPreference
android:title="@string/preference_theme"
android:defaultValue="false"
android:summary="@string/preference_theme_summary"
android:key="theme" />
</PreferenceCategory>
<PreferenceCategory
android:title="@string/preference_category_general">
<ListPreference <ListPreference
android:key="defaultLicense" android:key="defaultLicense"
android:title="@string/preference_license" android:title="@string/preference_license"
android:entries="@array/pref_defaultLicense_entries" android:entries="@array/pref_defaultLicense_entries"
android:entryValues="@array/pref_defaultLicense_values" android:entryValues="@array/pref_defaultLicense_values"
android:defaultValue="@string/license_pref_cc_by_sa_4_0" android:defaultValue="@string/license_pref_cc_by_sa_4_0" />
/>
<CheckBoxPreference <SwitchPreference
android:key="useExternalStorage"
android:title="@string/use_external_storage"
android:defaultValue="true"
android:summary="@string/use_external_storage_summary" />
<EditTextPreference
android:key="uploads"
android:defaultValue="100"
android:title= "@string/set_limit"
android:inputType="numberDecimal"
android:maxLength="3" />
</PreferenceCategory>
<PreferenceCategory
android:title="@string/preference_category_location">
<SwitchPreference
android:key="allowGps" android:key="allowGps"
android:title="@string/allow_gps" android:title="@string/allow_gps"
android:defaultValue="false" android:defaultValue="false"
android:summary="@string/allow_gps_summary" android:summary="@string/allow_gps_summary" />
/>
</PreferenceCategory>
<PreferenceCategory
android:title="@string/preference_category_feedback">
<Preference android:title="@string/become_a_tester_title" <Preference android:title="@string/become_a_tester_title"
android:summary="@string/become_a_tester_description"> android:summary="@string/become_a_tester_description">
@ -24,38 +58,11 @@
android:data="@string/beta_opt_in_link" /> android:data="@string/beta_opt_in_link" />
</Preference> </Preference>
<CheckBoxPreference
android:title="@string/preference_theme"
android:defaultValue="false"
android:summary="@string/preference_theme_summary"
android:key="theme"
/>
<CheckBoxPreference
android:key="useWikidata"
android:title="@string/use_wikidata"
android:defaultValue="true"
android:summary="@string/use_wikidata_summary"
/>
<EditTextPreference
android:key="uploads"
android:defaultValue="100"
android:title= "@string/set_limit"
android:inputType="numberDecimal"
android:maxLength="3"
/>
<CheckBoxPreference
android:key="useExternalStorage"
android:title="@string/use_external_storage"
android:defaultValue="true"
android:summary="@string/use_external_storage_summary"
/>
<Preference <Preference
android:key="sendLogFile" android:key="sendLogFile"
android:title="@string/send_log_file" android:title="@string/send_log_file"
android:summary="@string/send_log_file_description"/> android:summary="@string/send_log_file_description"/>
</PreferenceCategory>
</PreferenceScreen> </PreferenceScreen>

View file

@ -1,5 +1,6 @@
#Sat Mar 03 13:58:47 IST 2018
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip