From 99b8b2c297dc35c9c023d6843f8b7fa2d80028d1 Mon Sep 17 00:00:00 2001 From: oogee Date: Mon, 21 Jan 2019 22:08:31 +0200 Subject: [PATCH] externalize editor with subject input field --- app/src/main/AndroidManifest.xml | 2 +- .../activities/board/BoardActivity.java | 6 ++-- .../CreateTopicActivity.java} | 4 +-- .../NewTopicTask.java | 2 +- .../res/layout/activity_create_content.xml | 28 +++------------- app/src/main/res/layout/full_post_editor.xml | 32 +++++++++++++++++++ 6 files changed, 43 insertions(+), 31 deletions(-) rename app/src/main/java/gr/thmmy/mthmmy/activities/{create_content/CreateContentActivity.java => create_topic/CreateTopicActivity.java} (96%) rename app/src/main/java/gr/thmmy/mthmmy/activities/{create_content => create_topic}/NewTopicTask.java (98%) create mode 100644 app/src/main/res/layout/full_post_editor.xml diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 7620bcf7..1640d0d2 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -161,7 +161,7 @@ diff --git a/app/src/main/java/gr/thmmy/mthmmy/activities/board/BoardActivity.java b/app/src/main/java/gr/thmmy/mthmmy/activities/board/BoardActivity.java index 61fc45e6..41b92813 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/activities/board/BoardActivity.java +++ b/app/src/main/java/gr/thmmy/mthmmy/activities/board/BoardActivity.java @@ -23,7 +23,7 @@ import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; import gr.thmmy.mthmmy.R; import gr.thmmy.mthmmy.activities.LoginActivity; -import gr.thmmy.mthmmy.activities.create_content.CreateContentActivity; +import gr.thmmy.mthmmy.activities.create_topic.CreateTopicActivity; import gr.thmmy.mthmmy.base.BaseActivity; import gr.thmmy.mthmmy.model.Board; import gr.thmmy.mthmmy.model.Bookmark; @@ -105,8 +105,8 @@ public class BoardActivity extends BaseActivity implements BoardAdapter.OnLoadMo newTopicFAB.setOnClickListener(view -> { if (sessionManager.isLoggedIn()) { if (newTopicUrl != null) { - Intent intent = new Intent(this, CreateContentActivity.class); - intent.putExtra(CreateContentActivity.EXTRA_NEW_TOPIC_URL, newTopicUrl); + Intent intent = new Intent(this, CreateTopicActivity.class); + intent.putExtra(CreateTopicActivity.EXTRA_NEW_TOPIC_URL, newTopicUrl); startActivity(intent); } } else { diff --git a/app/src/main/java/gr/thmmy/mthmmy/activities/create_content/CreateContentActivity.java b/app/src/main/java/gr/thmmy/mthmmy/activities/create_topic/CreateTopicActivity.java similarity index 96% rename from app/src/main/java/gr/thmmy/mthmmy/activities/create_content/CreateContentActivity.java rename to app/src/main/java/gr/thmmy/mthmmy/activities/create_topic/CreateTopicActivity.java index 920a03b9..4bc6efe3 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/activities/create_content/CreateContentActivity.java +++ b/app/src/main/java/gr/thmmy/mthmmy/activities/create_topic/CreateTopicActivity.java @@ -1,4 +1,4 @@ -package gr.thmmy.mthmmy.activities.create_content; +package gr.thmmy.mthmmy.activities.create_topic; import android.content.Intent; import android.content.SharedPreferences; @@ -21,7 +21,7 @@ import gr.thmmy.mthmmy.session.SessionManager; import me.zhanghai.android.materialprogressbar.MaterialProgressBar; import timber.log.Timber; -public class CreateContentActivity extends BaseActivity implements NewTopicTask.NewTopicTaskCallbacks { +public class CreateTopicActivity extends BaseActivity implements NewTopicTask.NewTopicTaskCallbacks { public final static String EXTRA_NEW_TOPIC_URL = "new-topic-extra"; diff --git a/app/src/main/java/gr/thmmy/mthmmy/activities/create_content/NewTopicTask.java b/app/src/main/java/gr/thmmy/mthmmy/activities/create_topic/NewTopicTask.java similarity index 98% rename from app/src/main/java/gr/thmmy/mthmmy/activities/create_content/NewTopicTask.java rename to app/src/main/java/gr/thmmy/mthmmy/activities/create_topic/NewTopicTask.java index 985e0930..5495d50a 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/activities/create_content/NewTopicTask.java +++ b/app/src/main/java/gr/thmmy/mthmmy/activities/create_topic/NewTopicTask.java @@ -1,4 +1,4 @@ -package gr.thmmy.mthmmy.activities.create_content; +package gr.thmmy.mthmmy.activities.create_topic; import android.os.AsyncTask; diff --git a/app/src/main/res/layout/activity_create_content.xml b/app/src/main/res/layout/activity_create_content.xml index 7e6a9b40..e7f65e47 100644 --- a/app/src/main/res/layout/activity_create_content.xml +++ b/app/src/main/res/layout/activity_create_content.xml @@ -3,7 +3,7 @@ xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" - tools:context=".activities.create_content.CreateContentActivity" + tools:context=".activities.create_topic.CreateTopicActivity" android:layout_height="match_parent" android:layout_width="match_parent" android:fitsSystemWindows="true"> @@ -29,31 +29,11 @@ - - - - - - + android:layout_width="match_parent"/> + + + + + + + + + + \ No newline at end of file