Merge branch 'master' into feat5

This commit is contained in:
Ujjwal Agrawal 2018-02-27 12:17:29 +05:30 committed by GitHub
commit eeaa9a90ba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 767 additions and 185 deletions

View file

@ -18,7 +18,7 @@ dependencies {
implementation 'com.google.code.gson:gson:2.8.1'
implementation 'com.jakewharton.timber:timber:4.5.1'
implementation 'info.debatty:java-string-similarity:0.24'
implementation ('com.mapbox.mapboxsdk:mapbox-android-sdk:5.2.1@aar'){
implementation ('com.mapbox.mapboxsdk:mapbox-android-sdk:5.4.1@aar'){
transitive=true
}
@ -26,6 +26,7 @@ dependencies {
implementation "com.android.support:support-v4:$SUPPORT_LIB_VERSION"
implementation "com.android.support:appcompat-v7:$SUPPORT_LIB_VERSION"
implementation "com.android.support:design:$SUPPORT_LIB_VERSION"
implementation "com.android.support:customtabs:$SUPPORT_LIB_VERSION"
implementation "com.android.support:cardview-v7:$SUPPORT_LIB_VERSION"
@ -48,7 +49,7 @@ dependencies {
compile 'com.facebook.stetho:stetho:1.5.0'
testCompile 'junit:junit:4.12'
testCompile 'org.robolectric:robolectric:3.4'
testCompile 'org.robolectric:robolectric:3.7.1'
testCompile 'com.squareup.okhttp3:mockwebserver:3.8.1'
androidTestCompile 'com.squareup.okhttp3:mockwebserver:3.8.1'
@ -77,7 +78,7 @@ dependencies {
androidTestImplementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
testImplementation 'junit:junit:4.12'
testImplementation 'org.robolectric:robolectric:3.4'
testImplementation 'org.robolectric:robolectric:3.7.1'
testImplementation 'org.mockito:mockito-all:1.10.19'
testImplementation 'com.squareup.okhttp3:mockwebserver:3.8.1'

View file

@ -3,6 +3,8 @@ package fr.free.nrw.commons;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.support.customtabs.CustomTabsIntent;
import android.support.v4.content.ContextCompat;
import android.view.View;
import android.widget.TextView;
@ -47,28 +49,28 @@ public class AboutActivity extends NavigationBaseActivity {
intent.setPackage("com.facebook.katana");
startActivity(intent);
} catch (Exception e) {
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://www.facebook.com/" + "1921335171459985")));
Utils.handleWebUrl(this,Uri.parse("https://www.facebook.com/" + "1921335171459985"));
}
}
@OnClick(R.id.github_launch_icon)
public void launchGithub(View view) {
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/commons-app/apps-android-commons\\"));
startActivity(browserIntent);
Utils.handleWebUrl(this,Uri.parse("https://commons-app.github.io/\\"));
}
@OnClick(R.id.website_launch_icon)
public void launchWebsite(View view) {
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://commons-app.github.io/\\"));
startActivity(browserIntent);
Utils.handleWebUrl(this,Uri.parse("https://commons-app.github.io/\\"));
}
@OnClick(R.id.about_rate_us)
public void rateApp(View view) {
@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/\\"));
}
Utils.rateApp(this);
@OnClick(R.id.about_privacy_policy)
public void launchPrivacyPolicy(View view) {
Utils.handleWebUrl(this,Uri.parse("https://github.com/commons-app/apps-android-commons/wiki/Privacy-policy\\"));
}
}

View file

@ -5,6 +5,8 @@ import android.content.Intent;
import android.net.Uri;
import android.preference.PreferenceManager;
import android.support.annotation.NonNull;
import android.support.customtabs.CustomTabsIntent;
import android.support.v4.content.ContextCompat;
import org.apache.commons.codec.binary.Hex;
import org.apache.commons.codec.digest.DigestUtils;
@ -13,6 +15,7 @@ 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;
@ -172,4 +175,15 @@ public class Utils {
}
return ;
}
public static void handleWebUrl(Context context,Uri url){
CustomTabsIntent.Builder builder = new CustomTabsIntent.Builder();
builder.setToolbarColor(ContextCompat.getColor(context, R.color.primaryColor));
builder.setSecondaryToolbarColor(ContextCompat.getColor(context, R.color.primaryDarkColor));
builder.setExitAnimations(context, android.R.anim.slide_in_left, android.R.anim.slide_out_right);
CustomTabsIntent customTabsIntent = builder.build();
customTabsIntent.intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
customTabsIntent.launchUrl(context, url);
}
}

View file

@ -72,6 +72,7 @@ public class LoginActivity extends AccountAuthenticatorActivity {
@BindView(R.id.loginTwoFactor) EditText twoFactorEdit;
@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;
ProgressDialog progressDialog;
private AppCompatDelegate delegate;
@ -112,6 +113,12 @@ public class LoginActivity extends AccountAuthenticatorActivity {
loginButton.setOnClickListener(view -> performLogin());
signupButton.setOnClickListener(view -> signUp());
if(BuildConfig.FLAVOR == "beta"){
loginCredentials.setText(getString(R.string.login_credential));
} else {
loginCredentials.setVisibility(View.GONE);
}
}

View file

@ -3,7 +3,9 @@ package fr.free.nrw.commons.nearby;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.support.customtabs.CustomTabsIntent;
import android.support.v4.app.FragmentActivity;
import android.support.v4.content.ContextCompat;
import android.support.v7.widget.PopupMenu;
import android.view.LayoutInflater;
import android.view.MenuItem;
@ -17,6 +19,7 @@ import butterknife.ButterKnife;
import butterknife.OnClick;
import butterknife.Unbinder;
import fr.free.nrw.commons.R;
import fr.free.nrw.commons.Utils;
import fr.free.nrw.commons.location.LatLng;
import fr.free.nrw.commons.ui.widget.OverlayDialog;
import fr.free.nrw.commons.utils.DialogUtil;
@ -141,8 +144,7 @@ public class NearbyInfoDialog extends OverlayDialog {
}
private void openWebView(Uri link) {
Intent browserIntent = new Intent(Intent.ACTION_VIEW, link);
startActivity(browserIntent);
Utils.handleWebUrl(getContext(),link);
}
@OnClick(R.id.emptyLayout)

View file

@ -5,11 +5,13 @@ 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 com.pedrogomez.renderers.RVRendererAdapter;
import java.util.Collections;
import java.util.List;
import javax.inject.Inject;
@ -45,8 +47,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();
}
@ -58,6 +61,7 @@ public class NotificationActivity extends NavigationBaseActivity {
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(notificationList -> {
Collections.reverse(notificationList);
Timber.d("Number of notifications is %d", notificationList.size());
setAdapter(notificationList);
}, throwable -> Timber.e(throwable, "Error occurred while loading notifications"));

View file

@ -121,8 +121,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,

View file

@ -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"
@ -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"
@ -174,13 +190,13 @@
<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/buttonFrame"
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 +204,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>

View file

@ -73,16 +73,91 @@
android:gravity="center_horizontal"
android:textColor="@android:color/white"/>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxWidth="240dp"
android:layout_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="wrap_content"
android:layout_height="wrap_content"
android:maxWidth="240dp"
android:text="@string/tutorial_2_subtext"
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="wrap_content"
android:layout_height="wrap_content"
android:maxWidth="240dp"
android:layout_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="wrap_content"
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="wrap_content"
android:layout_height="wrap_content"
android:maxWidth="240dp"
android:layout_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="wrap_content"
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>
</LinearLayout>

View file

@ -55,16 +55,90 @@
android:gravity="center_horizontal"
android:textColor="@android:color/white"/>
<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:text="@string/bullet"
android:paddingRight="4dp"
android:textSize="16sp"
android:paddingTop="@dimen/standard_gap"
android:textColor="@android:color/white"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxWidth="240dp"
android:text="@string/tutorial_3_subtext"
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="wrap_content"
android:layout_height="wrap_content"
android:maxWidth="240dp"
android:layout_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="wrap_content"
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="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:text="@string/bullet"
android:paddingRight="4dp"
android:textSize="16sp"
android:textColor="@android:color/white"/>
<TextView
android:layout_width="wrap_content"
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>
</LinearLayout>

View file

@ -38,16 +38,89 @@
android:gravity="center_horizontal"
android:textColor="@android:color/white"/>
<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:text="@string/bullet"
android:paddingRight="4dp"
android:textSize="16sp"
android:paddingTop="@dimen/standard_gap"
android:textColor="@android:color/white"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxWidth="240dp"
android:text="@string/tutorial_4_subtext"
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="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:text="@string/bullet"
android:paddingRight="4dp"
android:textSize="16sp"
android:textColor="@android:color/white"/>
<TextView
android:layout_width="wrap_content"
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="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:text="@string/bullet"
android:paddingRight="4dp"
android:textSize="16sp"
android:textColor="@android:color/white"/>
<TextView
android:layout_width="wrap_content"
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>
</LinearLayout>

View file

@ -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"
@ -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"
@ -174,13 +190,13 @@
<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/buttonFrame"
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 +204,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 +214,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>

View file

@ -5,9 +5,13 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="wrap_content">
<include
android:id="@+id/toolbar"
@ -19,19 +23,19 @@
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: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:src="@drawable/ic_launcher"
android:contentDescription="@string/commons_logo"
/>
android:src="@drawable/ic_launcher" />
<TextView
style="?android:textAppearanceLarge"
@ -66,41 +70,66 @@
<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"
>
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"
app:srcCompat="@drawable/ic_action_website"
android:contentDescription= "@string/commons_website"
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"
app:srcCompat="@drawable/ic_action_facebook"
android:contentDescription= "@string/commons_facebook"
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"
app:srcCompat="@drawable/ic_action_github"
android:contentDescription= "@string/commons_github"
android:layout_margin="@dimen/activity_margin_horizontal"
/>
android:contentDescription="@string/commons_github"
app:srcCompat="@drawable/ic_action_github" />
</LinearLayout>
<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_marginTop="@dimen/standard_gap"
android:gravity="center"
android:text="@string/about_privacy_policy" />
<fr.free.nrw.commons.ui.widget.HtmlTextView
android:id="@+id/about_credits"
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_credits" />
<TextView
android:id="@+id/about_uploads_to"
style="?android:textAppearanceSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/large_gap"
android:alpha="0.2"
android:gravity="center" />
</LinearLayout>
@ -112,6 +141,7 @@
android:gravity="center"
android:textColor="@color/primaryColor"
android:text="@string/about_rate_us" />
<fr.free.nrw.commons.ui.widget.HtmlTextView
android:id="@+id/about_privacy_policy"
style="?android:textAppearanceSmall"
@ -141,6 +171,7 @@
</LinearLayout>
</RelativeLayout>
</ScrollView>
<android.support.design.widget.NavigationView
android:id="@+id/navigation_view"

View file

@ -44,11 +44,27 @@
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"
android:layout_height="wrap_content"
android:layout_below="@id/title"
android:layout_below="@id/login_credentials"
android:visibility="gone"
tools:visibility="visible">
@ -60,6 +76,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"

View file

@ -67,15 +67,95 @@
android:textColor="@android:color/white"
/>
<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: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"
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>

View file

@ -48,15 +48,87 @@
android:textColor="@android:color/white"
/>
<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: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"
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>

View file

@ -32,15 +32,101 @@
android:textColor="@android:color/white"
/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="horizontal">
<TextView
android:layout_width="278dp"
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"
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>

View file

@ -10,6 +10,11 @@
android:icon="@drawable/ic_location_black_24dp"
android:title="@string/navigation_item_nearby"/>
<item
android:id="@+id/action_notifications"
android:icon="@drawable/ic_notifications_black_24dp"
android:title="@string/navigation_item_notification"/>
<item
android:id="@+id/action_about"
android:icon="@drawable/ic_info_outline_black_24dp"
@ -35,9 +40,4 @@
android:icon="@drawable/ic_exit_to_app_black_24dp"
android:title="@string/navigation_item_logout"/>
<item
android:id="@+id/action_notifications"
android:icon="@drawable/ic_notifications_black_24dp"
android:title="@string/navigation_item_notification"/>
</menu>

View file

@ -1,9 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Commons</string>
<string name="bullet">&#8226; </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">Log in</string>
<string name="signup">Sign up</string>
<string name="logging_in_title">Logging in</string>
@ -77,8 +79,8 @@
<string name="about_license">The Wikimedia Commons app is an open-source app created and maintained by grantees and volunteers of the Wikimedia community. The Wikimedia Foundation is not involved in the creation, development, or maintenance of the app. </string>
<string name="trademarked_name" translatable="false">Wikimedia Commons</string>
<string name="about_improve">Create a new &lt;a href=\"https://github.com/commons-app/apps-android-commons/issues\"&gt;GitHub issue&lt;/a&gt; for bug reports and suggestions.</string>
<string name="about_privacy_policy">&lt;a href=\"https://github.com/commons-app/apps-android-commons/wiki/Privacy-policy\"&gt;Privacy policy&lt;/a&gt;</string>
<string name="about_credits">&lt;a href=\"https://github.com/commons-app/apps-android-commons/blob/master/CREDITS\"&gt;Credits&lt;/a&gt;</string>
<string name="about_privacy_policy"><u>Privacy policy</u></string>
<string name="about_credits"><u>Credits</u></string>
<string name="title_activity_about">About</string>
<string name="menu_feedback">Send Feedback (via Email)</string>
<string name="no_email_client">No email client installed</string>
@ -119,11 +121,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&#8226; Useful objects (bicycles, train stations)\n&#8226; 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>