Insert image name and desc into shared preference

This commit is contained in:
misaochan 2017-12-31 19:03:08 +10:00 committed by maskara
parent 4b83037299
commit 6605eb070c

View file

@ -1,6 +1,8 @@
package fr.free.nrw.commons.nearby;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.graphics.Color;
import android.net.Uri;
import android.os.Bundle;
@ -398,6 +400,13 @@ public class NearbyMapFragment extends android.support.v4.app.Fragment {
fabCamera.setOnClickListener(view -> {
//TODO: Change this to activate camera upload (see ContributionsListFragment). Insert shared preference.
Timber.d("Image title: " + place.getName() + "Image desc: " + place.getLongDescription());
SharedPreferences sharedPref = getActivity().getPreferences(Context.MODE_PRIVATE);
SharedPreferences.Editor editor = sharedPref.edit();
editor.putString("Title", place.getName());
editor.putString("Desc", place.getLongDescription());
editor.apply();
openWebView(place.siteLinks.getWikidataLink());
});