mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
Tidy up and create framework for autofilling EditText
This commit is contained in:
parent
ccb0c87b5f
commit
565e61c0d1
3 changed files with 9 additions and 11 deletions
|
|
@ -39,15 +39,6 @@ class DirectUpload {
|
|||
editor.putString("Title", title);
|
||||
editor.putString("Desc", desc);
|
||||
editor.apply();
|
||||
|
||||
/**
|
||||
//TODO remove this
|
||||
sharedPref = fragment.getActivity().getSharedPreferences(Context.MODE_PRIVATE);
|
||||
String imageTitle = sharedPref.getString("Title", "");
|
||||
String imageDesc = sharedPref.getString("Desc", "");
|
||||
|
||||
Timber.d("In DirectUpload, image title: " + imageTitle + " and image desc: " + imageDesc);
|
||||
*/
|
||||
}
|
||||
|
||||
void initiateGalleryUpload() {
|
||||
|
|
|
|||
|
|
@ -227,12 +227,13 @@ public class ShareActivity
|
|||
}
|
||||
if (intent.hasExtra("isDirectUpload")) {
|
||||
Timber.d("This was initiated by a direct upload from Nearby");
|
||||
//TODO: Shift this into title/desc screen after upload initiated
|
||||
|
||||
SharedPreferences sharedPref = this.getSharedPreferences("Direct Upload", Context.MODE_PRIVATE);
|
||||
String imageTitle = sharedPref.getString("Title", "");
|
||||
String imageDesc = sharedPref.getString("Desc", "");
|
||||
|
||||
Timber.d("In ShareActivity, image title: " + imageTitle + " and image desc: " + imageDesc);
|
||||
|
||||
|
||||
}
|
||||
mimeType = intent.getType();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -104,6 +104,12 @@ public class SingleUploadFragment extends DaggerFragment {
|
|||
|
||||
license = prefs.getString(Prefs.DEFAULT_LICENSE, Prefs.Licenses.CC_BY_SA_3);
|
||||
|
||||
//TODO: Get this to display title and desc
|
||||
if (true) {
|
||||
titleEdit.setText("");
|
||||
descEdit.setText("");
|
||||
}
|
||||
|
||||
// check if this is the first time we have uploaded
|
||||
if (prefs.getString("Title", "").trim().length() == 0
|
||||
&& prefs.getString("Desc", "").trim().length() == 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue