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_content/CreateContentActivity.java index 524d022c..781bb9f3 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/activities/create_content/CreateContentActivity.java +++ b/app/src/main/java/gr/thmmy/mthmmy/activities/create_content/CreateContentActivity.java @@ -5,11 +5,8 @@ import android.content.SharedPreferences; import android.os.Bundle; import android.preference.PreferenceManager; import android.support.design.widget.TextInputLayout; -import android.support.v7.app.AppCompatActivity; -import android.support.v7.widget.Toolbar; import android.view.View; import android.view.inputmethod.InputConnection; -import android.widget.TextView; import android.widget.Toast; import gr.thmmy.mthmmy.R; @@ -21,7 +18,7 @@ import gr.thmmy.mthmmy.session.SessionManager; import me.zhanghai.android.materialprogressbar.MaterialProgressBar; import timber.log.Timber; -public class CreateContentActivity extends AppCompatActivity implements EmojiKeyboard.EmojiKeyboardOwner, +public class CreateContentActivity extends BaseActivity implements EmojiKeyboard.EmojiKeyboardOwner, NewTopicTask.NewTopicTaskCallbacks { public final static String EXTRA_NEW_TOPIC_URL = "new-topic-extra"; @@ -37,14 +34,13 @@ public class CreateContentActivity extends AppCompatActivity implements EmojiKey setContentView(R.layout.activity_create_content); //Initialize toolbar - Toolbar toolbar = findViewById(R.id.toolbar); + toolbar = findViewById(R.id.toolbar); toolbar.setTitle("Create topic"); setSupportActionBar(toolbar); if (getSupportActionBar() != null) { getSupportActionBar().setDisplayHomeAsUpEnabled(true); getSupportActionBar().setDisplayShowHomeEnabled(true); } - ((TextView) findViewById(R.id.toolbar_title)).setText(R.string.create_topic); progressBar = findViewById(R.id.progressBar); diff --git a/app/src/main/res/layout/activity_create_content.xml b/app/src/main/res/layout/activity_create_content.xml index 9578bd2d..04af0ea4 100644 --- a/app/src/main/res/layout/activity_create_content.xml +++ b/app/src/main/res/layout/activity_create_content.xml @@ -24,14 +24,8 @@ android:layout_width="match_parent" android:layout_height="?attr/actionBarSize" android:background="?attr/colorPrimary" - app:contentInsetStartWithNavigation="0dp" + android:gravity="center" app:popupTheme="@style/ToolbarTheme"> - -