diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 80f6e4b8..e5aa6809 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -17,6 +17,7 @@
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
+
@@ -173,9 +174,16 @@
android:name="android.support.PARENT_ACTIVITY"
android:value=".activities.main.MainActivity" />
-
+
+
+
\ No newline at end of file
diff --git a/app/src/main/java/gr/thmmy/mthmmy/activities/inbox/InboxActivity.java b/app/src/main/java/gr/thmmy/mthmmy/activities/inbox/InboxActivity.java
new file mode 100644
index 00000000..57952965
--- /dev/null
+++ b/app/src/main/java/gr/thmmy/mthmmy/activities/inbox/InboxActivity.java
@@ -0,0 +1,27 @@
+package gr.thmmy.mthmmy.activities.inbox;
+
+import android.os.Bundle;
+
+import gr.thmmy.mthmmy.R;
+import gr.thmmy.mthmmy.base.BaseActivity;
+
+public class InboxActivity extends BaseActivity {
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_inbox);
+
+ //Initialize toolbar
+ toolbar = findViewById(R.id.toolbar);
+ toolbar.setTitle("Inbox");
+ setSupportActionBar(toolbar);
+ if (getSupportActionBar() != null) {
+ getSupportActionBar().setDisplayHomeAsUpEnabled(true);
+ getSupportActionBar().setDisplayShowHomeEnabled(true);
+ }
+
+ createDrawer();
+ drawer.setSelection(INBOX_ID);
+ }
+}
diff --git a/app/src/main/java/gr/thmmy/mthmmy/base/BaseActivity.java b/app/src/main/java/gr/thmmy/mthmmy/base/BaseActivity.java
index d8019545..61c39969 100644
--- a/app/src/main/java/gr/thmmy/mthmmy/base/BaseActivity.java
+++ b/app/src/main/java/gr/thmmy/mthmmy/base/BaseActivity.java
@@ -48,6 +48,7 @@ import gr.thmmy.mthmmy.activities.AboutActivity;
import gr.thmmy.mthmmy.activities.LoginActivity;
import gr.thmmy.mthmmy.activities.bookmarks.BookmarksActivity;
import gr.thmmy.mthmmy.activities.downloads.DownloadsActivity;
+import gr.thmmy.mthmmy.activities.inbox.InboxActivity;
import gr.thmmy.mthmmy.activities.main.MainActivity;
import gr.thmmy.mthmmy.activities.profile.ProfileActivity;
import gr.thmmy.mthmmy.activities.settings.SettingsActivity;
@@ -161,6 +162,7 @@ public abstract class BaseActivity extends AppCompatActivity {
protected static final int ABOUT_ID = 5;
protected static final int SETTINGS_ID = 6;
protected static final int SHOUTBOX_ID = 7;
+ protected static final int INBOX_ID = 8;
private AccountHeader accountHeader;
private ProfileDrawerItem profileDrawerItem;
@@ -175,8 +177,9 @@ public abstract class BaseActivity extends AppCompatActivity {
final int selectedPrimaryColor = ContextCompat.getColor(this, R.color.primary_dark);
final int selectedSecondaryColor = ContextCompat.getColor(this, R.color.accent);
- PrimaryDrawerItem homeItem, bookmarksItem, settingsItem, aboutItem, shoutboxItem;
- IconicsDrawable homeIcon, homeIconSelected, downloadsIcon, downloadsIconSelected, uploadIcon, uploadIconSelected, settingsIcon,
+ PrimaryDrawerItem homeItem, bookmarksItem, settingsItem, aboutItem, shoutboxItem, inboxItem;
+ IconicsDrawable homeIcon, homeIconSelected, downloadsIcon, downloadsIconSelected, uploadIcon,
+ uploadIconSelected, settingsIcon,
settingsIconSelected, bookmarksIcon, bookmarksIconSelected, aboutIcon, aboutIconSelected;
//Drawer Icons
@@ -274,6 +277,18 @@ public abstract class BaseActivity extends AppCompatActivity {
.withSelectedIconColor(selectedSecondaryColor)
.withIconTintingEnabled(true);
+ inboxItem = new PrimaryDrawerItem()
+ .withTextColor(primaryColor)
+ .withSelectedColor(selectedPrimaryColor)
+ .withSelectedTextColor(selectedSecondaryColor)
+ .withIdentifier(INBOX_ID)
+ .withName(R.string.inbox)
+ .withIcon(R.drawable.ic_message_white_24dp)
+ .withIconColor(primaryColor)
+ .withSelectedIconColor(selectedSecondaryColor)
+ .withIconTintingEnabled(true);
+
+
if (sessionManager.isLoggedIn()) //When logged in
{
loginLogoutItem = new PrimaryDrawerItem()
@@ -368,6 +383,11 @@ public abstract class BaseActivity extends AppCompatActivity {
Intent intent = new Intent(BaseActivity.this, ShoutboxActivity.class);
startActivity(intent);
}
+ } else if (drawerItem.equals(INBOX_ID)) {
+ if (!(BaseActivity.this instanceof InboxActivity)) {
+ Intent intent = new Intent(BaseActivity.this, InboxActivity.class);
+ startActivity(intent);
+ }
} else if (drawerItem.equals(DOWNLOADS_ID)) {
if (!(BaseActivity.this instanceof DownloadsActivity)) {
Intent intent = new Intent(BaseActivity.this, DownloadsActivity.class);
@@ -412,7 +432,7 @@ public abstract class BaseActivity extends AppCompatActivity {
});
if (sessionManager.isLoggedIn())
- drawerBuilder.addDrawerItems(homeItem, bookmarksItem, shoutboxItem, downloadsItem, settingsItem, loginLogoutItem, aboutItem);
+ drawerBuilder.addDrawerItems(homeItem, bookmarksItem, shoutboxItem, inboxItem, downloadsItem, settingsItem, loginLogoutItem, aboutItem);
else
drawerBuilder.addDrawerItems(homeItem, bookmarksItem, shoutboxItem, settingsItem, loginLogoutItem, aboutItem);
diff --git a/app/src/main/res/drawable/ic_message_white_24dp.xml b/app/src/main/res/drawable/ic_message_white_24dp.xml
new file mode 100644
index 00000000..a935c9d5
--- /dev/null
+++ b/app/src/main/res/drawable/ic_message_white_24dp.xml
@@ -0,0 +1,5 @@
+
+
+
diff --git a/app/src/main/res/layout/activity_inbox.xml b/app/src/main/res/layout/activity_inbox.xml
new file mode 100644
index 00000000..79b8b848
--- /dev/null
+++ b/app/src/main/res/layout/activity_inbox.xml
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index bf3d9e5f..f306a815 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -11,6 +11,8 @@
About
Home
Bookmarks
+ Shoutbox
+ Inbox
Info
OK
Cancel
@@ -21,7 +23,6 @@
Recent
Forum
Unread
- Shoutbox
Refresh
diff --git a/build.gradle b/build.gradle
index 463af701..7b07a1e4 100644
--- a/build.gradle
+++ b/build.gradle
@@ -8,7 +8,7 @@ buildscript {
jcenter()
}
dependencies {
- classpath 'com.android.tools.build:gradle:3.2.1'
+ classpath 'com.android.tools.build:gradle:3.3.0'
classpath 'com.google.gms:google-services:4.2.0'
classpath 'io.fabric.tools:gradle:1.26.1'
classpath 'org.ajoberstar.grgit:grgit-core:3.0.0' // Also change in app/gradle/grgit.gradle
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 07d9d5c1..9758fbe6 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
-#Fri Sep 28 13:21:54 EEST 2018
+#Sat Feb 09 12:35:50 EET 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip