diff --git a/app/build.gradle b/app/build.gradle
index b5204053..3c7d3242 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -41,4 +41,7 @@ dependencies {
}
compile 'com.github.chrisbanes:PhotoView:1.3.1'
compile 'com.mikepenz:google-material-typeface:3.0.1.0.original@aar'
+ compile 'com.github.arimorty:floatingsearchview:2.0.3'
+ compile 'org.parceler:parceler-api:1.1.6'
+ annotationProcessor 'org.parceler:parceler:1.1.6'
}
diff --git a/app/src/main/java/com/keylesspalace/tusky/MainActivity.java b/app/src/main/java/com/keylesspalace/tusky/MainActivity.java
index 280dabf4..94116846 100644
--- a/app/src/main/java/com/keylesspalace/tusky/MainActivity.java
+++ b/app/src/main/java/com/keylesspalace/tusky/MainActivity.java
@@ -32,6 +32,7 @@ import android.support.v7.widget.Toolbar;
import android.view.View;
import android.widget.ImageView;
+import com.arlib.floatingsearchview.FloatingSearchView;
import com.keylesspalace.tusky.entity.Account;
import com.mikepenz.google_material_typeface_library.GoogleMaterial;
import com.mikepenz.materialdrawer.AccountHeader;
@@ -41,6 +42,7 @@ import com.mikepenz.materialdrawer.DrawerBuilder;
import com.mikepenz.materialdrawer.model.DividerDrawerItem;
import com.mikepenz.materialdrawer.model.PrimaryDrawerItem;
import com.mikepenz.materialdrawer.model.ProfileDrawerItem;
+import com.mikepenz.materialdrawer.model.SecondaryDrawerItem;
import com.mikepenz.materialdrawer.model.interfaces.IDrawerItem;
import com.mikepenz.materialdrawer.model.interfaces.IProfile;
import com.mikepenz.materialdrawer.util.AbstractDrawerImageLoader;
@@ -73,8 +75,8 @@ public class MainActivity extends BaseActivity {
// Fetch user info while we're doing other things.
fetchUserInfo();
- Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
- setSupportActionBar(toolbar);
+ //Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
+ //setSupportActionBar(toolbar);
FloatingActionButton floatingBtn = (FloatingActionButton) findViewById(R.id.floating_btn);
floatingBtn.setOnClickListener(new View.OnClickListener() {
@@ -85,6 +87,8 @@ public class MainActivity extends BaseActivity {
}
});
+ final FloatingSearchView searchView = (FloatingSearchView) findViewById(R.id.floating_search_view);
+
headerResult = new AccountHeaderBuilder()
.withActivity(this)
.withSelectionListEnabledForSingleProfile(false)
@@ -106,7 +110,7 @@ public class MainActivity extends BaseActivity {
drawer = new DrawerBuilder()
.withActivity(this)
- .withToolbar(toolbar)
+ //.withToolbar(toolbar)
.withAccountHeader(headerResult)
.withHasStableIds(true)
.withSelectedItem(-1)
@@ -158,6 +162,8 @@ public class MainActivity extends BaseActivity {
})
.build();
+ searchView.attachNavigationDrawerToMenuButton(drawer.getDrawerLayout());
+
// Setup the tabs and timeline pager.
TimelinePagerAdapter adapter = new TimelinePagerAdapter(getSupportFragmentManager());
String[] pageTitles = {
diff --git a/app/src/main/java/com/keylesspalace/tusky/entity/Account.java b/app/src/main/java/com/keylesspalace/tusky/entity/Account.java
index d091512e..486dc6f6 100644
--- a/app/src/main/java/com/keylesspalace/tusky/entity/Account.java
+++ b/app/src/main/java/com/keylesspalace/tusky/entity/Account.java
@@ -15,10 +15,14 @@
package com.keylesspalace.tusky.entity;
+import android.os.Parcel;
import android.text.Spanned;
+import com.arlib.floatingsearchview.suggestions.model.SearchSuggestion;
import com.google.gson.annotations.SerializedName;
+import org.parceler.Parcels;
+
public class Account {
public String id;
diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml
index 004527b6..64251fad 100644
--- a/app/src/main/res/layout/activity_main.xml
+++ b/app/src/main/res/layout/activity_main.xml
@@ -16,14 +16,14 @@
android:layout_height="match_parent"
android:orientation="vertical">
-
+ android:background="?attr/toolbar_background_color" />-->
+
+
Unmute
That user wasn\'t unmuted.
That user wasn\'t muted.
+ Search accounts...
diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml
index 37cb2999..41ce0b58 100644
--- a/app/src/main/res/values/styles.xml
+++ b/app/src/main/res/values/styles.xml
@@ -65,6 +65,16 @@
- @color/color_primary_dark
- @color/text_color_primary_dark
- @color/text_color_primary_dark
+
+ - @color/toolbar_background_dark
+ - @color/text_color_secondary_dark
+ - @color/text_color_tertiary_dark
+ - @color/status_divider_dark
+ - @color/toolbar_icon_dark
+ - @color/toolbar_icon_dark
+ - @color/toolbar_icon_dark
+ - @color/toolbar_icon_dark
+ - @color/toolbar_icon_dark
-->