package com.liferay.events;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

/**
 * @author Javier Gamarra
 */
public class AddTalkFragment extends Fragment {

	@Nullable
	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
		return inflater.inflate(R.layout.content_add_talk, container, false);
	}

	public static Fragment newInstance() {
		return new AddTalkFragment();
	}
}

@@ -88,24 +88,71 @@
 n.Nullable;%0A
+import android.support.design.widget.Snackbar;%0A
 import andro
@@ -273,16 +273,278 @@
 Group;%0A%0A
+import com.liferay.mobile.screens.ddl.form.DDLFormListener;%0Aimport com.liferay.mobile.screens.ddl.form.DDLFormScreenlet;%0Aimport com.liferay.mobile.screens.ddl.model.DocumentField;%0Aimport com.liferay.mobile.screens.ddl.model.Record;%0A%0Aimport org.json.JSONObject;%0A%0A
 /**%0A * @
@@ -615,16 +615,43 @@
 ragment 
+implements DDLFormListener 
 %7B%0A%0A%09@Nul
@@ -770,22 +770,30 @@
 te) %7B%0A%09%09
-return
+View inflate =
  inflate
@@ -852,85 +852,1468 @@
 e);%0A
-%09%7D%0A%0A%09public static Fragment newInstance() %7B%0A%09%09return new AddTalkFragment();%0A%09%7D
+%0A%09%09DDLFormScreenlet ddlFormScreenlet = (DDLFormScreenlet) inflate.findViewById(R.id.ddl_form);%0A%09%09ddlFormScreenlet.setListener(this);%0A%0A%0A%0A%09%09return inflate;%0A%09%7D%0A%0A%09@Override%0A%09public void onCreate(@Nullable Bundle savedInstanceState) %7B%0A%09%09super.onCreate(savedInstanceState);%0A%0A%09%09_view = getActivity().findViewById(android.R.id.content);%0A%09%7D%0A%0A%09public static Fragment newInstance() %7B%0A%09%09return new AddTalkFragment();%0A%09%7D%0A%0A%09@Override%0A%09public void onDDLFormLoaded(Record record) %7B%0A%0A%09%7D%0A%0A%09@Override%0A%09public void onDDLFormRecordLoaded(Record record) %7B%0A%0A%09%7D%0A%0A%09@Override%0A%09public void onDDLFormRecordAdded(Record record) %7B%0A%0A%09%09Snackbar.make(_view, %22Record added!%22, Snackbar.LENGTH_LONG).show();%0A%09%7D%0A%0A%09@Override%0A%09public void onDDLFormRecordUpdated(Record record) %7B%0A%0A%09%7D%0A%0A%09@Override%0A%09public void onDDLFormLoadFailed(Exception e) %7B%0A%0A%09%7D%0A%0A%09@Override%0A%09public void onDDLFormRecordLoadFailed(Exception e) %7B%0A%0A%09%7D%0A%0A%09@Override%0A%09public void onDDLFormRecordAddFailed(Exception e) %7B%0A%0A%09%7D%0A%0A%09@Override%0A%09public void onDDLFormUpdateRecordFailed(Exception e) %7B%0A%0A%09%7D%0A%0A%09@Override%0A%09public void onDDLFormDocumentUploaded(DocumentField documentField, JSONObject jsonObject) %7B%0A%0A%09%7D%0A%0A%09@Override%0A%09public void onDDLFormDocumentUploadFailed(DocumentField documentField, Exception e) %7B%0A%0A%09%7D%0A%0A%09@Override%0A%09public void loadingFromCache(boolean success) %7B%0A%0A%09%7D%0A%0A%09@Override%0A%09public void retrievingOnline(boolean triedInCache, Exception e) %7B%0A%0A%09%7D%0A%0A%09@Override%0A%09public void storingToCache(Object object) %7B%0A%0A%09%7D%0A%0A%09private View _view;
 %0A%7D%0A

save message