mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 12:23:58 +01:00
Merge branch 'master' into Fixes-#1198
This commit is contained in:
commit
ff54d03aeb
54 changed files with 1641 additions and 603 deletions
|
|
@ -33,3 +33,7 @@ You can find this information by going to the navigation drawer in the app and t
|
|||
**Screen-shots:**
|
||||
|
||||
Can be created by pressing the Volume Down and Power Button at the same time on Android 4.0 and higher.
|
||||
|
||||
**Would you like to work on the issue?**
|
||||
|
||||
Please let us know whether you want to fix the issue by yourself. If not, anyone can get the issue assigned to them.
|
||||
|
|
|
|||
|
|
@ -4,6 +4,12 @@ Fixes #{GitHub issue number}
|
|||
|
||||
{Describe the changes made and why they were made.}
|
||||
|
||||
## Tests performed
|
||||
|
||||
Tested on {API level & name of device/emulator}, with {build variant, e.g. ProdDebug}.
|
||||
|
||||
{Please test your PR at least once before submitting.}
|
||||
|
||||
## Screenshots showing what changed
|
||||
|
||||
{Only for user interface changes, otherwise remove this section. See [how to take a screenshot](https://android.stackexchange.com/questions/1759/how-to-take-a-screenshot-with-an-android-device)}
|
||||
|
|
|
|||
|
|
@ -48,8 +48,11 @@ dependencies {
|
|||
compile 'com.facebook.fresco:fresco:1.3.0'
|
||||
compile 'com.facebook.stetho:stetho:1.5.0'
|
||||
|
||||
compile 'com.android.support:multidex:1.0.3'
|
||||
|
||||
testCompile 'junit:junit:4.12'
|
||||
testCompile 'org.robolectric:robolectric:3.7.1'
|
||||
testCompile "org.robolectric:multidex:3.4.2"
|
||||
|
||||
testCompile 'com.squareup.okhttp3:mockwebserver:3.8.1'
|
||||
androidTestCompile 'com.squareup.okhttp3:mockwebserver:3.8.1'
|
||||
|
|
@ -94,6 +97,9 @@ dependencies {
|
|||
implementation "com.google.dagger:dagger-android-support:$DAGGER_VERSION"
|
||||
kapt "com.google.dagger:dagger-compiler:$DAGGER_VERSION"
|
||||
kapt "com.google.dagger:dagger-android-processor:$DAGGER_VERSION"
|
||||
|
||||
compile 'com.borjabravo:readmoretextview:2.1.0'
|
||||
compile 'com.android.support.constraint:constraint-layout:1.0.2'
|
||||
}
|
||||
|
||||
android {
|
||||
|
|
@ -149,6 +155,7 @@ android {
|
|||
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_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'
|
||||
}
|
||||
|
||||
|
|
@ -163,6 +170,7 @@ android {
|
|||
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_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'
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import android.preference.PreferenceManager;
|
|||
import android.support.test.espresso.Espresso;
|
||||
import android.support.test.espresso.action.ViewActions;
|
||||
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.filters.LargeTest;
|
||||
import android.support.test.rule.ActivityTestRule;
|
||||
|
|
@ -61,7 +62,7 @@ public class SettingsActivityTest {
|
|||
@Test
|
||||
public void oneLicenseIsChecked() {
|
||||
// click "License" (the first item)
|
||||
Espresso.onData(Matchers.anything())
|
||||
Espresso.onData(PreferenceMatchers.withKey("defaultLicense"))
|
||||
.inAdapterView(ViewMatchers.withId(android.R.id.list))
|
||||
.atPosition(0)
|
||||
.perform(ViewActions.click());
|
||||
|
|
@ -74,7 +75,7 @@ public class SettingsActivityTest {
|
|||
@Test
|
||||
public void afterClickingCcby4ItWillStay() {
|
||||
// click "License" (the first item)
|
||||
Espresso.onData(Matchers.anything())
|
||||
Espresso.onData(PreferenceMatchers.withKey("defaultLicense"))
|
||||
.inAdapterView(ViewMatchers.withId(android.R.id.list))
|
||||
.atPosition(0)
|
||||
.perform(ViewActions.click());
|
||||
|
|
@ -85,7 +86,7 @@ public class SettingsActivityTest {
|
|||
).perform(ViewActions.click());
|
||||
|
||||
// click "License" (the first item)
|
||||
Espresso.onData(Matchers.anything())
|
||||
Espresso.onData(PreferenceMatchers.withKey("defaultLicense"))
|
||||
.inAdapterView(ViewMatchers.withId(android.R.id.list))
|
||||
.atPosition(0)
|
||||
.perform(ViewActions.click());
|
||||
|
|
@ -96,4 +97,4 @@ public class SettingsActivityTest {
|
|||
ViewMatchers.withText(R.string.license_name_cc_by_four)
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,12 +1,17 @@
|
|||
package fr.free.nrw.commons;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.text.SpannableString;
|
||||
import android.text.style.UnderlineSpan;
|
||||
import android.util.Log;
|
||||
import android.support.customtabs.CustomTabsIntent;
|
||||
import android.support.v4.content.ContextCompat;
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
|
|
@ -14,12 +19,15 @@ import butterknife.OnClick;
|
|||
import fr.free.nrw.commons.theme.NavigationBaseActivity;
|
||||
import fr.free.nrw.commons.ui.widget.HtmlTextView;
|
||||
|
||||
import static android.widget.Toast.LENGTH_SHORT;
|
||||
|
||||
/**
|
||||
* Represents about screen of this app
|
||||
*/
|
||||
public class AboutActivity extends NavigationBaseActivity {
|
||||
@BindView(R.id.about_version) TextView versionText;
|
||||
@BindView(R.id.about_license) HtmlTextView aboutLicenseText;
|
||||
@BindView(R.id.about_faq) TextView faqText;
|
||||
|
||||
/**
|
||||
* This method helps in the creation About screen
|
||||
|
|
@ -27,22 +35,23 @@ public class AboutActivity extends NavigationBaseActivity {
|
|||
* @param savedInstanceState Data bundle
|
||||
*/
|
||||
@Override
|
||||
@SuppressLint("StringFormatInvalid")
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_about);
|
||||
|
||||
ButterKnife.bind(this);
|
||||
|
||||
String aboutText = getString(R.string.about_license);
|
||||
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);
|
||||
initDrawer();
|
||||
}
|
||||
|
||||
@OnClick(R.id.facebook_launch_icon)
|
||||
public void launchFacebook(View view) {
|
||||
|
||||
Intent intent;
|
||||
try {
|
||||
intent = new Intent(Intent.ACTION_VIEW, Uri.parse("fb://page/" + "1921335171459985"));
|
||||
|
|
@ -55,7 +64,7 @@ public class AboutActivity extends NavigationBaseActivity {
|
|||
|
||||
@OnClick(R.id.github_launch_icon)
|
||||
public void launchGithub(View view) {
|
||||
Utils.handleWebUrl(this,Uri.parse("https://commons-app.github.io/\\"));
|
||||
Utils.handleWebUrl(this,Uri.parse("https://github.com/commons-app/apps-android-commons\\"));
|
||||
}
|
||||
|
||||
@OnClick(R.id.website_launch_icon)
|
||||
|
|
@ -63,6 +72,11 @@ public class AboutActivity extends NavigationBaseActivity {
|
|||
Utils.handleWebUrl(this,Uri.parse("https://commons-app.github.io/\\"));
|
||||
}
|
||||
|
||||
@OnClick(R.id.about_rate_us)
|
||||
public void launchRatings(View view){
|
||||
Utils.rateApp(this);
|
||||
}
|
||||
|
||||
@OnClick(R.id.about_credits)
|
||||
public void launchCredits(View view) {
|
||||
Utils.handleWebUrl(this,Uri.parse("https://github.com/commons-app/apps-android-commons/blob/master/CREDITS/\\"));
|
||||
|
|
@ -73,5 +87,8 @@ public class AboutActivity extends NavigationBaseActivity {
|
|||
Utils.handleWebUrl(this,Uri.parse("https://github.com/commons-app/apps-android-commons/wiki/Privacy-policy\\"));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@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\\"));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,8 +4,10 @@ import android.app.Application;
|
|||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.database.sqlite.SQLiteDatabase;
|
||||
import android.support.multidex.MultiDexApplication;
|
||||
|
||||
import com.facebook.drawee.backends.pipeline.Fresco;
|
||||
import com.facebook.imagepipeline.core.ImagePipelineConfig;
|
||||
import com.facebook.stetho.Stetho;
|
||||
import com.squareup.leakcanary.LeakCanary;
|
||||
import com.squareup.leakcanary.RefWatcher;
|
||||
|
|
@ -24,7 +26,6 @@ import fr.free.nrw.commons.category.CategoryDao;
|
|||
import fr.free.nrw.commons.contributions.ContributionDao;
|
||||
import fr.free.nrw.commons.data.DBOpenHelper;
|
||||
import fr.free.nrw.commons.di.ApplicationlessInjection;
|
||||
import fr.free.nrw.commons.di.CommonsApplicationComponent;
|
||||
import fr.free.nrw.commons.modifications.ModifierSequenceDao;
|
||||
import fr.free.nrw.commons.utils.FileUtils;
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
|
|
@ -40,7 +41,7 @@ import timber.log.Timber;
|
|||
resDialogCommentPrompt = R.string.crash_dialog_comment_prompt,
|
||||
resDialogOkToast = R.string.crash_dialog_ok_toast
|
||||
)
|
||||
public class CommonsApplication extends Application {
|
||||
public class CommonsApplication extends MultiDexApplication {
|
||||
|
||||
@Inject SessionManager sessionManager;
|
||||
@Inject DBOpenHelper dbOpenHelper;
|
||||
|
|
@ -49,7 +50,7 @@ public class CommonsApplication extends Application {
|
|||
@Inject @Named("application_preferences") SharedPreferences applicationPrefs;
|
||||
@Inject @Named("prefs") SharedPreferences otherPrefs;
|
||||
|
||||
public static final String DEFAULT_EDIT_SUMMARY = "Uploaded using Android Commons app";
|
||||
public static final String DEFAULT_EDIT_SUMMARY = "Uploaded using [[COM:MOA|Commons Mobile App]]";
|
||||
|
||||
public static final String FEEDBACK_EMAIL = "commons-app-android@googlegroups.com";
|
||||
|
||||
|
|
@ -71,8 +72,11 @@ public class CommonsApplication extends Application {
|
|||
.getInstance(this)
|
||||
.getCommonsApplicationComponent()
|
||||
.inject(this);
|
||||
|
||||
Fresco.initialize(this);
|
||||
// Set DownsampleEnabled to True to downsample the image in case it's heavy
|
||||
ImagePipelineConfig config = ImagePipelineConfig.newBuilder(this)
|
||||
.setDownsampleEnabled(true)
|
||||
.build();
|
||||
Fresco.initialize(this,config);
|
||||
if (setupLeakCanary() == RefWatcher.DISABLED) {
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import android.preference.PreferenceManager;
|
|||
import android.support.annotation.NonNull;
|
||||
import android.support.customtabs.CustomTabsIntent;
|
||||
import android.support.v4.content.ContextCompat;
|
||||
import android.widget.Toast;
|
||||
|
||||
import org.apache.commons.codec.binary.Hex;
|
||||
import org.apache.commons.codec.digest.DigestUtils;
|
||||
|
|
@ -15,7 +16,6 @@ import java.io.BufferedReader;
|
|||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URL;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.Locale;
|
||||
import java.util.regex.Matcher;
|
||||
|
|
@ -24,6 +24,8 @@ import java.util.regex.Pattern;
|
|||
import fr.free.nrw.commons.settings.Prefs;
|
||||
import timber.log.Timber;
|
||||
|
||||
import static android.widget.Toast.LENGTH_SHORT;
|
||||
|
||||
public class Utils {
|
||||
|
||||
/**
|
||||
|
|
@ -165,7 +167,24 @@ public class Utils {
|
|||
return stringBuilder.toString();
|
||||
}
|
||||
|
||||
public static void rateApp(Context context) {
|
||||
final String appPackageName = BuildConfig.class.getPackage().getName();
|
||||
try {
|
||||
context.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=" + appPackageName)));
|
||||
}
|
||||
catch (android.content.ActivityNotFoundException anfe) {
|
||||
context.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://play.google.com/store/apps/details?id=" + appPackageName)));
|
||||
}
|
||||
}
|
||||
|
||||
public static void handleWebUrl(Context context,Uri url){
|
||||
Intent browserIntent = new Intent(Intent.ACTION_VIEW, url);
|
||||
if (browserIntent.resolveActivity(context.getPackageManager()) == null) {
|
||||
Toast toast = Toast.makeText(context, context.getString(R.string.no_web_browser), LENGTH_SHORT);
|
||||
toast.show();
|
||||
return;
|
||||
}
|
||||
|
||||
CustomTabsIntent.Builder builder = new CustomTabsIntent.Builder();
|
||||
builder.setToolbarColor(ContextCompat.getColor(context, R.color.primaryColor));
|
||||
builder.setSecondaryToolbarColor(ContextCompat.getColor(context, R.color.primaryDarkColor));
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import android.support.v4.view.PagerAdapter;
|
|||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.TextView;
|
||||
|
||||
import butterknife.ButterKnife;
|
||||
import butterknife.OnClick;
|
||||
|
|
@ -54,10 +55,18 @@ public class WelcomePagerAdapter extends PagerAdapter {
|
|||
public Object instantiateItem(ViewGroup container, int position) {
|
||||
LayoutInflater inflater = LayoutInflater.from(container.getContext());
|
||||
ViewGroup layout = (ViewGroup) inflater.inflate(PAGE_LAYOUTS[position], container, false);
|
||||
|
||||
if (position == PAGE_FINAL) {
|
||||
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) {
|
||||
ViewHolder holder = new ViewHolder(layout);
|
||||
layout.setTag(holder);
|
||||
}
|
||||
}
|
||||
container.addView(layout);
|
||||
return layout;
|
||||
|
|
@ -92,5 +101,6 @@ public class WelcomePagerAdapter extends PagerAdapter {
|
|||
callback.onYesClicked();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import android.app.Activity;
|
|||
import android.app.ProgressDialog;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.ColorRes;
|
||||
import android.support.annotation.NonNull;
|
||||
|
|
@ -27,6 +28,7 @@ import android.view.inputmethod.InputMethodManager;
|
|||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
|
|
@ -35,6 +37,7 @@ import javax.inject.Named;
|
|||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import butterknife.OnClick;
|
||||
import fr.free.nrw.commons.BuildConfig;
|
||||
import fr.free.nrw.commons.PageTitle;
|
||||
import fr.free.nrw.commons.R;
|
||||
|
|
@ -44,6 +47,7 @@ import fr.free.nrw.commons.contributions.ContributionsActivity;
|
|||
import fr.free.nrw.commons.di.ApplicationlessInjection;
|
||||
import fr.free.nrw.commons.mwapi.MediaWikiApi;
|
||||
import fr.free.nrw.commons.theme.NavigationBaseActivity;
|
||||
import fr.free.nrw.commons.ui.widget.HtmlTextView;
|
||||
import io.reactivex.Observable;
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
import io.reactivex.schedulers.Schedulers;
|
||||
|
|
@ -73,11 +77,16 @@ public class LoginActivity extends AccountAuthenticatorActivity {
|
|||
@BindView(R.id.error_message_container) ViewGroup errorMessageContainer;
|
||||
@BindView(R.id.error_message) TextView errorMessage;
|
||||
@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;
|
||||
private AppCompatDelegate delegate;
|
||||
private LoginTextWatcher textWatcher = new LoginTextWatcher();
|
||||
|
||||
private Boolean loginCurrentlyInProgress = false;
|
||||
private static final String LOGING_IN = "logingIn";
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
setTheme(Utils.isDarkTheme(this) ? R.style.DarkAppTheme : R.style.LightAppTheme);
|
||||
|
|
@ -114,6 +123,8 @@ public class LoginActivity extends AccountAuthenticatorActivity {
|
|||
loginButton.setOnClickListener(view -> performLogin());
|
||||
signupButton.setOnClickListener(view -> signUp());
|
||||
|
||||
forgotPasswordText.setOnClickListener(view -> forgotPassword());
|
||||
|
||||
if(BuildConfig.FLAVOR == "beta"){
|
||||
loginCredentials.setText(getString(R.string.login_credential));
|
||||
} else {
|
||||
|
|
@ -121,6 +132,14 @@ public class LoginActivity extends AccountAuthenticatorActivity {
|
|||
}
|
||||
}
|
||||
|
||||
private void forgotPassword() {
|
||||
Utils.handleWebUrl(this, Uri.parse(BuildConfig.FORGOT_PASSWORD_URL));
|
||||
}
|
||||
|
||||
@OnClick(R.id.about_privacy_policy)
|
||||
void onPrivacyPolicyClicked() {
|
||||
Utils.handleWebUrl(this,Uri.parse("https://github.com/commons-app/apps-android-commons/wiki/Privacy-policy\\"));
|
||||
}
|
||||
|
||||
public void hideKeyboard(View view) {
|
||||
InputMethodManager inputMethodManager =(InputMethodManager)this.getSystemService(Activity.INPUT_METHOD_SERVICE);
|
||||
|
|
@ -164,6 +183,7 @@ public class LoginActivity extends AccountAuthenticatorActivity {
|
|||
}
|
||||
|
||||
private void performLogin() {
|
||||
loginCurrentlyInProgress = true;
|
||||
Timber.d("Login to start!");
|
||||
final String username = canonicializeUsername(usernameEdit.getText().toString());
|
||||
final String password = passwordEdit.getText().toString();
|
||||
|
|
@ -194,6 +214,7 @@ public class LoginActivity extends AccountAuthenticatorActivity {
|
|||
if (result.equals("PASS")) {
|
||||
handlePassResult(username, password);
|
||||
} else {
|
||||
loginCurrentlyInProgress = false;
|
||||
handleOtherResults(result);
|
||||
}
|
||||
}
|
||||
|
|
@ -316,6 +337,21 @@ public class LoginActivity extends AccountAuthenticatorActivity {
|
|||
return getDelegate().getMenuInflater();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onSaveInstanceState(Bundle outState) {
|
||||
super.onSaveInstanceState(outState);
|
||||
outState.putBoolean(LOGING_IN, loginCurrentlyInProgress);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onRestoreInstanceState(Bundle savedInstanceState) {
|
||||
super.onRestoreInstanceState(savedInstanceState);
|
||||
loginCurrentlyInProgress = savedInstanceState.getBoolean(LOGING_IN, false);
|
||||
if(loginCurrentlyInProgress){
|
||||
performLogin();
|
||||
}
|
||||
}
|
||||
|
||||
public void askUserForTwoFactorAuth() {
|
||||
progressDialog.dismiss();
|
||||
twoFactorContainer.setVisibility(VISIBLE);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package fr.free.nrw.commons.category;
|
||||
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Bundle;
|
||||
|
|
|
|||
|
|
@ -108,10 +108,10 @@ public class CategoryDao {
|
|||
Category fromCursor(Cursor cursor) {
|
||||
// Hardcoding column positions!
|
||||
return new Category(
|
||||
CategoryContentProvider.uriForId(cursor.getInt(0)),
|
||||
cursor.getString(1),
|
||||
new Date(cursor.getLong(2)),
|
||||
cursor.getInt(3)
|
||||
CategoryContentProvider.uriForId(cursor.getInt(cursor.getColumnIndex(Table.COLUMN_ID))),
|
||||
cursor.getString(cursor.getColumnIndex(Table.COLUMN_NAME)),
|
||||
new Date(cursor.getLong(cursor.getColumnIndex(Table.COLUMN_LAST_USED))),
|
||||
cursor.getInt(cursor.getColumnIndex(Table.COLUMN_TIMES_USED))
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import android.net.Uri;
|
|||
import android.os.RemoteException;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
|
|
@ -115,23 +116,30 @@ public class ContributionDao {
|
|||
// Hardcoding column positions!
|
||||
//Check that cursor has a value to avoid CursorIndexOutOfBoundsException
|
||||
if (cursor.getCount() > 0) {
|
||||
int index;
|
||||
if (cursor.getColumnIndex(Table.COLUMN_LICENSE) == -1){
|
||||
index = 15;
|
||||
} else {
|
||||
index = cursor.getColumnIndex(Table.COLUMN_LICENSE);
|
||||
}
|
||||
return new Contribution(
|
||||
uriForId(cursor.getInt(0)),
|
||||
cursor.getString(1),
|
||||
parseUri(cursor.getString(2)),
|
||||
cursor.getString(3),
|
||||
parseTimestamp(cursor.getLong(4)),
|
||||
cursor.getInt(5),
|
||||
cursor.getLong(6),
|
||||
parseTimestamp(cursor.getLong(7)),
|
||||
cursor.getLong(8),
|
||||
cursor.getString(9),
|
||||
cursor.getString(10),
|
||||
cursor.getString(11),
|
||||
cursor.getInt(12) == 1,
|
||||
cursor.getInt(13),
|
||||
cursor.getInt(14),
|
||||
cursor.getString(15));
|
||||
uriForId(cursor.getInt(cursor.getColumnIndex(Table.COLUMN_ID))),
|
||||
cursor.getString(cursor.getColumnIndex(Table.COLUMN_FILENAME)),
|
||||
parseUri(cursor.getString(cursor.getColumnIndex(Table.COLUMN_LOCAL_URI))),
|
||||
cursor.getString(cursor.getColumnIndex(Table.COLUMN_IMAGE_URL)),
|
||||
parseTimestamp(cursor.getLong(cursor.getColumnIndex(Table.COLUMN_TIMESTAMP))),
|
||||
cursor.getInt(cursor.getColumnIndex(Table.COLUMN_STATE)),
|
||||
cursor.getLong(cursor.getColumnIndex(Table.COLUMN_LENGTH)),
|
||||
parseTimestamp(cursor.getLong(cursor.getColumnIndex(Table.COLUMN_UPLOADED))),
|
||||
cursor.getLong(cursor.getColumnIndex(Table.COLUMN_TRANSFERRED)),
|
||||
cursor.getString(cursor.getColumnIndex(Table.COLUMN_SOURCE)),
|
||||
cursor.getString(cursor.getColumnIndex(Table.COLUMN_DESCRIPTION)),
|
||||
cursor.getString(cursor.getColumnIndex(Table.COLUMN_CREATOR)),
|
||||
cursor.getInt(cursor.getColumnIndex(Table.COLUMN_MULTIPLE)) == 1,
|
||||
cursor.getInt(cursor.getColumnIndex(Table.COLUMN_WIDTH)),
|
||||
cursor.getInt(cursor.getColumnIndex(Table.COLUMN_HEIGHT)),
|
||||
cursor.getString(index)
|
||||
);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ import javax.inject.Inject;
|
|||
import javax.inject.Named;
|
||||
|
||||
import butterknife.ButterKnife;
|
||||
import fr.free.nrw.commons.BuildConfig;
|
||||
import fr.free.nrw.commons.HandlerService;
|
||||
import fr.free.nrw.commons.Media;
|
||||
import fr.free.nrw.commons.R;
|
||||
|
|
@ -139,7 +140,11 @@ public class ContributionsActivity
|
|||
requestAuthToken();
|
||||
initDrawer();
|
||||
setTitle(getString(R.string.title_activity_contributions));
|
||||
setUploadCount();
|
||||
|
||||
if(!BuildConfig.FLAVOR.equalsIgnoreCase("beta")){
|
||||
setUploadCount();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -279,6 +284,12 @@ public class ContributionsActivity
|
|||
));
|
||||
}
|
||||
|
||||
public void betaSetUploadCount(int betaUploadCount){
|
||||
getSupportActionBar().setSubtitle(getResources()
|
||||
.getQuantityString(R.plurals.contributions_subtitle, betaUploadCount, betaUploadCount));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void notifyDatasetChanged() {
|
||||
// Do nothing for now
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ import javax.inject.Named;
|
|||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import fr.free.nrw.commons.BuildConfig;
|
||||
import fr.free.nrw.commons.R;
|
||||
import fr.free.nrw.commons.di.CommonsDaggerSupportFragment;
|
||||
import fr.free.nrw.commons.nearby.NearbyActivity;
|
||||
|
|
@ -56,6 +57,7 @@ public class ContributionsListFragment extends CommonsDaggerSupportFragment {
|
|||
|
||||
private ContributionController controller;
|
||||
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
View v = inflater.inflate(R.layout.fragment_contributions, container, false);
|
||||
|
|
@ -87,6 +89,10 @@ public class ContributionsListFragment extends CommonsDaggerSupportFragment {
|
|||
|
||||
public void setAdapter(ListAdapter adapter) {
|
||||
this.contributionsList.setAdapter(adapter);
|
||||
|
||||
if(BuildConfig.FLAVOR.equalsIgnoreCase("beta")){
|
||||
((ContributionsActivity) getActivity()).betaSetUploadCount(adapter.getCount());
|
||||
}
|
||||
}
|
||||
|
||||
public void changeProgressBarVisibility(boolean isVisible) {
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ import android.view.ViewTreeObserver;
|
|||
import android.widget.LinearLayout;
|
||||
import android.widget.ScrollView;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.text.SimpleDateFormat;
|
||||
|
|
@ -36,6 +37,8 @@ import fr.free.nrw.commons.location.LatLng;
|
|||
import fr.free.nrw.commons.ui.widget.CompatTextView;
|
||||
import timber.log.Timber;
|
||||
|
||||
import static android.widget.Toast.LENGTH_SHORT;
|
||||
|
||||
public class MediaDetailFragment extends CommonsDaggerSupportFragment {
|
||||
|
||||
private boolean editable;
|
||||
|
|
@ -273,7 +276,12 @@ public class MediaDetailFragment extends CommonsDaggerSupportFragment {
|
|||
}
|
||||
|
||||
private void setOnClickListeners(final Media media) {
|
||||
license.setOnClickListener(v -> openWebBrowser(licenseLink(media)));
|
||||
if (licenseLink(media) != null) {
|
||||
license.setOnClickListener(v -> openWebBrowser(licenseLink(media)));
|
||||
} else {
|
||||
Toast toast = Toast.makeText(getContext(), getString(R.string.null_url), Toast.LENGTH_SHORT);
|
||||
toast.show();
|
||||
}
|
||||
if (media.getCoordinates() != null) {
|
||||
coordinates.setOnClickListener(v -> openMap(media.getCoordinates()));
|
||||
}
|
||||
|
|
@ -299,7 +307,13 @@ public class MediaDetailFragment extends CommonsDaggerSupportFragment {
|
|||
Intent viewIntent = new Intent();
|
||||
viewIntent.setAction(Intent.ACTION_VIEW);
|
||||
viewIntent.setData(new PageTitle(selectedCategoryTitle).getCanonicalUri());
|
||||
startActivity(viewIntent);
|
||||
//check if web browser available
|
||||
if(viewIntent.resolveActivity(getActivity().getPackageManager()) != null){
|
||||
startActivity(viewIntent);
|
||||
} else {
|
||||
Toast toast = Toast.makeText(getContext(), getString(R.string.no_web_browser), LENGTH_SHORT);
|
||||
toast.show();
|
||||
}
|
||||
});
|
||||
}
|
||||
return item;
|
||||
|
|
@ -379,7 +393,14 @@ public class MediaDetailFragment extends CommonsDaggerSupportFragment {
|
|||
|
||||
private void openWebBrowser(String url) {
|
||||
Intent browser = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
|
||||
startActivity(browser);
|
||||
//check if web browser available
|
||||
if (browser.resolveActivity(getActivity().getPackageManager()) != null) {
|
||||
startActivity(browser);
|
||||
} else {
|
||||
Toast toast = Toast.makeText(getContext(), getString(R.string.no_web_browser), LENGTH_SHORT);
|
||||
toast.show();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void openMap(LatLng coordinates) {
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ import android.view.MenuInflater;
|
|||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Toast;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Named;
|
||||
|
|
@ -40,6 +41,7 @@ import static android.Manifest.permission.READ_EXTERNAL_STORAGE;
|
|||
import static android.content.Context.DOWNLOAD_SERVICE;
|
||||
import static android.content.Intent.ACTION_VIEW;
|
||||
import static android.content.pm.PackageManager.PERMISSION_GRANTED;
|
||||
import static android.widget.Toast.LENGTH_SHORT;
|
||||
|
||||
public class MediaDetailPagerFragment extends CommonsDaggerSupportFragment implements ViewPager.OnPageChangeListener {
|
||||
|
||||
|
|
@ -118,7 +120,14 @@ public class MediaDetailPagerFragment extends CommonsDaggerSupportFragment imple
|
|||
Intent viewIntent = new Intent();
|
||||
viewIntent.setAction(ACTION_VIEW);
|
||||
viewIntent.setData(m.getFilePageTitle().getMobileUri());
|
||||
startActivity(viewIntent);
|
||||
//check if web browser available
|
||||
if(viewIntent.resolveActivity(getActivity().getPackageManager()) != null){
|
||||
startActivity(viewIntent);
|
||||
} else {
|
||||
Toast toast = Toast.makeText(getContext(), getString(R.string.no_web_browser), LENGTH_SHORT);
|
||||
toast.show();
|
||||
}
|
||||
|
||||
return true;
|
||||
case R.id.menu_download_current_image:
|
||||
// Download
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ public class ModifierSequence {
|
|||
for (PageModifier modifier: modifiers) {
|
||||
editSummary.append(modifier.getEditSumary()).append(" ");
|
||||
}
|
||||
editSummary.append("Via Commons Mobile App");
|
||||
editSummary.append("Using [[COM:MOA|Commons Mobile App]]");
|
||||
return editSummary.toString();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -54,12 +54,12 @@ public class ModifierSequenceDao {
|
|||
// Hardcoding column positions!
|
||||
ModifierSequence ms;
|
||||
try {
|
||||
ms = new ModifierSequence(Uri.parse(cursor.getString(1)),
|
||||
new JSONObject(cursor.getString(2)));
|
||||
ms = new ModifierSequence(Uri.parse(cursor.getString(cursor.getColumnIndex(Table.COLUMN_MEDIA_URI))),
|
||||
new JSONObject(cursor.getString(cursor.getColumnIndex(Table.COLUMN_DATA))));
|
||||
} catch (JSONException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
ms.setContentUri( ModificationsContentProvider.uriForId(cursor.getInt(0)));
|
||||
ms.setContentUri( ModificationsContentProvider.uriForId(cursor.getInt(cursor.getColumnIndex(Table.COLUMN_ID))));
|
||||
|
||||
return ms;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -274,7 +274,7 @@ public class NearbyActivity extends NavigationBaseActivity implements LocationUp
|
|||
LatLng lastLocation = locationManager.getLastLocation();
|
||||
if (curLatLang != null && curLatLang.equals(lastLocation)) { //refresh view only if location has changed
|
||||
if (isHardRefresh) {
|
||||
ViewUtil.showLongToast(this, R.string.nearby_location_has_not_changed);
|
||||
ViewUtil.showSnackbar(findViewById(R.id.container), R.string.nearby_location_has_not_changed);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
@ -301,9 +301,7 @@ public class NearbyActivity extends NavigationBaseActivity implements LocationUp
|
|||
String gsonCurLatLng = gson.toJson(curLatLang);
|
||||
|
||||
if (placeList.size() == 0) {
|
||||
int duration = Toast.LENGTH_SHORT;
|
||||
Toast toast = Toast.makeText(this, R.string.no_nearby, duration);
|
||||
toast.show();
|
||||
ViewUtil.showSnackbar(findViewById(R.id.container), R.string.no_nearby);
|
||||
}
|
||||
|
||||
bundle.clear();
|
||||
|
|
|
|||
|
|
@ -44,8 +44,10 @@ class PlaceRenderer extends Renderer<Place> {
|
|||
Place place = getContent();
|
||||
tvName.setText(place.name);
|
||||
String descriptionText = place.getLongDescription();
|
||||
tvDesc.setVisibility(View.VISIBLE);
|
||||
if (descriptionText.equals("?")) {
|
||||
descriptionText = getContext().getString(R.string.no_description_found);
|
||||
tvDesc.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
tvDesc.setText(descriptionText);
|
||||
distance.setText(place.distance);
|
||||
|
|
|
|||
|
|
@ -6,8 +6,10 @@ import android.content.Context;
|
|||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.widget.DividerItemDecoration;
|
||||
import android.support.v7.widget.LinearLayoutManager;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.pedrogomez.renderers.RVRendererAdapter;
|
||||
|
||||
|
|
@ -24,6 +26,8 @@ import io.reactivex.android.schedulers.AndroidSchedulers;
|
|||
import io.reactivex.schedulers.Schedulers;
|
||||
import timber.log.Timber;
|
||||
|
||||
import static android.widget.Toast.LENGTH_SHORT;
|
||||
|
||||
/**
|
||||
* Created by root on 18.12.2017.
|
||||
*/
|
||||
|
|
@ -50,8 +54,9 @@ public class NotificationActivity extends NavigationBaseActivity {
|
|||
}
|
||||
|
||||
private void initListView() {
|
||||
recyclerView = findViewById(R.id.listView);
|
||||
recyclerView.setLayoutManager(new LinearLayoutManager(this));
|
||||
DividerItemDecoration itemDecor = new DividerItemDecoration(recyclerView.getContext(), DividerItemDecoration.VERTICAL);
|
||||
recyclerView.addItemDecoration(itemDecor);
|
||||
addNotifications();
|
||||
}
|
||||
|
||||
|
|
@ -77,7 +82,14 @@ public class NotificationActivity extends NavigationBaseActivity {
|
|||
if (url == null || url.equals("")) {
|
||||
return;
|
||||
}
|
||||
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(url)));
|
||||
Intent browser = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
|
||||
//check if web browser available
|
||||
if(browser.resolveActivity(this.getPackageManager()) != null){
|
||||
startActivity(browser);
|
||||
} else {
|
||||
Toast toast = Toast.makeText(this, getString(R.string.no_web_browser), LENGTH_SHORT);
|
||||
toast.show();
|
||||
}
|
||||
}
|
||||
|
||||
private void setAdapter(List<Notification> notificationList) {
|
||||
|
|
@ -91,6 +103,7 @@ public class NotificationActivity extends NavigationBaseActivity {
|
|||
|
||||
public static void startYourself(Context context) {
|
||||
Intent intent = new Intent(context, NotificationActivity.class);
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
|
||||
context.startActivity(intent);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,13 @@
|
|||
package fr.free.nrw.commons.notification;
|
||||
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.borjabravo.readmoretextview.ReadMoreTextView;
|
||||
import com.pedrogomez.renderers.Renderer;
|
||||
|
||||
import butterknife.BindView;
|
||||
|
|
@ -17,8 +19,8 @@ import fr.free.nrw.commons.R;
|
|||
*/
|
||||
|
||||
public class NotificationRenderer extends Renderer<Notification> {
|
||||
@BindView(R.id.title) TextView title;
|
||||
@BindView(R.id.description) TextView description;
|
||||
@BindView(R.id.title) ReadMoreTextView title;
|
||||
@BindView(R.id.description) ReadMoreTextView description;
|
||||
@BindView(R.id.time) TextView time;
|
||||
@BindView(R.id.icon) ImageView icon;
|
||||
private NotificationClicked listener;
|
||||
|
|
@ -46,9 +48,13 @@ public class NotificationRenderer extends Renderer<Notification> {
|
|||
@Override
|
||||
public void render() {
|
||||
Notification notification = getContent();
|
||||
title.setText(notification.notificationText);
|
||||
StringBuilder str = new StringBuilder(notification.notificationText);
|
||||
str.append(" " );
|
||||
title.setText(str);
|
||||
time.setText(notification.date);
|
||||
description.setText(notification.description);
|
||||
StringBuilder desc = new StringBuilder(notification.description);
|
||||
desc.append(" ");
|
||||
description.setText(desc);
|
||||
switch (notification.notificationType) {
|
||||
case THANK_YOU_EDIT:
|
||||
icon.setImageResource(R.drawable.ic_edit_black_24dp);
|
||||
|
|
|
|||
|
|
@ -3,14 +3,17 @@ package fr.free.nrw.commons.settings;
|
|||
import android.Manifest;
|
||||
import android.app.AlertDialog;
|
||||
import android.content.ActivityNotFoundException;
|
||||
import android.content.ComponentName;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.pm.ResolveInfo;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.preference.CheckBoxPreference;
|
||||
import android.preference.SwitchPreference;
|
||||
import android.preference.EditTextPreference;
|
||||
import android.preference.ListPreference;
|
||||
import android.preference.Preference;
|
||||
|
|
@ -21,6 +24,8 @@ import android.support.v4.content.FileProvider;
|
|||
import android.widget.Toast;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Named;
|
||||
|
|
@ -59,7 +64,7 @@ public class SettingsFragment extends PreferenceFragment {
|
|||
return true;
|
||||
});
|
||||
|
||||
CheckBoxPreference themePreference = (CheckBoxPreference) findPreference("theme");
|
||||
SwitchPreference themePreference = (SwitchPreference) findPreference("theme");
|
||||
themePreference.setOnPreferenceChangeListener((preference, newValue) -> {
|
||||
getActivity().recreate();
|
||||
return true;
|
||||
|
|
@ -141,19 +146,24 @@ public class SettingsFragment extends PreferenceFragment {
|
|||
appLogsFile
|
||||
);
|
||||
|
||||
Intent feedbackIntent = new Intent(Intent.ACTION_SEND);
|
||||
feedbackIntent.setType("message/rfc822");
|
||||
feedbackIntent.putExtra(Intent.EXTRA_EMAIL,
|
||||
new String[]{CommonsApplication.LOGS_PRIVATE_EMAIL});
|
||||
feedbackIntent.putExtra(Intent.EXTRA_SUBJECT,
|
||||
String.format(CommonsApplication.FEEDBACK_EMAIL_SUBJECT,
|
||||
BuildConfig.VERSION_NAME));
|
||||
feedbackIntent.putExtra(Intent.EXTRA_STREAM,appLogsFilePath);
|
||||
//initialize the emailSelectorIntent
|
||||
Intent emailSelectorIntent = new Intent(Intent.ACTION_SENDTO);
|
||||
emailSelectorIntent.setData(Uri.parse("mailto:"));
|
||||
//initialize the emailIntent
|
||||
final Intent emailIntent = new Intent(Intent.ACTION_SEND);
|
||||
emailIntent.putExtra(Intent.EXTRA_EMAIL, new String[]{CommonsApplication.FEEDBACK_EMAIL});
|
||||
emailIntent.putExtra(Intent.EXTRA_SUBJECT, String.format(CommonsApplication.FEEDBACK_EMAIL_SUBJECT, BuildConfig.VERSION_NAME));
|
||||
emailIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
|
||||
emailIntent.addFlags(Intent.FLAG_GRANT_WRITE_URI_PERMISSION);
|
||||
emailIntent.setSelector( emailSelectorIntent );
|
||||
//adding the attachment to the intent
|
||||
emailIntent.putExtra(Intent.EXTRA_STREAM, appLogsFilePath);
|
||||
|
||||
try {
|
||||
startActivity(feedbackIntent);
|
||||
startActivity(Intent.createChooser(emailIntent, "Send mail.."));
|
||||
} catch (ActivityNotFoundException e) {
|
||||
Toast.makeText(getActivity(), R.string.no_email_client, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import android.accounts.AccountManager;
|
|||
import android.content.ActivityNotFoundException;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.design.widget.NavigationView;
|
||||
import android.support.v4.widget.DrawerLayout;
|
||||
|
|
@ -22,6 +23,7 @@ import fr.free.nrw.commons.AboutActivity;
|
|||
import fr.free.nrw.commons.BuildConfig;
|
||||
import fr.free.nrw.commons.CommonsApplication;
|
||||
import fr.free.nrw.commons.R;
|
||||
import fr.free.nrw.commons.Utils;
|
||||
import fr.free.nrw.commons.WelcomeActivity;
|
||||
import fr.free.nrw.commons.auth.AccountUtil;
|
||||
import fr.free.nrw.commons.auth.LoginActivity;
|
||||
|
|
@ -86,8 +88,11 @@ public abstract class NavigationBaseActivity extends BaseActivity
|
|||
|
||||
private void setDrawerPaneWidth() {
|
||||
ViewGroup.LayoutParams params = navigationView.getLayoutParams();
|
||||
// set width to lowerBound of 80% of the screen size
|
||||
params.width = (getResources().getDisplayMetrics().widthPixels * 70) / 100;
|
||||
// set width to lowerBound of 70% of the screen size in portrait mode
|
||||
// set width to lowerBound of 50% of the screen size in landscape mode
|
||||
int percentageWidth = getResources().getInteger(R.integer.drawer_width);
|
||||
|
||||
params.width = (getResources().getDisplayMetrics().widthPixels * percentageWidth) / 100;
|
||||
navigationView.setLayoutParams(params);
|
||||
}
|
||||
|
||||
|
|
@ -119,8 +124,9 @@ public abstract class NavigationBaseActivity extends BaseActivity
|
|||
return true;
|
||||
case R.id.action_feedback:
|
||||
drawerLayout.closeDrawer(navigationView);
|
||||
Intent feedbackIntent = new Intent(Intent.ACTION_SEND);
|
||||
Intent feedbackIntent = new Intent(Intent.ACTION_SENDTO);
|
||||
feedbackIntent.setType("message/rfc822");
|
||||
feedbackIntent.setData(Uri.parse("mailto:"));
|
||||
feedbackIntent.putExtra(Intent.EXTRA_EMAIL,
|
||||
new String[]{CommonsApplication.FEEDBACK_EMAIL});
|
||||
feedbackIntent.putExtra(Intent.EXTRA_SUBJECT,
|
||||
|
|
|
|||
|
|
@ -1,11 +1,13 @@
|
|||
package fr.free.nrw.commons.upload;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.AsyncTask;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.lang.ref.WeakReference;
|
||||
|
||||
import fr.free.nrw.commons.R;
|
||||
import fr.free.nrw.commons.contributions.ContributionsActivity;
|
||||
|
|
@ -28,12 +30,14 @@ public class ExistingFileAsync extends AsyncTask<Void, Void, Boolean> {
|
|||
DUPLICATE_CANCELLED
|
||||
}
|
||||
|
||||
private final WeakReference<Activity> activity;
|
||||
private final MediaWikiApi api;
|
||||
private final String fileSha1;
|
||||
private final Context context;
|
||||
private final WeakReference<Context> context;
|
||||
private final Callback callback;
|
||||
|
||||
public ExistingFileAsync(String fileSha1, Context context, Callback callback, MediaWikiApi mwApi) {
|
||||
public ExistingFileAsync(WeakReference<Activity> activity, String fileSha1, WeakReference<Context> context, Callback callback, MediaWikiApi mwApi) {
|
||||
this.activity = activity;
|
||||
this.fileSha1 = fileSha1;
|
||||
this.context = context;
|
||||
this.callback = callback;
|
||||
|
|
@ -69,19 +73,21 @@ public class ExistingFileAsync extends AsyncTask<Void, Void, Boolean> {
|
|||
// If file exists, display warning to user.
|
||||
// Use soft warning for now (user able to choose to proceed) until have determined that implementation works without bugs
|
||||
if (fileExists) {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(context);
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(context.get());
|
||||
builder.setMessage(R.string.file_exists)
|
||||
.setTitle(R.string.warning);
|
||||
builder.setPositiveButton(R.string.no, (dialog, id) -> {
|
||||
//Go back to ContributionsActivity
|
||||
Intent intent = new Intent(context, ContributionsActivity.class);
|
||||
context.startActivity(intent);
|
||||
Intent intent = new Intent(context.get(), ContributionsActivity.class);
|
||||
context.get().startActivity(intent);
|
||||
callback.onResult(Result.DUPLICATE_CANCELLED);
|
||||
});
|
||||
builder.setNegativeButton(R.string.yes, (dialog, id) -> callback.onResult(Result.DUPLICATE_PROCEED));
|
||||
|
||||
AlertDialog dialog = builder.create();
|
||||
dialog.show();
|
||||
if (!activity.get().isFinishing()) {
|
||||
dialog.show();
|
||||
}
|
||||
} else {
|
||||
callback.onResult(Result.NO_DUPLICATE);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
package fr.free.nrw.commons.upload;
|
||||
|
||||
import android.Manifest;
|
||||
import android.app.Activity;
|
||||
import android.content.ContentResolver;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
|
|
@ -32,6 +34,7 @@ import java.io.File;
|
|||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.math.BigInteger;
|
||||
import java.security.MessageDigest;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
|
|
@ -371,7 +374,7 @@ public class ShareActivity
|
|||
Timber.d("File SHA1 is: %s", fileSHA1);
|
||||
|
||||
ExistingFileAsync fileAsyncTask =
|
||||
new ExistingFileAsync(fileSHA1, this, result -> {
|
||||
new ExistingFileAsync(new WeakReference<Activity>(this), fileSHA1, new WeakReference<Context>(this), result -> {
|
||||
Timber.d("%s duplicate check: %s", mediaUri.toString(), result);
|
||||
duplicateCheckPassed = (result == DUPLICATE_PROCEED
|
||||
|| result == NO_DUPLICATE);
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import android.net.Uri;
|
|||
import android.os.Bundle;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.v4.view.ViewCompat;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
import android.text.Editable;
|
||||
import android.text.TextWatcher;
|
||||
|
|
@ -27,6 +28,7 @@ import android.widget.Button;
|
|||
import android.widget.EditText;
|
||||
import android.widget.Spinner;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
|
|
@ -64,9 +66,6 @@ public class SingleUploadFragment extends CommonsDaggerSupportFragment {
|
|||
@Override
|
||||
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
|
||||
inflater.inflate(R.menu.activity_share, menu);
|
||||
if (titleEdit != null) {
|
||||
menu.findItem(R.id.menu_upload_single).setEnabled(titleEdit.getText().length() != 0);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -75,6 +74,11 @@ public class SingleUploadFragment extends CommonsDaggerSupportFragment {
|
|||
//What happens when the 'submit' icon is tapped
|
||||
case R.id.menu_upload_single:
|
||||
|
||||
if (titleEdit.getText().toString().isEmpty()) {
|
||||
Toast.makeText(getContext(), R.string.add_title_toast, Toast.LENGTH_LONG).show();
|
||||
return false;
|
||||
}
|
||||
|
||||
String title = titleEdit.getText().toString();
|
||||
String desc = descEdit.getText().toString();
|
||||
|
||||
|
|
@ -97,6 +101,14 @@ public class SingleUploadFragment extends CommonsDaggerSupportFragment {
|
|||
View rootView = inflater.inflate(R.layout.fragment_single_upload, container, false);
|
||||
ButterKnife.bind(this, rootView);
|
||||
|
||||
Intent activityIntent = getActivity().getIntent();
|
||||
if (activityIntent.hasExtra("title")) {
|
||||
titleEdit.setText(activityIntent.getStringExtra("title"));
|
||||
}
|
||||
if (activityIntent.hasExtra("description")) {
|
||||
descEdit.setText(activityIntent.getStringExtra("description"));
|
||||
}
|
||||
|
||||
ArrayList<String> licenseItems = new ArrayList<>();
|
||||
licenseItems.add(getString(R.string.license_name_cc0));
|
||||
licenseItems.add(getString(R.string.license_name_cc_by));
|
||||
|
|
@ -228,35 +240,40 @@ public class SingleUploadFragment extends CommonsDaggerSupportFragment {
|
|||
*/
|
||||
@OnTouch(R.id.titleEdit)
|
||||
boolean titleInfo(View view, MotionEvent motionEvent) {
|
||||
//Should replace right with end to support different right-to-left languages as well
|
||||
final int value = titleEdit.getRight() - titleEdit.getCompoundDrawables()[2].getBounds().width();
|
||||
|
||||
if (motionEvent.getAction() == ACTION_UP && motionEvent.getRawX() >= value) {
|
||||
new AlertDialog.Builder(getContext())
|
||||
.setTitle(R.string.media_detail_title)
|
||||
.setMessage(R.string.title_info)
|
||||
.setCancelable(true)
|
||||
.setNeutralButton(android.R.string.ok, (dialog, id) -> dialog.cancel())
|
||||
.create()
|
||||
.show();
|
||||
return true;
|
||||
final int value;
|
||||
if (ViewCompat.getLayoutDirection(getView()) == ViewCompat.LAYOUT_DIRECTION_LTR) {
|
||||
value = titleEdit.getRight() - titleEdit.getCompoundDrawables()[2].getBounds().width();
|
||||
if (motionEvent.getAction() == ACTION_UP && motionEvent.getRawX() >= value) {
|
||||
showInfoAlert(R.string.media_detail_title, R.string.title_info);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else {
|
||||
value = titleEdit.getLeft() + titleEdit.getCompoundDrawables()[0].getBounds().width();
|
||||
if (motionEvent.getAction() == ACTION_UP && motionEvent.getRawX() <= value) {
|
||||
showInfoAlert(R.string.media_detail_title, R.string.title_info);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@OnTouch(R.id.descEdit)
|
||||
boolean descriptionInfo(View view, MotionEvent motionEvent) {
|
||||
final int value = descEdit.getRight() - descEdit.getCompoundDrawables()[2].getBounds().width();
|
||||
|
||||
if (motionEvent.getAction() == ACTION_UP && motionEvent.getRawX() >= value) {
|
||||
new AlertDialog.Builder(getContext())
|
||||
.setTitle(R.string.media_detail_description)
|
||||
.setMessage(R.string.description_info)
|
||||
.setCancelable(true)
|
||||
.setNeutralButton(android.R.string.ok, (dialog, id) -> dialog.cancel())
|
||||
.create()
|
||||
.show();
|
||||
return true;
|
||||
final int value;
|
||||
if (ViewCompat.getLayoutDirection(getView()) == ViewCompat.LAYOUT_DIRECTION_LTR) {
|
||||
value = descEdit.getRight() - descEdit.getCompoundDrawables()[2].getBounds().width();
|
||||
if (motionEvent.getAction() == ACTION_UP && motionEvent.getRawX() >= value) {
|
||||
showInfoAlert(R.string.media_detail_description,R.string.description_info);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else{
|
||||
value = descEdit.getLeft() + descEdit.getCompoundDrawables()[0].getBounds().width();
|
||||
if (motionEvent.getAction() == ACTION_UP && motionEvent.getRawX() <= value) {
|
||||
showInfoAlert(R.string.media_detail_description,R.string.description_info);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
@ -321,4 +338,14 @@ public class SingleUploadFragment extends CommonsDaggerSupportFragment {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void showInfoAlert (int titleStringID, int messageStringID){
|
||||
new AlertDialog.Builder(getContext())
|
||||
.setTitle(titleStringID)
|
||||
.setMessage(messageStringID)
|
||||
.setCancelable(true)
|
||||
.setNeutralButton(android.R.string.ok, (dialog, id) -> dialog.cancel())
|
||||
.create()
|
||||
.show();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
package fr.free.nrw.commons.utils;
|
||||
|
||||
import android.content.Context;
|
||||
import android.support.annotation.StringRes;
|
||||
import android.widget.Toast;
|
||||
import android.support.design.widget.Snackbar;
|
||||
import android.view.View;
|
||||
|
||||
public class ViewUtil {
|
||||
|
||||
public static void showLongToast(final Context context, @StringRes final int stringResId) {
|
||||
ExecutorUtils.uiExecutor().execute(() -> Toast.makeText(context, context.getString(stringResId), Toast.LENGTH_LONG).show());
|
||||
public static void showSnackbar(View view, int messageResourceId) {
|
||||
Snackbar.make(view, messageResourceId, Snackbar.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
9
app/src/main/res/drawable/ic_help_black_24dp.xml
Normal file
9
app/src/main/res/drawable/ic_help_black_24dp.xml
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM13,19h-2v-2h2v2zM15.07,11.25l-0.9,0.92C13.45,12.9 13,13.5 13,15h-2v-0.5c0,-1.1 0.45,-2.1 1.17,-2.83l1.24,-1.26c0.37,-0.36 0.59,-0.86 0.59,-1.41 0,-1.1 -0.9,-2 -2,-2s-2,0.9 -2,2L8,9c0,-2.21 1.79,-4 4,-4s4,1.79 4,4c0,0.88 -0.36,1.68 -0.93,2.25z"/>
|
||||
</vector>
|
||||
|
|
@ -13,12 +13,12 @@
|
|||
<android.support.v7.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/large_gap"
|
||||
android:layout_marginBottom="@dimen/standard_gap"
|
||||
android:layout_marginEnd="@dimen/standard_gap"
|
||||
android:layout_marginLeft="@dimen/standard_gap"
|
||||
android:layout_marginRight="@dimen/standard_gap"
|
||||
android:layout_marginStart="@dimen/standard_gap"
|
||||
android:layout_marginTop="@dimen/large_gap"
|
||||
app:cardCornerRadius="4dp"
|
||||
app:cardElevation="4dp">
|
||||
|
||||
|
|
@ -40,11 +40,26 @@
|
|||
android:textColor="@android:color/white"
|
||||
android:textSize="@dimen/heading_text_size" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/login_credentials"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/title"
|
||||
android:layout_marginEnd="@dimen/standard_gap"
|
||||
android:layout_marginLeft="@dimen/standard_gap"
|
||||
android:layout_marginRight="@dimen/standard_gap"
|
||||
android:layout_marginStart="@dimen/standard_gap"
|
||||
android:paddingBottom="@dimen/standard_gap"
|
||||
android:paddingTop="@dimen/small_gap"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@color/secondaryDarkColor"
|
||||
tools:text="@string/login_credential" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/error_message_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/title"
|
||||
android:layout_below="@id/login_credentials"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
|
|
@ -56,6 +71,7 @@
|
|||
android:layout_marginLeft="@dimen/standard_gap"
|
||||
android:layout_marginRight="@dimen/standard_gap"
|
||||
android:layout_marginStart="@dimen/standard_gap"
|
||||
android:gravity="center"
|
||||
android:paddingBottom="@dimen/small_gap"
|
||||
android:paddingTop="@dimen/small_gap"
|
||||
android:textColor="@color/secondaryDarkColor"
|
||||
|
|
@ -98,7 +114,7 @@
|
|||
android:layout_marginLeft="@dimen/standard_gap"
|
||||
android:layout_marginRight="@dimen/standard_gap"
|
||||
android:layout_marginStart="@dimen/standard_gap"
|
||||
app:passwordToggleEnabled="false">
|
||||
app:passwordToggleEnabled="true">
|
||||
|
||||
<android.support.design.widget.TextInputEditText
|
||||
android:id="@+id/loginPassword"
|
||||
|
|
@ -149,8 +165,8 @@
|
|||
|
||||
<Button
|
||||
android:id="@+id/signupButton"
|
||||
android:layout_width="0dp"
|
||||
style="@style/Widget.AppCompat.Button.Borderless.Colored"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginEnd="@dimen/small_gap"
|
||||
|
|
@ -160,8 +176,8 @@
|
|||
|
||||
<Button
|
||||
android:id="@+id/loginButton"
|
||||
android:layout_width="0dp"
|
||||
style="@style/Widget.AppCompat.Button.Colored"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/small_gap"
|
||||
android:layout_marginStart="@dimen/small_gap"
|
||||
|
|
@ -171,16 +187,27 @@
|
|||
|
||||
</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
|
||||
android:id="@+id/about_privacy_policy"
|
||||
style="?android:textAppearanceSmall"
|
||||
android:layout_below="@id/buttonFrame"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/standard_gap"
|
||||
android:layout_below="@id/forgotPassword"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:text="@string/about_privacy_policy"
|
||||
android:layout_centerHorizontal="true"/>
|
||||
android:layout_marginBottom="@dimen/standard_gap"
|
||||
android:text="@string/about_privacy_policy" />
|
||||
|
||||
</RelativeLayout>
|
||||
</android.support.v7.widget.CardView>
|
||||
|
|
@ -188,19 +215,19 @@
|
|||
<android.support.v7.widget.AppCompatImageView
|
||||
android:layout_width="64dp"
|
||||
android:layout_height="64dp"
|
||||
android:elevation="8dp"
|
||||
tools:ignore="UnusedAttribute"
|
||||
android:layout_gravity="center_horizontal"
|
||||
app:srcCompat="@drawable/blue_rinse_circle" />
|
||||
android:elevation="8dp"
|
||||
app:srcCompat="@drawable/blue_rinse_circle"
|
||||
tools:ignore="UnusedAttribute" />
|
||||
|
||||
<android.support.v7.widget.AppCompatImageView
|
||||
android:layout_width="42dp"
|
||||
tools:ignore="UnusedAttribute"
|
||||
android:layout_height="42dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="8dp"
|
||||
android:elevation="8dp"
|
||||
app:srcCompat="@drawable/commons_logo_large" />
|
||||
app:srcCompat="@drawable/commons_logo_large"
|
||||
tools:ignore="UnusedAttribute" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,88 +1,189 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#0c609c"
|
||||
android:gravity="center">
|
||||
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="#0c609c"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/welcomeYesButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/overflow_button_dimen"
|
||||
android:layout_marginEnd="@dimen/standard_gap"
|
||||
android:layout_marginRight="@dimen/standard_gap"
|
||||
android:layout_marginTop="@dimen/standard_gap"
|
||||
android:text="@string/welcome_skip_button"
|
||||
android:textColor="#fff"
|
||||
android:textSize="@dimen/normal_text"
|
||||
android:textStyle="bold"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<android.support.constraint.Guideline
|
||||
android:id="@+id/center_guideline"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.55" />
|
||||
|
||||
<GridLayout
|
||||
android:layout_width="300dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginEnd="@dimen/standard_gap"
|
||||
android:layout_marginRight="@dimen/standard_gap"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:columnCount="2"
|
||||
>
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/center_guideline">
|
||||
|
||||
<ImageView
|
||||
android:src="@drawable/mount_zao"
|
||||
android:id="@+id/mount_zao"
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="118dp"
|
||||
android:scaleType="fitXY"
|
||||
android:contentDescription="@string/welcome_image_mount_zao"
|
||||
/>
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/mount_zao" />
|
||||
|
||||
<ImageView
|
||||
android:src="@drawable/llamas"
|
||||
android:id="@+id/llamas"
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="118dp"
|
||||
android:scaleType="fitXY"
|
||||
android:contentDescription="@string/welcome_image_llamas"
|
||||
/>
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/llamas" />
|
||||
|
||||
<ImageView
|
||||
android:src="@drawable/rainbow_bridge"
|
||||
android:id="@+id/rainbow_bridge"
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="118dp"
|
||||
android:scaleType="fitXY"
|
||||
android:contentDescription="@string/welcome_image_rainbow_bridge"
|
||||
/>
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/rainbow_bridge" />
|
||||
|
||||
<ImageView
|
||||
android:src="@drawable/tulip"
|
||||
android:id="@+id/tulip"
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="118dp"
|
||||
android:scaleType="fitXY"
|
||||
android:contentDescription="@string/welcome_image_tulip"
|
||||
/>
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/tulip" />
|
||||
|
||||
</GridLayout>
|
||||
|
||||
|
||||
<LinearLayout android:orientation="vertical"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical"
|
||||
>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxWidth="240dp"
|
||||
android:text="@string/tutorial_2_text"
|
||||
android:layout_gravity="center"
|
||||
android:textStyle="bold"
|
||||
android:textSize="@dimen/normal_text"
|
||||
android:textAlignment="center"
|
||||
android:gravity="center_horizontal"
|
||||
android:textColor="@android:color/white"/>
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginStart="@dimen/standard_gap"
|
||||
android:layout_marginLeft="@dimen/standard_gap"
|
||||
app:layout_constraintStart_toEndOf="@id/center_guideline"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center_horizontal"
|
||||
android:maxWidth="240dp"
|
||||
android:text="@string/tutorial_2_text"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="@dimen/normal_text"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:maxWidth="240dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxWidth="240dp"
|
||||
android:text="@string/tutorial_2_subtext"
|
||||
android:layout_gravity="center"
|
||||
android:textAlignment="textStart"
|
||||
android:paddingRight="4dp"
|
||||
android:paddingTop="@dimen/standard_gap"
|
||||
android:gravity="start"
|
||||
android:text="@string/bullet"
|
||||
android:textColor="@android:color/white"
|
||||
/>
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="start"
|
||||
android:maxWidth="240dp"
|
||||
android:paddingTop="@dimen/standard_gap"
|
||||
android:text="@string/tutorial_2_subtext_1"
|
||||
android:textAlignment="textStart"
|
||||
android:textColor="@android:color/white" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:maxWidth="240dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingRight="4dp"
|
||||
android:text="@string/bullet"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="start"
|
||||
android:maxWidth="240dp"
|
||||
android:text="@string/tutorial_2_subtext_2"
|
||||
android:textAlignment="textStart"
|
||||
android:textColor="@android:color/white" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:maxWidth="240dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingRight="4dp"
|
||||
android:text="@string/bullet"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="start"
|
||||
android:maxWidth="240dp"
|
||||
android:text="@string/tutorial_2_subtext_3"
|
||||
android:textAlignment="textStart"
|
||||
android:textColor="@android:color/white" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</android.support.constraint.ConstraintLayout>
|
||||
|
|
|
|||
|
|
@ -1,70 +1,164 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="horizontal"
|
||||
<android.support.constraint.ConstraintLayout 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"
|
||||
>
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="#0c609c">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_gravity="center"
|
||||
android:layout_width="240dp"
|
||||
android:layout_height="wrap_content"
|
||||
<TextView
|
||||
android:id="@+id/welcomeYesButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/overflow_button_dimen"
|
||||
android:layout_marginEnd="@dimen/standard_gap"
|
||||
android:layout_marginRight="@dimen/standard_gap"
|
||||
>
|
||||
android:layout_marginTop="@dimen/standard_gap"
|
||||
android:text="@string/welcome_skip_button"
|
||||
android:textColor="#fff"
|
||||
android:textSize="@dimen/normal_text"
|
||||
android:textStyle="bold"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<android.support.constraint.Guideline
|
||||
android:id="@+id/center_guideline"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.50" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="240dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/center_guideline"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_marginEnd="@dimen/standard_gap"
|
||||
android:layout_marginRight="@dimen/standard_gap">
|
||||
|
||||
<ImageView
|
||||
android:src="@drawable/selfie_x"
|
||||
android:id="@+id/selfie_x"
|
||||
android:layout_width="110dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:contentDescription="@string/welcome_image_no_selfies"
|
||||
/>
|
||||
android:src="@drawable/selfie_x" />
|
||||
|
||||
<ImageView
|
||||
android:src="@drawable/proprietary_x"
|
||||
android:id="@+id/proprietary_x"
|
||||
android:layout_marginStart="@dimen/standard_gap"
|
||||
android:layout_marginLeft="@dimen/standard_gap"
|
||||
android:layout_width="110dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_toRightOf="@+id/selfie_x"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/standard_gap"
|
||||
android:layout_marginStart="@dimen/standard_gap"
|
||||
android:contentDescription="@string/welcome_image_proprietary"
|
||||
/>
|
||||
android:src="@drawable/proprietary_x" />
|
||||
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout android:orientation="vertical"
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical"
|
||||
>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxWidth="240dp"
|
||||
android:text="@string/tutorial_3_text"
|
||||
android:layout_gravity="center"
|
||||
android:textStyle="bold"
|
||||
android:textAlignment="center"
|
||||
android:textSize="@dimen/normal_text"
|
||||
android:gravity="center_horizontal"
|
||||
android:textColor="@android:color/white"/>
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/center_guideline"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxWidth="240dp"
|
||||
android:text="@string/tutorial_3_subtext"
|
||||
android:layout_gravity="center"
|
||||
android:textAlignment="textStart"
|
||||
android:paddingTop="@dimen/standard_gap"
|
||||
android:gravity="start"
|
||||
android:gravity="center_horizontal"
|
||||
android:maxWidth="240dp"
|
||||
android:text="@string/tutorial_3_text"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@android:color/white"
|
||||
/>
|
||||
android:textSize="@dimen/normal_text"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxWidth="240dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingRight="4dp"
|
||||
android:paddingTop="@dimen/standard_gap"
|
||||
android:text="@string/bullet"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="start"
|
||||
android:maxWidth="240dp"
|
||||
android:paddingTop="@dimen/standard_gap"
|
||||
android:text="@string/tutorial_3_subtext_1"
|
||||
android:textAlignment="textStart"
|
||||
android:textColor="@android:color/white" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:maxWidth="240dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingRight="4dp"
|
||||
android:text="@string/bullet"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="start"
|
||||
android:maxWidth="240dp"
|
||||
android:text="@string/tutorial_3_subtext_2"
|
||||
android:textAlignment="textStart"
|
||||
android:textColor="@android:color/white" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxWidth="240dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingRight="4dp"
|
||||
android:text="@string/bullet"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="start"
|
||||
android:maxWidth="240dp"
|
||||
android:text="@string/tutorial_3_subtext_3"
|
||||
android:textAlignment="textStart"
|
||||
android:textColor="@android:color/white" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</android.support.constraint.ConstraintLayout>
|
||||
|
|
|
|||
|
|
@ -1,53 +1,153 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="horizontal"
|
||||
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#0c609c"
|
||||
android:gravity="center"
|
||||
>
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
<TextView
|
||||
android:id="@+id/welcomeYesButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/sydney_opera_house"
|
||||
android:paddingLeft="@dimen/large_gap"
|
||||
android:paddingRight="@dimen/standard_gap"
|
||||
android:paddingTop="@dimen/large_gap"
|
||||
android:paddingBottom="@dimen/large_gap"
|
||||
android:adjustViewBounds="true"
|
||||
android:layout_gravity="center"
|
||||
android:contentDescription="@string/welcome_image_sydney_opera_house"
|
||||
/>
|
||||
android:layout_height="@dimen/overflow_button_dimen"
|
||||
android:layout_marginEnd="@dimen/standard_gap"
|
||||
android:layout_marginRight="@dimen/standard_gap"
|
||||
android:layout_marginTop="@dimen/standard_gap"
|
||||
android:text="@string/welcome_skip_button"
|
||||
android:textColor="#fff"
|
||||
android:textSize="@dimen/normal_text"
|
||||
android:textStyle="bold"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<LinearLayout android:orientation="vertical"
|
||||
<android.support.constraint.Guideline
|
||||
android:id="@+id/center_guideline"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical"
|
||||
>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxWidth="240dp"
|
||||
android:text="@string/tutorial_4_text"
|
||||
android:layout_gravity="center"
|
||||
android:textStyle="bold"
|
||||
android:textAlignment="center"
|
||||
android:textSize="@dimen/normal_text"
|
||||
android:gravity="center_horizontal"
|
||||
android:textColor="@android:color/white"/>
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.60" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="370dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:adjustViewBounds="true"
|
||||
android:contentDescription="@string/welcome_image_sydney_opera_house"
|
||||
android:paddingBottom="@dimen/large_gap"
|
||||
android:paddingLeft="@dimen/tiny_gap"
|
||||
android:paddingStart="@dimen/tiny_gap"
|
||||
android:paddingRight="@dimen/standard_gap"
|
||||
android:paddingEnd="@dimen/standard_gap"
|
||||
android:paddingTop="@dimen/large_gap"
|
||||
android:src="@drawable/sydney_opera_house"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/center_guideline"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_marginEnd="@dimen/standard_gap"
|
||||
android:layout_marginRight="@dimen/standard_gap"
|
||||
app:layout_constraintStart_toEndOf="@id/center_guideline"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxWidth="240dp"
|
||||
android:text="@string/tutorial_4_subtext"
|
||||
android:layout_gravity="center"
|
||||
android:textAlignment="textStart"
|
||||
android:paddingTop="@dimen/standard_gap"
|
||||
android:gravity="start"
|
||||
android:gravity="center_horizontal"
|
||||
android:maxWidth="240dp"
|
||||
android:text="@string/tutorial_4_text"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@android:color/white"
|
||||
/>
|
||||
android:textSize="@dimen/normal_text"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxWidth="240dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingRight="4dp"
|
||||
android:paddingTop="@dimen/standard_gap"
|
||||
android:text="@string/bullet"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="start"
|
||||
android:maxWidth="240dp"
|
||||
android:paddingTop="@dimen/standard_gap"
|
||||
android:text="@string/tutorial_4_subtext_1"
|
||||
android:textAlignment="textStart"
|
||||
android:textColor="@android:color/white" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxWidth="240dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingRight="4dp"
|
||||
android:text="@string/bullet"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="start"
|
||||
android:maxWidth="240dp"
|
||||
android:text="@string/tutorial_4_subtext_2"
|
||||
android:textAlignment="textStart"
|
||||
android:textColor="@android:color/white" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxWidth="240dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingRight="4dp"
|
||||
android:text="@string/bullet"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="start"
|
||||
android:maxWidth="240dp"
|
||||
android:text="@string/tutorial_4_subtext_3"
|
||||
android:textAlignment="textStart"
|
||||
android:textColor="@android:color/white" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</android.support.constraint.ConstraintLayout>
|
||||
|
|
|
|||
|
|
@ -1,51 +1,76 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#0c609c"
|
||||
android:gravity="center"
|
||||
>
|
||||
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#0c609c">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/welcomeYesButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/overflow_button_dimen"
|
||||
android:layout_marginEnd="@dimen/standard_gap"
|
||||
android:layout_marginRight="@dimen/standard_gap"
|
||||
android:layout_marginTop="@dimen/standard_gap"
|
||||
android:text="@string/welcome_skip_button"
|
||||
android:textColor="#fff"
|
||||
android:textSize="@dimen/normal_text"
|
||||
android:textStyle="bold"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<android.support.constraint.Guideline
|
||||
android:id="@+id/center_guideline"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.50" />
|
||||
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/standard_gap"
|
||||
android:layout_marginRight="@dimen/standard_gap"
|
||||
android:adjustViewBounds="true"
|
||||
android:contentDescription="@string/welcome_image_welcome_wikipedia"
|
||||
android:src="@drawable/welcome_wikipedia"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/center_guideline"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/standard_gap"
|
||||
android:layout_marginStart="@dimen/standard_gap"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/center_guideline"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:maxWidth="240dp"
|
||||
android:text="@string/tutorial_1_text"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="@dimen/normal_text"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/welcome_wikipedia"
|
||||
android:layout_marginEnd="@dimen/standard_gap"
|
||||
android:layout_marginRight="@dimen/standard_gap"
|
||||
android:adjustViewBounds="true"
|
||||
android:contentDescription="@string/welcome_image_welcome_wikipedia"
|
||||
/>
|
||||
|
||||
<LinearLayout android:orientation="vertical"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical"
|
||||
>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxWidth="240dp"
|
||||
android:text="@string/tutorial_1_text"
|
||||
android:layout_gravity="center"
|
||||
android:textStyle="bold"
|
||||
android:textSize="@dimen/normal_text"
|
||||
android:textAlignment="center"
|
||||
android:gravity="center_horizontal"
|
||||
android:textColor="@android:color/white"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxWidth="240dp"
|
||||
android:text="@string/tutorial_1_subtext"
|
||||
android:layout_gravity="center"
|
||||
android:textAlignment="center"
|
||||
android:paddingTop="@dimen/standard_gap"
|
||||
android:gravity="center_horizontal"
|
||||
android:textColor="@android:color/white"
|
||||
/>
|
||||
android:maxWidth="240dp"
|
||||
android:paddingTop="@dimen/standard_gap"
|
||||
android:text="@string/tutorial_1_subtext"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@android:color/white" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</android.support.constraint.ConstraintLayout>
|
||||
|
|
|
|||
|
|
@ -13,12 +13,12 @@
|
|||
<android.support.v7.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/large_gap"
|
||||
android:layout_marginBottom="@dimen/standard_gap"
|
||||
android:layout_marginEnd="@dimen/standard_gap"
|
||||
android:layout_marginLeft="@dimen/standard_gap"
|
||||
android:layout_marginRight="@dimen/standard_gap"
|
||||
android:layout_marginStart="@dimen/standard_gap"
|
||||
android:layout_marginTop="@dimen/large_gap"
|
||||
app:cardCornerRadius="4dp"
|
||||
app:cardElevation="4dp">
|
||||
|
||||
|
|
@ -40,6 +40,21 @@
|
|||
android:textColor="@android:color/white"
|
||||
android:textSize="@dimen/heading_text_size" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/login_credentials"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/title"
|
||||
android:layout_marginEnd="@dimen/standard_gap"
|
||||
android:layout_marginLeft="@dimen/standard_gap"
|
||||
android:layout_marginRight="@dimen/standard_gap"
|
||||
android:layout_marginStart="@dimen/standard_gap"
|
||||
android:paddingBottom="@dimen/small_gap"
|
||||
android:paddingTop="@dimen/small_gap"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@color/secondaryDarkColor"
|
||||
tools:text="@string/login_credential" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/error_message_container"
|
||||
android:layout_width="match_parent"
|
||||
|
|
@ -56,6 +71,7 @@
|
|||
android:layout_marginLeft="@dimen/standard_gap"
|
||||
android:layout_marginRight="@dimen/standard_gap"
|
||||
android:layout_marginStart="@dimen/standard_gap"
|
||||
android:gravity="center"
|
||||
android:paddingBottom="@dimen/small_gap"
|
||||
android:paddingTop="@dimen/small_gap"
|
||||
android:textColor="@color/secondaryDarkColor"
|
||||
|
|
@ -121,7 +137,7 @@
|
|||
android:layout_marginRight="@dimen/standard_gap"
|
||||
android:layout_marginStart="@dimen/standard_gap"
|
||||
android:visibility="gone"
|
||||
app:passwordToggleEnabled="false"
|
||||
app:passwordToggleEnabled="true"
|
||||
tools:visibility="visible">
|
||||
|
||||
<android.support.design.widget.TextInputEditText
|
||||
|
|
@ -149,8 +165,8 @@
|
|||
|
||||
<Button
|
||||
android:id="@+id/signupButton"
|
||||
android:layout_width="0dp"
|
||||
style="@style/Widget.AppCompat.Button.Borderless.Colored"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginEnd="@dimen/small_gap"
|
||||
|
|
@ -160,8 +176,8 @@
|
|||
|
||||
<Button
|
||||
android:id="@+id/loginButton"
|
||||
android:layout_width="0dp"
|
||||
style="@style/Widget.AppCompat.Button.Colored"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/small_gap"
|
||||
android:layout_marginStart="@dimen/small_gap"
|
||||
|
|
@ -171,16 +187,27 @@
|
|||
|
||||
</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
|
||||
android:id="@+id/about_privacy_policy"
|
||||
style="?android:textAppearanceSmall"
|
||||
android:layout_below="@id/buttonFrame"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/standard_gap"
|
||||
android:layout_below="@id/forgotPassword"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:text="@string/about_privacy_policy"
|
||||
android:layout_centerHorizontal="true"/>
|
||||
android:layout_marginBottom="@dimen/standard_gap"
|
||||
android:text="@string/about_privacy_policy" />
|
||||
|
||||
</RelativeLayout>
|
||||
</android.support.v7.widget.CardView>
|
||||
|
|
@ -188,8 +215,8 @@
|
|||
<android.support.v7.widget.AppCompatImageView
|
||||
android:layout_width="64dp"
|
||||
android:layout_height="64dp"
|
||||
android:elevation="8dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:elevation="8dp"
|
||||
app:srcCompat="@drawable/blue_rinse_circle"
|
||||
tools:ignore="UnusedAttribute" />
|
||||
|
||||
|
|
@ -198,9 +225,9 @@
|
|||
android:layout_height="42dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="8dp"
|
||||
tools:ignore="UnusedAttribute"
|
||||
android:elevation="8dp"
|
||||
app:srcCompat="@drawable/commons_logo_large" />
|
||||
app:srcCompat="@drawable/commons_logo_large"
|
||||
tools:ignore="UnusedAttribute" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
|
|
|
|||
|
|
@ -5,113 +5,122 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<RelativeLayout
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<include
|
||||
android:id="@+id/toolbar"
|
||||
layout="@layout/toolbar"
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@id/toolbar"
|
||||
android:layout_marginLeft="@dimen/activity_margin_horizontal"
|
||||
android:layout_marginStart="@dimen/activity_margin_horizontal"
|
||||
android:layout_marginRight="@dimen/activity_margin_horizontal"
|
||||
android:layout_marginEnd="@dimen/activity_margin_horizontal"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_launcher"
|
||||
android:contentDescription= "@string/commons_logo"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
style="?android:textAppearanceLarge"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/app_name" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/about_version"
|
||||
android:layout_width="wrap_content"
|
||||
<include
|
||||
android:id="@+id/toolbar"
|
||||
layout="@layout/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<fr.free.nrw.commons.ui.widget.HtmlTextView
|
||||
android:id="@+id/about_license"
|
||||
style="?android:textAppearanceSmall"
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@id/toolbar"
|
||||
android:layout_marginEnd="@dimen/activity_margin_horizontal"
|
||||
android:layout_marginLeft="@dimen/activity_margin_horizontal"
|
||||
android:layout_marginRight="@dimen/activity_margin_horizontal"
|
||||
android:layout_marginStart="@dimen/activity_margin_horizontal"
|
||||
android:layout_marginTop="@dimen/activity_margin_vertical"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:contentDescription="@string/commons_logo"
|
||||
android:src="@drawable/ic_launcher" />
|
||||
|
||||
<TextView
|
||||
style="?android:textAppearanceLarge"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/app_name" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/about_version"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<fr.free.nrw.commons.ui.widget.HtmlTextView
|
||||
android:id="@+id/about_license"
|
||||
style="?android:textAppearanceSmall"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/standard_gap"
|
||||
android:gravity="center"
|
||||
android:text="@string/about_license" />
|
||||
|
||||
<fr.free.nrw.commons.ui.widget.HtmlTextView
|
||||
android:id="@+id/about_improve"
|
||||
style="?android:textAppearanceSmall"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/small_gap"
|
||||
android:gravity="center"
|
||||
android:text="@string/about_improve" />
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/activity_margin_horizontal"
|
||||
android:layout_marginLeft="@dimen/activity_margin_horizontal"
|
||||
android:layout_marginRight="@dimen/activity_margin_horizontal"
|
||||
android:layout_marginStart="@dimen/activity_margin_horizontal"
|
||||
android:layout_marginTop="@dimen/activity_margin_horizontal"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/website_launch_icon"
|
||||
android:layout_width="@dimen/overflow_icon_dimen"
|
||||
android:layout_height="@dimen/overflow_icon_dimen"
|
||||
android:layout_margin="@dimen/activity_margin_horizontal"
|
||||
android:contentDescription="@string/commons_website"
|
||||
app:srcCompat="@drawable/ic_action_website" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/facebook_launch_icon"
|
||||
android:layout_width="@dimen/overflow_icon_dimen"
|
||||
android:layout_height="@dimen/overflow_icon_dimen"
|
||||
android:layout_margin="@dimen/activity_margin_horizontal"
|
||||
android:contentDescription="@string/commons_facebook"
|
||||
app:srcCompat="@drawable/ic_action_facebook" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/github_launch_icon"
|
||||
android:layout_width="@dimen/overflow_icon_dimen"
|
||||
android:layout_height="@dimen/overflow_icon_dimen"
|
||||
android:layout_margin="@dimen/activity_margin_horizontal"
|
||||
android:contentDescription="@string/commons_github"
|
||||
app:srcCompat="@drawable/ic_action_github" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/about_rate_us"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/standard_gap"
|
||||
android:gravity="center"
|
||||
android:text="@string/about_license" />
|
||||
|
||||
<fr.free.nrw.commons.ui.widget.HtmlTextView
|
||||
android:id="@+id/about_improve"
|
||||
style="?android:textAppearanceSmall"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/small_gap"
|
||||
android:gravity="center"
|
||||
android:text="@string/about_improve" />
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginLeft="@dimen/activity_margin_horizontal"
|
||||
android:layout_marginStart="@dimen/activity_margin_horizontal"
|
||||
android:layout_marginRight="@dimen/activity_margin_horizontal"
|
||||
android:layout_marginTop="@dimen/activity_margin_horizontal"
|
||||
android:layout_marginEnd="@dimen/activity_margin_horizontal"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/website_launch_icon"
|
||||
android:layout_width="@dimen/overflow_icon_dimen"
|
||||
android:layout_height="@dimen/overflow_icon_dimen"
|
||||
app:srcCompat="@drawable/ic_action_website"
|
||||
android:contentDescription= "@string/commons_website"
|
||||
android:layout_margin="@dimen/activity_margin_horizontal"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/facebook_launch_icon"
|
||||
android:layout_width="@dimen/overflow_icon_dimen"
|
||||
android:layout_height="@dimen/overflow_icon_dimen"
|
||||
app:srcCompat="@drawable/ic_action_facebook"
|
||||
android:contentDescription= "@string/commons_facebook"
|
||||
android:layout_margin="@dimen/activity_margin_horizontal"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/github_launch_icon"
|
||||
android:layout_width="@dimen/overflow_icon_dimen"
|
||||
android:layout_height="@dimen/overflow_icon_dimen"
|
||||
app:srcCompat="@drawable/ic_action_github"
|
||||
android:contentDescription= "@string/commons_github"
|
||||
android:layout_margin="@dimen/activity_margin_horizontal"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
android:textColor="@color/primaryColor"
|
||||
android:text="@string/about_rate_us" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/about_privacy_policy"
|
||||
style="?android:textAppearanceSmall"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/standard_gap"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/primaryColor"
|
||||
android:gravity="center"
|
||||
android:text="@string/about_privacy_policy" />
|
||||
|
||||
<TextView
|
||||
|
|
@ -119,10 +128,19 @@
|
|||
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"
|
||||
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:text="@string/about_credits"
|
||||
android:layout_marginTop="@dimen/standard_gap"
|
||||
android:gravity="center"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
|
|
@ -135,7 +153,8 @@
|
|||
android:gravity="center" />
|
||||
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
</ScrollView>
|
||||
|
||||
<android.support.design.widget.NavigationView
|
||||
android:id="@+id/navigation_view"
|
||||
|
|
@ -143,6 +162,6 @@
|
|||
android:layout_height="match_parent"
|
||||
android:layout_gravity="start"
|
||||
app:headerLayout="@layout/drawer_header"
|
||||
app:menu="@menu/drawer"/>
|
||||
app:menu="@menu/drawer" />
|
||||
|
||||
</android.support.v4.widget.DrawerLayout>
|
||||
|
|
@ -2,12 +2,17 @@
|
|||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:fillViewport="true"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
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.support.v7.widget.CardView
|
||||
|
|
@ -44,20 +49,20 @@
|
|||
android:textColor="@android:color/white"
|
||||
android:textSize="@dimen/heading_text_size" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/login_credentials"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/title"
|
||||
android:layout_marginEnd="@dimen/standard_gap"
|
||||
android:layout_marginLeft="@dimen/standard_gap"
|
||||
android:layout_marginRight="@dimen/standard_gap"
|
||||
android:layout_marginStart="@dimen/standard_gap"
|
||||
android:paddingBottom="@dimen/small_gap"
|
||||
android:paddingTop="@dimen/small_gap"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@color/secondaryDarkColor"
|
||||
tools:text="@string/login_credential"/>
|
||||
<TextView
|
||||
android:id="@+id/login_credentials"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/title"
|
||||
android:layout_marginEnd="@dimen/standard_gap"
|
||||
android:layout_marginLeft="@dimen/standard_gap"
|
||||
android:layout_marginRight="@dimen/standard_gap"
|
||||
android:layout_marginStart="@dimen/standard_gap"
|
||||
android:paddingBottom="@dimen/small_gap"
|
||||
android:paddingTop="@dimen/small_gap"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@color/secondaryDarkColor"
|
||||
tools:text="@string/login_credential" />
|
||||
|
||||
|
||||
<FrameLayout
|
||||
|
|
@ -67,6 +72,7 @@
|
|||
android:layout_below="@id/login_credentials"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/error_message"
|
||||
android:layout_width="match_parent"
|
||||
|
|
@ -75,6 +81,7 @@
|
|||
android:layout_marginLeft="@dimen/standard_gap"
|
||||
android:layout_marginRight="@dimen/standard_gap"
|
||||
android:layout_marginStart="@dimen/standard_gap"
|
||||
android:gravity="center"
|
||||
android:paddingBottom="@dimen/small_gap"
|
||||
android:paddingTop="@dimen/small_gap"
|
||||
android:textColor="@color/secondaryDarkColor"
|
||||
|
|
@ -117,7 +124,7 @@
|
|||
android:layout_marginLeft="@dimen/standard_gap"
|
||||
android:layout_marginRight="@dimen/standard_gap"
|
||||
android:layout_marginStart="@dimen/standard_gap"
|
||||
app:passwordToggleEnabled="false">
|
||||
app:passwordToggleEnabled="true">
|
||||
|
||||
<android.support.design.widget.TextInputEditText
|
||||
android:id="@+id/loginPassword"
|
||||
|
|
@ -191,17 +198,17 @@
|
|||
</LinearLayout>
|
||||
|
||||
<fr.free.nrw.commons.ui.widget.HtmlTextView
|
||||
android:id="@+id/about_privacy_policy"
|
||||
style="?android:textAppearanceSmall"
|
||||
android:layout_width="wrap_content"
|
||||
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_centerHorizontal="true"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginBottom="@dimen/standard_gap"
|
||||
android:text="@string/about_privacy_policy" />
|
||||
android:text="@string/forgot_password" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</android.support.v7.widget.CardView>
|
||||
|
||||
<android.support.v7.widget.AppCompatImageView
|
||||
|
|
@ -220,7 +227,19 @@
|
|||
android:elevation="8dp"
|
||||
app:srcCompat="@drawable/commons_logo_large"
|
||||
tools:ignore="UnusedAttribute" />
|
||||
|
||||
</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>
|
||||
|
|
|
|||
|
|
@ -21,9 +21,4 @@
|
|||
app:drawableStart="@drawable/ic_info_outline_white_24dp"
|
||||
/>
|
||||
|
||||
<fr.free.nrw.commons.media.MediaDetailSpacer
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/small_gap"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
|
|
|||
|
|
@ -25,21 +25,23 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/categories_search_text_hint"
|
||||
android:imeOptions="flagNoExtractUi"
|
||||
android:maxLines="1"
|
||||
android:gravity="left"
|
||||
android:inputType="textCapWords"
|
||||
android:maxLines="1" />
|
||||
android:imeOptions="flagNoExtractUi"/>
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/categoriesSearchInProgress"
|
||||
style="?android:progressBarStyleSmall"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical|end"
|
||||
android:layout_marginEnd="@dimen/tiny_gap"
|
||||
android:layout_marginRight="@dimen/tiny_gap"
|
||||
android:indeterminate="true"
|
||||
android:indeterminateOnly="true"
|
||||
android:visibility="gone" />
|
||||
android:layout_marginRight="@dimen/tiny_gap"
|
||||
android:layout_marginEnd="@dimen/tiny_gap"
|
||||
android:layout_gravity="center_vertical|right"
|
||||
style="?android:progressBarStyleSmall"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
</FrameLayout>
|
||||
|
||||
<TextView
|
||||
|
|
|
|||
|
|
@ -149,6 +149,10 @@
|
|||
tools:text="License link" />
|
||||
</LinearLayout>
|
||||
|
||||
<fr.free.nrw.commons.media.MediaDetailSpacer
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/small_gap" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
|
|||
|
|
@ -1,73 +1,88 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="fill"
|
||||
android:orientation="vertical"
|
||||
android:background="?attr/fragmentCategorisationBackground"
|
||||
android:paddingBottom="@dimen/small_gap"
|
||||
android:paddingLeft="@dimen/standard_gap"
|
||||
android:paddingStart="@dimen/standard_gap"
|
||||
android:paddingRight="@dimen/standard_gap"
|
||||
android:paddingEnd="@dimen/standard_gap"
|
||||
android:paddingTop="@dimen/small_gap"
|
||||
android:theme="@style/DarkAppTheme"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true"
|
||||
>
|
||||
android:paddingBottom="@dimen/small_gap"
|
||||
android:paddingEnd="@dimen/standard_gap"
|
||||
android:paddingLeft="@dimen/standard_gap"
|
||||
android:paddingRight="@dimen/standard_gap"
|
||||
android:paddingStart="@dimen/standard_gap"
|
||||
android:paddingTop="@dimen/small_gap"
|
||||
android:theme="@style/DarkAppTheme">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/titleEdit"
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableEnd="@drawable/mapbox_info_icon_default"
|
||||
android:drawableRight="@drawable/mapbox_info_icon_default"
|
||||
android:scrollHorizontally="false"
|
||||
android:inputType="textMultiLine"
|
||||
android:hint="@string/share_title_hint"
|
||||
android:imeOptions="flagNoExtractUi" />
|
||||
android:layout_gravity="fill"
|
||||
android:orientation="vertical">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/descEdit"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableEnd="@drawable/mapbox_info_icon_default"
|
||||
android:drawableRight="@drawable/mapbox_info_icon_default"
|
||||
android:inputType="textMultiLine"
|
||||
android:hint="@string/share_description_hint"
|
||||
android:imeOptions="flagNoExtractUi" />
|
||||
<android.support.design.widget.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/licenseSpinner"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:theme="?attr/spinnerTheme"
|
||||
/>
|
||||
<EditText
|
||||
android:id="@+id/titleEdit"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableEnd="@drawable/mapbox_info_icon_default"
|
||||
android:drawableRight="@drawable/mapbox_info_icon_default"
|
||||
android:maxLines="1"
|
||||
android:maxLength="80"
|
||||
android:hint="@string/share_title_hint"
|
||||
android:imeOptions="flagNoExtractUi"
|
||||
android:inputType="text"
|
||||
android:scrollHorizontally="false" />
|
||||
</android.support.design.widget.TextInputLayout>
|
||||
|
||||
<Button
|
||||
android:text="@string/use_previous"
|
||||
android:background="?attr/buttonBackground"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/titleDescButton"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/share_license_summary"
|
||||
android:id="@+id/share_license_summary"
|
||||
android:gravity="center"
|
||||
android:layout_marginTop="@dimen/standard_gap"
|
||||
/>
|
||||
<android.support.design.widget.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<fr.free.nrw.commons.ui.widget.HtmlTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/media_upload_policy"
|
||||
android:text="@string/media_upload_policy"
|
||||
android:gravity="start"
|
||||
android:layout_marginTop="@dimen/standard_gap"
|
||||
/>
|
||||
<EditText
|
||||
android:id="@+id/descEdit"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableEnd="@drawable/mapbox_info_icon_default"
|
||||
android:drawableRight="@drawable/mapbox_info_icon_default"
|
||||
android:hint="@string/share_description_hint"
|
||||
android:imeOptions="flagNoExtractUi"
|
||||
android:inputType="textMultiLine" />
|
||||
</android.support.design.widget.TextInputLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/licenseSpinner"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:theme="?attr/spinnerTheme" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/titleDescButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/buttonBackground"
|
||||
android:text="@string/use_previous" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/share_license_summary"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/standard_gap"
|
||||
android:gravity="center"
|
||||
android:text="@string/share_license_summary" />
|
||||
|
||||
<fr.free.nrw.commons.ui.widget.HtmlTextView
|
||||
android:id="@+id/media_upload_policy"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/standard_gap"
|
||||
android:gravity="start"
|
||||
android:text="@string/media_upload_policy" />
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
|
|
|
|||
|
|
@ -1,11 +1,10 @@
|
|||
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:foreground="?selectableItemBackground"
|
||||
android:minHeight="72dp"
|
||||
>
|
||||
android:minHeight="72dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/icon"
|
||||
|
|
@ -34,7 +33,7 @@
|
|||
tools:text="@string/placeholder_place_distance"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
<com.borjabravo.readmoretextview.ReadMoreTextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
@ -46,12 +45,13 @@
|
|||
android:layout_toRightOf="@id/icon"
|
||||
android:layout_toStartOf="@id/time"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="2"
|
||||
app:trimLines="2"
|
||||
app:colorClickableText="#969494"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Body2"
|
||||
tools:text="@string/placeholder_place_name"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
<com.borjabravo.readmoretextview.ReadMoreTextView
|
||||
android:id="@+id/description"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
@ -62,7 +62,8 @@
|
|||
android:layout_below="@id/title"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="4"
|
||||
app:trimLines="2"
|
||||
app:colorClickableText="#969494"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
|
||||
tools:text="@string/placeholder_place_description"
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?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:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
|
|
@ -7,6 +7,13 @@
|
|||
android:gravity="center"
|
||||
android:weightSum="1"
|
||||
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
|
||||
android:layout_width="wrap_content"
|
||||
|
|
@ -67,15 +74,110 @@
|
|||
android:textColor="@android:color/white"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="295dp"
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxWidth="240dp"
|
||||
android:text="@string/tutorial_2_subtext"
|
||||
android:layout_gravity="center"
|
||||
android:textAlignment="textStart"
|
||||
android:paddingTop="@dimen/standard_gap"
|
||||
android:gravity="start"
|
||||
android:textColor="@android:color/white"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/bullet"
|
||||
android:paddingRight="4dp"
|
||||
android:textSize="16sp"
|
||||
android:paddingTop="@dimen/standard_gap"
|
||||
android:textColor="@android:color/white"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="295dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxWidth="240dp"
|
||||
android:text="@string/tutorial_2_subtext_1"
|
||||
android:layout_gravity="center"
|
||||
android:textAlignment="textStart"
|
||||
android:paddingTop="@dimen/standard_gap"
|
||||
android:gravity="start"
|
||||
android:textColor="@android:color/white"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/bullet"
|
||||
android:paddingRight="4dp"
|
||||
android:textSize="16sp"
|
||||
android:textColor="@android:color/white"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="295dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxWidth="240dp"
|
||||
android:text="@string/tutorial_2_subtext_2"
|
||||
android:layout_gravity="center"
|
||||
android:textAlignment="textStart"
|
||||
android:gravity="start"
|
||||
android:textColor="@android:color/white"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="top">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/bullet"
|
||||
android:paddingRight="4dp"
|
||||
android:textSize="16sp"
|
||||
android:textColor="@android:color/white"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="295dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxWidth="240dp"
|
||||
android:text="@string/tutorial_2_subtext_3"
|
||||
android:layout_gravity="center"
|
||||
android:textAlignment="textStart"
|
||||
android:gravity="start"
|
||||
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"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
|
|
@ -1,11 +1,18 @@
|
|||
<?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: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"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#0c609c"
|
||||
android:gravity="center_vertical"
|
||||
>
|
||||
|
||||
<LinearLayout
|
||||
android:gravity="center"
|
||||
|
|
@ -48,15 +55,103 @@
|
|||
android:textColor="@android:color/white"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="295dp"
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxWidth="240dp"
|
||||
android:text="@string/tutorial_3_subtext"
|
||||
android:layout_gravity="center"
|
||||
android:textAlignment="textStart"
|
||||
android:paddingTop="@dimen/standard_gap"
|
||||
android:gravity="start"
|
||||
android:textColor="@android:color/white"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/bullet"
|
||||
android:paddingRight="4dp"
|
||||
android:textSize="16sp"
|
||||
android:paddingTop="@dimen/standard_gap"
|
||||
android:textColor="@android:color/white"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="295dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxWidth="240dp"
|
||||
android:text="@string/tutorial_3_subtext_1"
|
||||
android:layout_gravity="center"
|
||||
android:textAlignment="textStart"
|
||||
android:paddingTop="@dimen/standard_gap"
|
||||
android:gravity="start"
|
||||
android:textColor="@android:color/white"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/bullet"
|
||||
android:paddingRight="4dp"
|
||||
android:textSize="16sp"
|
||||
android:textColor="@android:color/white"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="295dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxWidth="240dp"
|
||||
android:text="@string/tutorial_3_subtext_2"
|
||||
android:layout_gravity="center"
|
||||
android:textAlignment="textStart"
|
||||
android:gravity="start"
|
||||
android:textColor="@android:color/white"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/bullet"
|
||||
android:paddingRight="4dp"
|
||||
android:textSize="16sp"
|
||||
android:textColor="@android:color/white"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="295dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxWidth="240dp"
|
||||
android:text="@string/tutorial_3_subtext_3"
|
||||
android:layout_gravity="center"
|
||||
android:textAlignment="textStart"
|
||||
android:gravity="start"
|
||||
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"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
|
|
@ -1,12 +1,18 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
|
||||
<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"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#0c609c"
|
||||
android:gravity="center_vertical"
|
||||
>
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
@ -32,15 +38,115 @@
|
|||
android:textColor="@android:color/white"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="278dp"
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxWidth="240dp"
|
||||
android:text="@string/tutorial_4_subtext"
|
||||
android:layout_gravity="center"
|
||||
android:textAlignment="textStart"
|
||||
android:paddingTop="@dimen/standard_gap"
|
||||
android:gravity="start"
|
||||
android:textColor="@android:color/white"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/bullet"
|
||||
android:paddingRight="4dp"
|
||||
android:textSize="16sp"
|
||||
android:paddingTop="@dimen/standard_gap"
|
||||
android:textColor="@android:color/white"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="295dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxWidth="240dp"
|
||||
android:text="@string/tutorial_4_subtext_1"
|
||||
android:layout_gravity="center"
|
||||
android:textAlignment="textStart"
|
||||
android:paddingTop="@dimen/standard_gap"
|
||||
android:gravity="start"
|
||||
android:textColor="@android:color/white"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="top">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/bullet"
|
||||
android:paddingRight="4dp"
|
||||
android:textSize="16sp"
|
||||
android:textColor="@android:color/white"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="295dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxWidth="240dp"
|
||||
android:text="@string/tutorial_4_subtext_2"
|
||||
android:layout_gravity="center"
|
||||
android:textAlignment="textStart"
|
||||
android:gravity="start"
|
||||
android:textColor="@android:color/white"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="top">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/bullet"
|
||||
android:paddingRight="4dp"
|
||||
android:textSize="16sp"
|
||||
android:textColor="@android:color/white"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="295dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxWidth="240dp"
|
||||
android:text="@string/tutorial_4_subtext_3"
|
||||
android:layout_gravity="center"
|
||||
android:textAlignment="textStart"
|
||||
android:gravity="start"
|
||||
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"
|
||||
/>
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
|
|
@ -1,11 +1,18 @@
|
|||
<?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: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"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#0c609c"
|
||||
android:gravity="center_vertical"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
|
|
@ -41,4 +48,19 @@
|
|||
android:gravity="center_horizontal"
|
||||
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>
|
||||
|
|
@ -3,6 +3,6 @@
|
|||
<item android:id="@+id/menu_upload_single"
|
||||
android:title="@string/menu_upload_single"
|
||||
android:icon="@drawable/ic_send_white_24dp"
|
||||
android:enabled="false"
|
||||
android:enabled="true"
|
||||
app:showAsAction="always" />
|
||||
</menu>
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
<item
|
||||
android:id="@+id/action_introduction"
|
||||
android:icon="@drawable/ic_info_outline_black_24dp"
|
||||
android:icon="@drawable/ic_help_black_24dp"
|
||||
android:title="@string/navigation_item_info"/>
|
||||
|
||||
<item
|
||||
|
|
|
|||
4
app/src/main/res/values-land/integer.xml
Normal file
4
app/src/main/res/values-land/integer.xml
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<integer name="drawer_width">50</integer>
|
||||
</resources>
|
||||
4
app/src/main/res/values/integer.xml
Normal file
4
app/src/main/res/values/integer.xml
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<integer name="drawer_width">70</integer>
|
||||
</resources>
|
||||
|
|
@ -1,11 +1,17 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<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="bullet">• </string>
|
||||
<string name="menu_settings">Settings</string>
|
||||
<string name="username">Username</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="forgot_password">Forgot Password?</string>
|
||||
<string name="signup">Sign up</string>
|
||||
<string name="logging_in_title">Logging in</string>
|
||||
<string name="logging_in_message">Please wait…</string>
|
||||
|
|
@ -37,6 +43,7 @@
|
|||
<string name="menu_share">Share</string>
|
||||
<string name="menu_open_in_browser">View in Browser</string>
|
||||
<string name="share_title_hint">Title</string>
|
||||
<string name="add_title_toast">Please provide a title for this file</string>
|
||||
<string name="share_description_hint">Description</string>
|
||||
<string name="login_failed_network">Unable to login - network failure</string>
|
||||
<string name="login_failed_username">Unable to login - please check your username</string>
|
||||
|
|
@ -91,7 +98,7 @@
|
|||
<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 <a href=\"https://commons.wikimedia.org/wiki/Commons:Policies_and_guidelines\">Wikimedia Commons policies</a>.</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="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>
|
||||
|
|
@ -120,11 +127,20 @@
|
|||
<string name="tutorial_1_text">Wikimedia Commons hosts most of the images that are used in Wikipedia.</string>
|
||||
<string name="tutorial_1_subtext">Your images help educate people around the world!</string>
|
||||
<string name="tutorial_2_text">Please upload pictures that are taken or created entirely by yourself:</string>
|
||||
<string name="tutorial_2_subtext">- Natural objects (flowers, animals, mountains)\n- Useful objects (bicycles, train stations)\n- Famous people (your mayor, Olympic athletes you met)</string>
|
||||
<string name="tutorial_2_subtext">Natural objects (flowers, animals, mountains)\n• Useful objects (bicycles, train stations)\n• Famous people (your mayor, Olympic athletes you met)</string>
|
||||
<string name="tutorial_2_subtext_1">Natural objects (flowers, animals, mountains)</string>
|
||||
<string name="tutorial_2_subtext_2">Useful objects (bicycles, train stations)</string>
|
||||
<string name="tutorial_2_subtext_3">Famous people (your mayor, Olympic athletes you met)</string>
|
||||
<string name="tutorial_3_text">Please do NOT upload:</string>
|
||||
<string name="tutorial_3_subtext">- Selfies or pictures of your friends\n- Pictures you downloaded from the Internet\n- Screenshots of proprietary apps</string>
|
||||
<string name="tutorial_3_subtext_1">Selfies or pictures of your friends</string>
|
||||
<string name="tutorial_3_subtext_2">Pictures you downloaded from the Internet</string>
|
||||
<string name="tutorial_3_subtext_3">Screenshots of proprietary apps</string>
|
||||
<string name="tutorial_4_text">Example upload:</string>
|
||||
<string name="tutorial_4_subtext">- Title: Sydney Opera House\n- Description: Sydney Opera House as viewed from across the bay\n- Categories: Sydney Opera House from the west, Sydney Opera House remote views</string>
|
||||
<string name="tutorial_4_subtext_1">Title: Sydney Opera House</string>
|
||||
<string name="tutorial_4_subtext_2">Description: Sydney Opera House as viewed from across the bay</string>
|
||||
<string name="tutorial_4_subtext_3">Categories: Sydney Opera House from the west, Sydney Opera House remote views</string>
|
||||
<string name="welcome_wikipedia_text">Contribute your images. Help Wikipedia articles come to life!</string>
|
||||
<string name="welcome_wikipedia_subtext">Images on Wikipedia come from Wikimedia Commons.</string>
|
||||
<string name="welcome_copyright_text">Your images help educate people around the world.</string>
|
||||
|
|
@ -158,8 +174,6 @@
|
|||
<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="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_dark">mapbox://styles/mapbox/traffic-night-v2</string>
|
||||
<string name="mapbox_commons_app_token">pk.eyJ1IjoibWFza2FyYXZpdmVrIiwiYSI6ImNqMmxvdzFjMTAwMHYzM283ZWM3eW5tcDAifQ.ib5SZ9EVjwJe6GSKve0bcg</string>
|
||||
|
|
@ -214,6 +228,8 @@
|
|||
<string name="login_to_your_account">Login to your account</string>
|
||||
<string name="send_log_file">Send log file</string>
|
||||
<string name="send_log_file_description">Send log file to developers via email</string>
|
||||
<string name="no_web_browser">No web browser found to open URL</string>
|
||||
<string name="null_url">Error! URL not found</string>
|
||||
|
||||
<string name="nearby_location_has_not_changed">Location has not changed.</string>
|
||||
<string name="nearby_location_not_available">Location not available.</string>
|
||||
|
|
@ -226,4 +242,7 @@
|
|||
<string name="notifications_thank_you_edit">Thank you for making an edit</string>
|
||||
<string name="notifications_mention">%1$s mentioned you on %2$s.</string>
|
||||
<string name="toggle_view_button">Toggle view</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>
|
||||
|
|
|
|||
|
|
@ -1,61 +1,68 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
>
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<ListPreference
|
||||
android:key="defaultLicense"
|
||||
android:title="@string/preference_license"
|
||||
android:entries="@array/pref_defaultLicense_entries"
|
||||
android:entryValues="@array/pref_defaultLicense_values"
|
||||
android:defaultValue="@string/license_pref_cc_by_sa_4_0"
|
||||
/>
|
||||
<PreferenceCategory
|
||||
android:title="@string/preference_category_appearance">
|
||||
|
||||
<CheckBoxPreference
|
||||
android:key="allowGps"
|
||||
android:title="@string/allow_gps"
|
||||
android:defaultValue="false"
|
||||
android:summary="@string/allow_gps_summary"
|
||||
/>
|
||||
<SwitchPreference
|
||||
android:title="@string/preference_theme"
|
||||
android:defaultValue="false"
|
||||
android:summary="@string/preference_theme_summary"
|
||||
android:key="theme" />
|
||||
|
||||
<Preference android:title="@string/become_a_tester_title"
|
||||
android:summary="@string/become_a_tester_description">
|
||||
<intent android:action="android.intent.action.VIEW"
|
||||
android:data="@string/beta_opt_in_link" />
|
||||
</Preference>
|
||||
</PreferenceCategory>
|
||||
|
||||
<CheckBoxPreference
|
||||
android:title="@string/preference_theme"
|
||||
android:defaultValue="false"
|
||||
android:summary="@string/preference_theme_summary"
|
||||
android:key="theme"
|
||||
/>
|
||||
<PreferenceCategory
|
||||
android:title="@string/preference_category_general">
|
||||
|
||||
<CheckBoxPreference
|
||||
android:key="useWikidata"
|
||||
android:title="@string/use_wikidata"
|
||||
android:defaultValue="true"
|
||||
android:summary="@string/use_wikidata_summary"
|
||||
/>
|
||||
<ListPreference
|
||||
android:key="defaultLicense"
|
||||
android:title="@string/preference_license"
|
||||
android:entries="@array/pref_defaultLicense_entries"
|
||||
android:entryValues="@array/pref_defaultLicense_values"
|
||||
android:defaultValue="@string/license_pref_cc_by_sa_4_0" />
|
||||
|
||||
<EditTextPreference
|
||||
android:key="uploads"
|
||||
android:defaultValue="100"
|
||||
android:title= "@string/set_limit"
|
||||
android:inputType="numberDecimal"
|
||||
android:maxLength="3"
|
||||
/>
|
||||
<SwitchPreference
|
||||
android:key="useExternalStorage"
|
||||
android:title="@string/use_external_storage"
|
||||
android:defaultValue="true"
|
||||
android:summary="@string/use_external_storage_summary" />
|
||||
|
||||
<CheckBoxPreference
|
||||
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" />
|
||||
|
||||
<Preference
|
||||
android:key="sendLogFile"
|
||||
android:title="@string/send_log_file"
|
||||
android:summary="@string/send_log_file_description"/>
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory
|
||||
android:title="@string/preference_category_location">
|
||||
|
||||
<SwitchPreference
|
||||
android:key="allowGps"
|
||||
android:title="@string/allow_gps"
|
||||
android:defaultValue="false"
|
||||
android:summary="@string/allow_gps_summary" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory
|
||||
android:title="@string/preference_category_feedback">
|
||||
|
||||
<Preference android:title="@string/become_a_tester_title"
|
||||
android:summary="@string/become_a_tester_description">
|
||||
<intent android:action="android.intent.action.VIEW"
|
||||
android:data="@string/beta_opt_in_link" />
|
||||
</Preference>
|
||||
|
||||
<Preference
|
||||
android:key="sendLogFile"
|
||||
android:title="@string/send_log_file"
|
||||
android:summary="@string/send_log_file_description"/>
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
</PreferenceScreen>
|
||||
|
|
@ -1,21 +1,29 @@
|
|||
gradleVersion = 3.0.0
|
||||
|
||||
SUPPORT_LIB_VERSION = 26.0.2
|
||||
|
||||
compileSdkVersion = android-26
|
||||
buildToolsVersion = 26.0.2
|
||||
|
||||
minSdkVersion = 15
|
||||
|
||||
targetSdkVersion = 25
|
||||
## Project-wide Gradle settings.
|
||||
#
|
||||
# For more details on how to configure your build environment visit
|
||||
# http://www.gradle.org/docs/current/userguide/build_environment.html
|
||||
#
|
||||
# Specifies the JVM arguments used for the daemon process.
|
||||
# The setting is particularly useful for tweaking memory settings.
|
||||
# Default value: -Xmx1024m -XX:MaxPermSize=256m
|
||||
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
|
||||
#
|
||||
# When configured, Gradle will run in incubating parallel mode.
|
||||
# This option should only be used with decoupled projects. More details, visit
|
||||
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
|
||||
# org.gradle.parallel=true
|
||||
#Thu Mar 01 15:28:48 IST 2018
|
||||
systemProp.http.proxyPort=0
|
||||
compileSdkVersion=android-26
|
||||
android.useDeprecatedNdk=true
|
||||
|
||||
# Library dependencies
|
||||
BUTTERKNIFE_VERSION=8.6.0
|
||||
DAGGER_VERSION=2.13
|
||||
LEAK_CANARY=1.5.4
|
||||
org.gradle.jvmargs=-Xmx1536M
|
||||
|
||||
#TODO: Temporary disabled. https://developer.android.com/studio/build/gradle-plugin-3-0-0-migration.html#aapt2
|
||||
#Refer to PR: https://github.com/commons-app/apps-android-commons/pull/932
|
||||
android.enableAapt2=false
|
||||
buildToolsVersion=26.0.2
|
||||
targetSdkVersion=25
|
||||
android.enableAapt2=false
|
||||
SUPPORT_LIB_VERSION=26.0.2
|
||||
minSdkVersion=15
|
||||
systemProp.http.proxyHost=
|
||||
LEAK_CANARY=1.5.4
|
||||
DAGGER_VERSION=2.13
|
||||
gradleVersion=3.0.0
|
||||
|
|
|
|||
3
gradle/wrapper/gradle-wrapper.properties
vendored
3
gradle/wrapper/gradle-wrapper.properties
vendored
|
|
@ -1,5 +1,6 @@
|
|||
#Sat Mar 03 13:58:47 IST 2018
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue