mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
commit
3bd02704b5
20 changed files with 251 additions and 104 deletions
|
|
@ -94,6 +94,8 @@ 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'
|
||||
}
|
||||
|
||||
android {
|
||||
|
|
|
|||
|
|
@ -1,12 +1,15 @@
|
|||
package fr.free.nrw.commons;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
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,6 +17,8 @@ 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
|
||||
*/
|
||||
|
|
@ -27,12 +32,12 @@ 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);
|
||||
|
||||
|
|
@ -42,36 +47,70 @@ public class AboutActivity extends NavigationBaseActivity {
|
|||
|
||||
@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"));
|
||||
intent.setPackage("com.facebook.katana");
|
||||
startActivity(intent);
|
||||
} catch (Exception e) {
|
||||
Utils.handleWebUrl(this,Uri.parse("https://www.facebook.com/" + "1921335171459985"));
|
||||
intent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://www.facebook.com/" + "1921335171459985\\"));
|
||||
if(intent.resolveActivity(this.getPackageManager()) != null){
|
||||
Utils.handleWebUrl(this,Uri.parse("https://www.facebook.com/" + "1921335171459985"));
|
||||
} else {
|
||||
Toast toast = Toast.makeText(this, getString(R.string.no_web_browser), LENGTH_SHORT);
|
||||
toast.show();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@OnClick(R.id.github_launch_icon)
|
||||
public void launchGithub(View view) {
|
||||
Utils.handleWebUrl(this,Uri.parse("https://commons-app.github.io/\\"));
|
||||
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/commons-app/apps-android-commons\\"));
|
||||
//check if web browser available
|
||||
if (browserIntent.resolveActivity(this.getPackageManager()) != null) {
|
||||
Utils.handleWebUrl(this,Uri.parse("https://github.com/commons-app/apps-android-commons\\"));
|
||||
} else {
|
||||
Toast toast = Toast.makeText(this, getString(R.string.no_web_browser), LENGTH_SHORT);
|
||||
toast.show();
|
||||
}
|
||||
}
|
||||
|
||||
@OnClick(R.id.website_launch_icon)
|
||||
public void launchWebsite(View view) {
|
||||
Utils.handleWebUrl(this,Uri.parse("https://commons-app.github.io/\\"));
|
||||
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://commons-app.github.io/\\"));
|
||||
if (browserIntent.resolveActivity(this.getPackageManager()) != null) {
|
||||
Utils.handleWebUrl(this,Uri.parse("https://commons-app.github.io/\\"));
|
||||
} else {
|
||||
Toast toast = Toast.makeText(this, getString(R.string.no_web_browser), LENGTH_SHORT);
|
||||
toast.show();
|
||||
}
|
||||
}
|
||||
|
||||
@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/\\"));
|
||||
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/commons-app/apps-android-commons/blob/master/CREDITS/\\"));
|
||||
if (browserIntent.resolveActivity(this.getPackageManager()) != null) {
|
||||
Utils.handleWebUrl(this,Uri.parse("https://github.com/commons-app/apps-android-commons/blob/master/CREDITS/\\"));
|
||||
} else {
|
||||
Toast toast = Toast.makeText(this, getString(R.string.no_web_browser), LENGTH_SHORT);
|
||||
toast.show();
|
||||
}
|
||||
}
|
||||
|
||||
@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\\"));
|
||||
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/commons-app/apps-android-commons/wiki/Privacy-policy\\"));
|
||||
if (browserIntent.resolveActivity(this.getPackageManager()) != null) {
|
||||
Utils.handleWebUrl(this,Uri.parse("https://github.com/commons-app/apps-android-commons/wiki/Privacy-policy\\"));
|
||||
} else {
|
||||
Toast toast = Toast.makeText(this, getString(R.string.no_web_browser), LENGTH_SHORT);
|
||||
toast.show();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,7 +49,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";
|
||||
|
||||
|
|
|
|||
|
|
@ -165,6 +165,16 @@ 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){
|
||||
CustomTabsIntent.Builder builder = new CustomTabsIntent.Builder();
|
||||
builder.setToolbarColor(ContextCompat.getColor(context, R.color.primaryColor));
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package fr.free.nrw.commons.category;
|
||||
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Bundle;
|
||||
|
|
|
|||
|
|
@ -37,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;
|
||||
|
|
@ -305,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;
|
||||
|
|
@ -385,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();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ 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;
|
||||
|
||||
|
|
@ -25,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.
|
||||
*/
|
||||
|
|
@ -71,7 +74,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) {
|
||||
|
|
@ -85,6 +95,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);
|
||||
|
|
|
|||
|
|
@ -23,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;
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
||||
|
|
@ -228,35 +232,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 +330,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();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
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>
|
||||
|
|
@ -104,34 +104,45 @@
|
|||
|
||||
</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" />
|
||||
<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: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:textColor="@color/primaryColor"
|
||||
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_credits"
|
||||
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_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" />
|
||||
<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>
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
</ScrollView>
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -38,6 +38,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>
|
||||
|
|
@ -224,6 +225,7 @@
|
|||
<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>
|
||||
|
|
@ -237,4 +239,5 @@
|
|||
<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>
|
||||
</resources>
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue