mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
Merge branch 'master' of https://github.com/commons-app/apps-android-commons into delete-request
This commit is contained in:
commit
c303525508
29 changed files with 595 additions and 364 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.
|
||||
|
|
|
|||
|
|
@ -99,6 +99,7 @@ dependencies {
|
|||
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 {
|
||||
|
|
|
|||
|
|
@ -58,37 +58,18 @@ public class AboutActivity extends NavigationBaseActivity {
|
|||
intent.setPackage("com.facebook.katana");
|
||||
startActivity(intent);
|
||||
} catch (Exception e) {
|
||||
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();
|
||||
}
|
||||
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\\"));
|
||||
//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();
|
||||
}
|
||||
Utils.handleWebUrl(this,Uri.parse("https://github.com/commons-app/apps-android-commons\\"));
|
||||
}
|
||||
|
||||
@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/\\"));
|
||||
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();
|
||||
}
|
||||
Utils.handleWebUrl(this,Uri.parse("https://commons-app.github.io/\\"));
|
||||
}
|
||||
|
||||
@OnClick(R.id.about_rate_us)
|
||||
|
|
@ -98,29 +79,16 @@ public class AboutActivity extends NavigationBaseActivity {
|
|||
|
||||
@OnClick(R.id.about_credits)
|
||||
public void launchCredits(View view) {
|
||||
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();
|
||||
}
|
||||
Utils.handleWebUrl(this,Uri.parse("https://github.com/commons-app/apps-android-commons/blob/master/CREDITS/\\"));
|
||||
}
|
||||
|
||||
@OnClick(R.id.about_privacy_policy)
|
||||
public void launchPrivacyPolicy(View view) {
|
||||
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();
|
||||
}
|
||||
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\\"));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ 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;
|
||||
|
|
@ -25,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;
|
||||
|
|
@ -72,8 +72,11 @@ public class CommonsApplication extends MultiDexApplication {
|
|||
.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 {
|
||||
|
||||
/**
|
||||
|
|
@ -176,6 +178,13 @@ public class Utils {
|
|||
}
|
||||
|
||||
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));
|
||||
|
|
|
|||
|
|
@ -37,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;
|
||||
|
|
@ -83,6 +84,9 @@ public class LoginActivity extends AccountAuthenticatorActivity {
|
|||
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);
|
||||
|
|
@ -132,6 +136,10 @@ public class LoginActivity extends AccountAuthenticatorActivity {
|
|||
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);
|
||||
|
|
@ -175,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();
|
||||
|
|
@ -205,6 +214,7 @@ public class LoginActivity extends AccountAuthenticatorActivity {
|
|||
if (result.equals("PASS")) {
|
||||
handlePassResult(username, password);
|
||||
} else {
|
||||
loginCurrentlyInProgress = false;
|
||||
handleOtherResults(result);
|
||||
}
|
||||
}
|
||||
|
|
@ -327,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);
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package fr.free.nrw.commons.notification;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.FragmentManager;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
|
|
@ -12,7 +13,6 @@ import android.widget.Toast;
|
|||
|
||||
import com.pedrogomez.renderers.RVRendererAdapter;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
|
@ -39,12 +39,16 @@ public class NotificationActivity extends NavigationBaseActivity {
|
|||
|
||||
@Inject NotificationController controller;
|
||||
|
||||
private static final String TAG_NOTIFICATION_WORKER_FRAGMENT = "NotificationWorkerFragment";
|
||||
private NotificationWorkerFragment mNotificationWorkerFragment;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_notification);
|
||||
ButterKnife.bind(this);
|
||||
mNotificationWorkerFragment = (NotificationWorkerFragment) getFragmentManager()
|
||||
.findFragmentByTag(TAG_NOTIFICATION_WORKER_FRAGMENT);
|
||||
initListView();
|
||||
initDrawer();
|
||||
}
|
||||
|
|
@ -60,14 +64,18 @@ public class NotificationActivity extends NavigationBaseActivity {
|
|||
private void addNotifications() {
|
||||
Timber.d("Add notifications");
|
||||
|
||||
Observable.fromCallable(() -> controller.getNotifications())
|
||||
.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"));
|
||||
if(mNotificationWorkerFragment == null){
|
||||
Observable.fromCallable(() -> controller.getNotifications())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(notificationList -> {
|
||||
Timber.d("Number of notifications is %d", notificationList.size());
|
||||
initializeAndSetNotificationList(notificationList);
|
||||
setAdapter(notificationList);
|
||||
}, throwable -> Timber.e(throwable, "Error occurred while loading notifications"));
|
||||
} else {
|
||||
setAdapter(mNotificationWorkerFragment.getNotificationList());
|
||||
}
|
||||
}
|
||||
|
||||
private void handleUrl(String url) {
|
||||
|
|
@ -98,4 +106,12 @@ public class NotificationActivity extends NavigationBaseActivity {
|
|||
intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
|
||||
context.startActivity(intent);
|
||||
}
|
||||
}
|
||||
|
||||
private void initializeAndSetNotificationList(List<Notification> notificationList){
|
||||
FragmentManager fm = getFragmentManager();
|
||||
mNotificationWorkerFragment = new NotificationWorkerFragment();
|
||||
fm.beginTransaction().add(mNotificationWorkerFragment, TAG_NOTIFICATION_WORKER_FRAGMENT)
|
||||
.commit();
|
||||
mNotificationWorkerFragment.setNotificationList(notificationList);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package fr.free.nrw.commons.notification;
|
||||
|
||||
import android.app.Fragment;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.Nullable;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by knightshade on 25/2/18.
|
||||
*/
|
||||
|
||||
public class NotificationWorkerFragment extends Fragment {
|
||||
private List<Notification> notificationList;
|
||||
|
||||
@Override
|
||||
public void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setRetainInstance(true);
|
||||
}
|
||||
|
||||
public void setNotificationList(List<Notification> notificationList){
|
||||
this.notificationList = notificationList;
|
||||
}
|
||||
|
||||
public List<Notification> getNotificationList(){
|
||||
return notificationList;
|
||||
}
|
||||
}
|
||||
|
|
@ -3,10 +3,13 @@ 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;
|
||||
|
|
@ -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;
|
||||
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -88,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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -101,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));
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,163 +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"
|
||||
>
|
||||
<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: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"/>
|
||||
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:maxWidth="240dp"
|
||||
android:layout_gravity="center"
|
||||
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"/>
|
||||
android:text="@string/bullet"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
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"
|
||||
/>
|
||||
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:maxWidth="240dp"
|
||||
android:layout_gravity="center"
|
||||
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"/>
|
||||
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:layout_gravity="center"
|
||||
android:textAlignment="textStart"
|
||||
android:gravity="start"
|
||||
android:textColor="@android:color/white"
|
||||
/>
|
||||
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: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"/>
|
||||
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:layout_gravity="center"
|
||||
android:textAlignment="textStart"
|
||||
android:gravity="start"
|
||||
android:textColor="@android:color/white"
|
||||
/>
|
||||
android:textColor="@android:color/white" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</android.support.constraint.ConstraintLayout>
|
||||
|
|
|
|||
|
|
@ -1,59 +1,82 @@
|
|||
<?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"
|
||||
>
|
||||
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:layout_gravity="center"
|
||||
android:gravity="center_horizontal"
|
||||
android:maxWidth="240dp"
|
||||
android:text="@string/tutorial_3_text"
|
||||
android:layout_gravity="center"
|
||||
android:textStyle="bold"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="@dimen/normal_text"
|
||||
android:gravity="center_horizontal"
|
||||
android:textColor="@android:color/white"/>
|
||||
android:textStyle="bold" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
|
|
@ -64,51 +87,49 @@
|
|||
<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"/>
|
||||
android:text="@string/bullet"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
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"
|
||||
/>
|
||||
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:maxWidth="240dp"
|
||||
android:layout_gravity="center"
|
||||
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"/>
|
||||
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:layout_gravity="center"
|
||||
android:textAlignment="textStart"
|
||||
android:gravity="start"
|
||||
android:textColor="@android:color/white"
|
||||
/>
|
||||
android:textColor="@android:color/white" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
|
@ -121,24 +142,23 @@
|
|||
<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"/>
|
||||
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:layout_gravity="center"
|
||||
android:textAlignment="textStart"
|
||||
android:gravity="start"
|
||||
android:textColor="@android:color/white"
|
||||
/>
|
||||
android:textColor="@android:color/white" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</android.support.constraint.ConstraintLayout>
|
||||
|
|
|
|||
|
|
@ -1,42 +1,72 @@
|
|||
<?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"
|
||||
>
|
||||
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:layout_gravity="center"
|
||||
android:gravity="center_horizontal"
|
||||
android:maxWidth="240dp"
|
||||
android:text="@string/tutorial_4_text"
|
||||
android:layout_gravity="center"
|
||||
android:textStyle="bold"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="@dimen/normal_text"
|
||||
android:gravity="center_horizontal"
|
||||
android:textColor="@android:color/white"/>
|
||||
android:textStyle="bold" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
|
|
@ -47,23 +77,22 @@
|
|||
<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"/>
|
||||
android:text="@string/bullet"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
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"
|
||||
/>
|
||||
android:maxWidth="240dp"
|
||||
android:paddingTop="@dimen/standard_gap"
|
||||
android:text="@string/tutorial_4_subtext_1"
|
||||
android:textAlignment="textStart"
|
||||
android:textColor="@android:color/white" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
|
@ -76,21 +105,20 @@
|
|||
<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"/>
|
||||
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:layout_gravity="center"
|
||||
android:textAlignment="textStart"
|
||||
android:gravity="start"
|
||||
android:textColor="@android:color/white"
|
||||
/>
|
||||
android:textColor="@android:color/white" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
|
@ -103,24 +131,23 @@
|
|||
<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"/>
|
||||
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:layout_gravity="center"
|
||||
android:textAlignment="textStart"
|
||||
android:gravity="start"
|
||||
android:textColor="@android:color/white"
|
||||
/>
|
||||
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>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
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>
|
||||
|
|
@ -85,8 +85,8 @@
|
|||
<string name="about_license">The Wikimedia Commons app is an open-source app created and maintained by grantees and volunteers of the Wikimedia community. The Wikimedia Foundation is not involved in the creation, development, or maintenance of the app. </string>
|
||||
<string name="trademarked_name" translatable="false">Wikimedia Commons</string>
|
||||
<string name="about_improve">Create a new <a href=\"https://github.com/commons-app/apps-android-commons/issues\">GitHub issue</a> for bug reports and suggestions.</string>
|
||||
<string name="about_privacy_policy"><![CDATA[<u>Privacy policy</u>]]></string>
|
||||
<string name="about_credits"><![CDATA[<u>Credits</u>]]></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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue