Assign values of title and desc form fields to vars

This commit is contained in:
misaochan 2016-10-07 18:22:05 +13:00
parent def0954e6d
commit 13e2f04c28

View file

@ -49,7 +49,10 @@ public class SingleUploadFragment extends Fragment {
public boolean onOptionsItemSelected(MenuItem item) { public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) { switch (item.getItemId()) {
case R.id.menu_upload_single: case R.id.menu_upload_single:
uploadActionInitiatedHandler.uploadActionInitiated(titleEdit.getText().toString(), descEdit.getText().toString()); //TODO: Save the values of these fields in short-lived cache so next time this fragment is loaded, we can access these
String title = titleEdit.getText().toString();
String desc = descEdit.getText().toString();
uploadActionInitiatedHandler.uploadActionInitiated(title, desc);
return true; return true;
} }
@ -62,6 +65,7 @@ public class SingleUploadFragment extends Fragment {
titleEdit = (EditText)rootView.findViewById(R.id.titleEdit); titleEdit = (EditText)rootView.findViewById(R.id.titleEdit);
descEdit = (EditText)rootView.findViewById(R.id.descEdit); descEdit = (EditText)rootView.findViewById(R.id.descEdit);
//TODO: Add button here for 'copy from previous upload'
licenseSummaryView = (TextView)rootView.findViewById(R.id.share_license_summary); licenseSummaryView = (TextView)rootView.findViewById(R.id.share_license_summary);
TextWatcher uploadEnabler = new TextWatcher() { TextWatcher uploadEnabler = new TextWatcher() {