Merge upstream
This commit is contained in:
parent
e72227abf0
commit
473f7f75f1
6 changed files with 45 additions and 6 deletions
|
@ -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'
|
||||
}
|
||||
|
|
|
@ -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 = {
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -16,14 +16,14 @@
|
|||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
<!--<android.support.v7.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:theme="@style/AppTheme.Account.AppBarLayout"
|
||||
app:popupTheme="@style/AppTheme.Account.ToolbarPopupTheme.Dark"
|
||||
android:elevation="4dp"
|
||||
android:background="?attr/toolbar_background_color" />
|
||||
android:background="?attr/toolbar_background_color" />-->
|
||||
|
||||
<android.support.v4.view.ViewPager
|
||||
android:id="@+id/pager"
|
||||
|
@ -34,9 +34,11 @@
|
|||
android:id="@+id/tab_layout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?android:colorBackground"
|
||||
android:paddingTop="?attr/actionBarSize"
|
||||
app:tabTextAppearance="@style/TabLayoutTextStyle"
|
||||
app:tabBackground="?android:colorBackground"
|
||||
app:tabPaddingStart="1dp"
|
||||
app:tabPaddingTop="4dp"
|
||||
app:tabPaddingEnd="1dp">
|
||||
|
||||
<android.support.design.widget.TabItem
|
||||
|
@ -59,6 +61,19 @@
|
|||
</android.support.v4.view.ViewPager>
|
||||
</LinearLayout>
|
||||
|
||||
<com.arlib.floatingsearchview.FloatingSearchView
|
||||
android:id="@+id/floating_search_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:floatingSearch_searchBarMarginLeft="6dp"
|
||||
app:floatingSearch_searchBarMarginTop="4dp"
|
||||
app:floatingSearch_searchBarMarginRight="6dp"
|
||||
app:floatingSearch_searchHint="@string/search"
|
||||
app:floatingSearch_suggestionsListAnimDuration="250"
|
||||
app:floatingSearch_showSearchKey="false"
|
||||
app:floatingSearch_leftActionMode="showHamburger"
|
||||
app:floatingSearch_close_search_on_keyboard_dismiss="true"/>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/overlay_fragment_container"
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
@ -162,5 +162,6 @@
|
|||
<string name="action_unmute">Unmute</string>
|
||||
<string name="error_unmuting">That user wasn\'t unmuted.</string>
|
||||
<string name="error_muting">That user wasn\'t muted.</string>
|
||||
<string name="search">Search accounts...</string>
|
||||
|
||||
</resources>
|
||||
|
|
|
@ -65,6 +65,16 @@
|
|||
<item name="material_drawer_selected">@color/color_primary_dark</item>
|
||||
<item name="material_drawer_selected_text">@color/text_color_primary_dark</item>
|
||||
<item name="material_drawer_header_selection_text">@color/text_color_primary_dark</item>
|
||||
|
||||
<item name="floatingSearch_backgroundColor">@color/toolbar_background_dark</item>
|
||||
<item name="floatingSearch_viewTextColor">@color/text_color_secondary_dark</item>
|
||||
<item name="floatingSearch_hintTextColor">@color/text_color_tertiary_dark</item>
|
||||
<item name="floatingSearch_dividerColor">@color/status_divider_dark</item>
|
||||
<item name="floatingSearch_clearBtnColor">@color/toolbar_icon_dark</item>
|
||||
<item name="floatingSearch_leftActionColor">@color/toolbar_icon_dark</item>
|
||||
<item name="floatingSearch_menuItemIconColor">@color/toolbar_icon_dark</item>
|
||||
<item name="floatingSearch_suggestionRightIconColor">@color/toolbar_icon_dark</item>
|
||||
<item name="floatingSearch_actionMenuOverflowColor">@color/toolbar_icon_dark</item>-->
|
||||
</style>
|
||||
|
||||
<style name="AppTheme.ImageButton.Dark" parent="@style/Widget.AppCompat.Button.Borderless.Colored">
|
||||
|
|
Loading…
Reference in a new issue