diff --git a/editor/build.gradle b/editor/build.gradle index 603bf7c7f574..894d96386d03 100644 --- a/editor/build.gradle +++ b/editor/build.gradle @@ -38,6 +38,8 @@ android { dependencies { compile 'com.android.support:appcompat-v7:21.0.+' compile 'com.android.support:support-v4:21.0.+' + releaseCompile project(path:':libs:utils:WordPressUtils', configuration: 'release') + debugCompile project(path:':libs:utils:WordPressUtils', configuration: 'debug') } signing { diff --git a/editor/src/main/java/org/wordpress/android/editor/EditorFragment.java b/editor/src/main/java/org/wordpress/android/editor/EditorFragment.java index c7eca7c1e1a5..309962134107 100644 --- a/editor/src/main/java/org/wordpress/android/editor/EditorFragment.java +++ b/editor/src/main/java/org/wordpress/android/editor/EditorFragment.java @@ -21,30 +21,18 @@ import java.io.InputStreamReader; public class EditorFragment extends Fragment { - // TODO: Rename parameter arguments, choose names that match - // the fragment initialization parameters, e.g. ARG_ITEM_NUMBER - private static final String ARG_PARAM1 = "param1"; - private static final String ARG_PARAM2 = "param2"; + private static final String ARG_PARAM_TITLE = "param_title"; + private static final String ARG_PARAM_CONTENT = "param_content"; - // TODO: Rename and change types of parameters - private String mParam1; - private String mParam2; + private String mParamTitle; + private String mParamContent; private WebView mWebView; - /** - * Use this factory method to create a new instance of - * this fragment using the provided parameters. - * - * @param param1 Parameter 1. - * @param param2 Parameter 2. - * @return A new instance of fragment EditorFragment. - */ - // TODO: Rename and change types and number of parameters - public static EditorFragment newInstance(String param1, String param2) { + public static EditorFragment newInstance(String title, String content) { EditorFragment fragment = new EditorFragment(); Bundle args = new Bundle(); - args.putString(ARG_PARAM1, param1); - args.putString(ARG_PARAM2, param2); + args.putString(ARG_PARAM_TITLE, title); + args.putString(ARG_PARAM_CONTENT, content); fragment.setArguments(args); return fragment; } @@ -56,8 +44,8 @@ public EditorFragment() { public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (getArguments() != null) { - mParam1 = getArguments().getString(ARG_PARAM1); - mParam2 = getArguments().getString(ARG_PARAM2); + mParamTitle = getArguments().getString(ARG_PARAM_TITLE); + mParamContent = getArguments().getString(ARG_PARAM_CONTENT); } }