From 22a2a31afe470cd10c614776db442f72593d6cd5 Mon Sep 17 00:00:00 2001 From: Vavassor Date: Mon, 13 Feb 2017 00:18:17 -0500 Subject: [PATCH] Changed visual theme to a dark style. Also, set up things for a future switchable light/dark theme. --- .../com/keylesspalace/tusky/MainActivity.java | 11 ++- .../tusky/NotificationsFragment.java | 35 +++++++- .../tusky/PullNotificationService.java | 2 +- .../com/keylesspalace/tusky/SFragment.java | 2 +- .../com/keylesspalace/tusky/StatusButton.java | 54 ++++++++++++ .../keylesspalace/tusky/StatusViewHolder.java | 52 +++++------ .../keylesspalace/tusky/TimelineFragment.java | 4 +- .../tusky/TimelinePagerAdapter.java | 15 +++- .../main/res/color/favourite_button_dark.xml | 7 ++ app/src/main/res/color/reblog_button_dark.xml | 8 ++ app/src/main/res/drawable/ic_extra.xml | 20 ++--- app/src/main/res/drawable/ic_favourite.xml | 7 ++ .../main/res/drawable/ic_favourite_off.xml | 7 -- app/src/main/res/drawable/ic_favourite_on.xml | 7 -- app/src/main/res/drawable/ic_favourited.xml | 4 +- app/src/main/res/drawable/ic_followed.xml | 2 +- app/src/main/res/drawable/ic_media.xml | 14 +-- app/src/main/res/drawable/ic_options.xml | 2 +- app/src/main/res/drawable/ic_reblog.xml | 7 ++ .../main/res/drawable/ic_reblog_disabled.xml | 16 ++-- app/src/main/res/drawable/ic_reblog_off.xml | 11 --- app/src/main/res/drawable/ic_reblog_on.xml | 11 --- app/src/main/res/drawable/ic_reblogged.xml | 4 +- app/src/main/res/drawable/ic_reply.xml | 12 +-- .../main/res/drawable/splash_background.xml | 2 +- app/src/main/res/drawable/status_divider.xml | 2 +- app/src/main/res/drawable/tab_page_margin.xml | 2 +- app/src/main/res/layout/activity_account.xml | 5 +- app/src/main/res/layout/activity_compose.xml | 4 +- app/src/main/res/layout/activity_login.xml | 7 +- app/src/main/res/layout/activity_main.xml | 6 +- app/src/main/res/layout/activity_view_tag.xml | 7 +- .../main/res/layout/activity_view_thread.xml | 6 +- app/src/main/res/layout/item_follow.xml | 28 +++--- app/src/main/res/layout/item_status.xml | 82 +++++++++--------- .../res/layout/item_status_notification.xml | 32 +++---- app/src/main/res/layout/tab_main.xml | 15 ++++ app/src/main/res/mipmap-hdpi/ic_notify.png | Bin 0 -> 918 bytes app/src/main/res/mipmap-ldpi/ic_notify.png | Bin 0 -> 529 bytes app/src/main/res/mipmap-xhdpi/ic_notify.png | Bin 0 -> 1310 bytes app/src/main/res/values/attrs.xml | 18 ++++ app/src/main/res/values/colors.xml | 22 +++-- app/src/main/res/values/dimens.xml | 10 ++- app/src/main/res/values/styles.xml | 45 +++++++++- 44 files changed, 377 insertions(+), 230 deletions(-) create mode 100644 app/src/main/java/com/keylesspalace/tusky/StatusButton.java create mode 100644 app/src/main/res/color/favourite_button_dark.xml create mode 100644 app/src/main/res/color/reblog_button_dark.xml create mode 100644 app/src/main/res/drawable/ic_favourite.xml delete mode 100644 app/src/main/res/drawable/ic_favourite_off.xml delete mode 100644 app/src/main/res/drawable/ic_favourite_on.xml create mode 100644 app/src/main/res/drawable/ic_reblog.xml delete mode 100644 app/src/main/res/drawable/ic_reblog_off.xml delete mode 100644 app/src/main/res/drawable/ic_reblog_on.xml create mode 100644 app/src/main/res/layout/tab_main.xml create mode 100644 app/src/main/res/mipmap-hdpi/ic_notify.png create mode 100644 app/src/main/res/mipmap-ldpi/ic_notify.png create mode 100644 app/src/main/res/mipmap-xhdpi/ic_notify.png diff --git a/app/src/main/java/com/keylesspalace/tusky/MainActivity.java b/app/src/main/java/com/keylesspalace/tusky/MainActivity.java index 5ef86cbf..b74a6247 100644 --- a/app/src/main/java/com/keylesspalace/tusky/MainActivity.java +++ b/app/src/main/java/com/keylesspalace/tusky/MainActivity.java @@ -64,7 +64,7 @@ public class MainActivity extends AppCompatActivity { setSupportActionBar(toolbar); // Setup the tabs and timeline pager. - TimelinePagerAdapter adapter = new TimelinePagerAdapter(getSupportFragmentManager()); + TimelinePagerAdapter adapter = new TimelinePagerAdapter(getSupportFragmentManager(), this); String[] pageTitles = { getString(R.string.title_home), getString(R.string.title_notifications), @@ -72,13 +72,18 @@ public class MainActivity extends AppCompatActivity { }; adapter.setPageTitles(pageTitles); ViewPager viewPager = (ViewPager) findViewById(R.id.pager); - int pageMargin = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 8, - getResources().getDisplayMetrics()); + int pageMargin = getResources().getDimensionPixelSize(R.dimen.tab_page_margin); viewPager.setPageMargin(pageMargin); viewPager.setPageMarginDrawable(R.drawable.tab_page_margin); viewPager.setAdapter(adapter); TabLayout tabLayout = (TabLayout) findViewById(R.id.tab_layout); tabLayout.setupWithViewPager(viewPager); + for (int i = 0; i < tabLayout.getTabCount(); i++) { + TabLayout.Tab tab = tabLayout.getTabAt(i); + if (tab != null) { + tab.setCustomView(adapter.getTabView(i)); + } + } // Retrieve notification update preference. SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this); diff --git a/app/src/main/java/com/keylesspalace/tusky/NotificationsFragment.java b/app/src/main/java/com/keylesspalace/tusky/NotificationsFragment.java index b815a7cd..b14ff211 100644 --- a/app/src/main/java/com/keylesspalace/tusky/NotificationsFragment.java +++ b/app/src/main/java/com/keylesspalace/tusky/NotificationsFragment.java @@ -19,6 +19,7 @@ import android.content.Context; import android.graphics.drawable.Drawable; import android.os.Bundle; import android.support.annotation.Nullable; +import android.support.design.widget.TabLayout; import android.support.v4.content.ContextCompat; import android.support.v4.widget.SwipeRefreshLayout; import android.support.v7.widget.DividerItemDecoration; @@ -47,7 +48,10 @@ public class NotificationsFragment extends SFragment implements private SwipeRefreshLayout swipeRefreshLayout; private RecyclerView recyclerView; + private LinearLayoutManager layoutManager; + private EndlessOnScrollListener scrollListener; private NotificationsAdapter adapter; + private TabLayout.OnTabSelectedListener onTabSelectedListener; public static NotificationsFragment newInstance() { NotificationsFragment fragment = new NotificationsFragment(); @@ -69,14 +73,14 @@ public class NotificationsFragment extends SFragment implements // Setup the RecyclerView. recyclerView = (RecyclerView) rootView.findViewById(R.id.recycler_view); recyclerView.setHasFixedSize(true); - LinearLayoutManager layoutManager = new LinearLayoutManager(context); + layoutManager = new LinearLayoutManager(context); recyclerView.setLayoutManager(layoutManager); DividerItemDecoration divider = new DividerItemDecoration( context, layoutManager.getOrientation()); Drawable drawable = ContextCompat.getDrawable(context, R.drawable.status_divider); divider.setDrawable(drawable); recyclerView.addItemDecoration(divider); - EndlessOnScrollListener scrollListener = new EndlessOnScrollListener(layoutManager) { + scrollListener = new EndlessOnScrollListener(layoutManager) { @Override public void onLoadMore(int page, int totalItemsCount, RecyclerView view) { NotificationsAdapter adapter = (NotificationsAdapter) view.getAdapter(); @@ -92,11 +96,38 @@ public class NotificationsFragment extends SFragment implements adapter = new NotificationsAdapter(this, this); recyclerView.setAdapter(adapter); + TabLayout layout = (TabLayout) getActivity().findViewById(R.id.tab_layout); + onTabSelectedListener = new TabLayout.OnTabSelectedListener() { + @Override + public void onTabSelected(TabLayout.Tab tab) {} + + @Override + public void onTabUnselected(TabLayout.Tab tab) {} + + @Override + public void onTabReselected(TabLayout.Tab tab) { + jumpToTop(); + } + }; + layout.addOnTabSelectedListener(onTabSelectedListener); + sendFetchNotificationsRequest(); return rootView; } + @Override + public void onDestroyView() { + TabLayout tabLayout = (TabLayout) getActivity().findViewById(R.id.tab_layout); + tabLayout.removeOnTabSelectedListener(onTabSelectedListener); + super.onDestroyView(); + } + + private void jumpToTop() { + layoutManager.scrollToPosition(0); + scrollListener.reset(); + } + private void sendFetchNotificationsRequest(final String fromId) { String endpoint = getString(R.string.endpoint_notifications); String url = "https://" + domain + endpoint; diff --git a/app/src/main/java/com/keylesspalace/tusky/PullNotificationService.java b/app/src/main/java/com/keylesspalace/tusky/PullNotificationService.java index d69189c5..94862ade 100644 --- a/app/src/main/java/com/keylesspalace/tusky/PullNotificationService.java +++ b/app/src/main/java/com/keylesspalace/tusky/PullNotificationService.java @@ -182,7 +182,7 @@ public class PullNotificationService extends IntentService { mentions.get(0).displayName); } NotificationCompat.Builder builder = new NotificationCompat.Builder(this) - .setSmallIcon(R.drawable.ic_notify_mention) + .setSmallIcon(R.mipmap.ic_notify) .setContentTitle(title); if (icon != null) { builder.setLargeIcon(icon); diff --git a/app/src/main/java/com/keylesspalace/tusky/SFragment.java b/app/src/main/java/com/keylesspalace/tusky/SFragment.java index a4652ec7..a139c5ef 100644 --- a/app/src/main/java/com/keylesspalace/tusky/SFragment.java +++ b/app/src/main/java/com/keylesspalace/tusky/SFragment.java @@ -82,7 +82,7 @@ public class SFragment extends Fragment { new Response.ErrorListener() { @Override public void onErrorResponse(VolleyError error) { - Log.e(TAG, error.getMessage()); + Log.e(TAG, "Request Failed: " + error.getMessage()); } }) { @Override diff --git a/app/src/main/java/com/keylesspalace/tusky/StatusButton.java b/app/src/main/java/com/keylesspalace/tusky/StatusButton.java new file mode 100644 index 00000000..926c1224 --- /dev/null +++ b/app/src/main/java/com/keylesspalace/tusky/StatusButton.java @@ -0,0 +1,54 @@ +/* Copyright 2017 Andrew Dawson + * + * This file is part of Tusky. + * + * Tusky is free software: you can redistribute it and/or modify it under the terms of the GNU + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * Tusky is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even + * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General + * Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Tusky. If not, see + * . */ + +package com.keylesspalace.tusky; + +import android.content.Context; +import android.content.res.TypedArray; +import android.support.v7.widget.AppCompatImageButton; +import android.util.AttributeSet; + +public class StatusButton extends AppCompatImageButton { + private static final int[] STATE_MARKED = { R.attr.state_marked }; + + private boolean marked; + + public StatusButton(Context context, AttributeSet attributeSet) { + super(context, attributeSet); + TypedArray array = context.getTheme().obtainStyledAttributes( + attributeSet, R.styleable.StatusButton, 0, 0); + try { + marked = array.getBoolean(R.styleable.StatusButton_state_marked, false); + } finally { + array.recycle(); + } + } + + @Override + public int[] onCreateDrawableState(int extraSpace) { + if (marked) { + extraSpace += 1; + } + int[] drawableState = super.onCreateDrawableState(extraSpace); + if (marked) { + mergeDrawableStates(drawableState, STATE_MARKED); + } + return drawableState; + } + + public void setMarked(boolean marked) { + this.marked = marked; + } +} diff --git a/app/src/main/java/com/keylesspalace/tusky/StatusViewHolder.java b/app/src/main/java/com/keylesspalace/tusky/StatusViewHolder.java index 62f48825..7383214f 100644 --- a/app/src/main/java/com/keylesspalace/tusky/StatusViewHolder.java +++ b/app/src/main/java/com/keylesspalace/tusky/StatusViewHolder.java @@ -42,11 +42,11 @@ public class StatusViewHolder extends RecyclerView.ViewHolder { private TextView sinceCreated; private TextView content; private NetworkImageView avatar; - private ImageView boostedIcon; - private TextView boostedByUsername; + private View rebloggedBar; + private TextView rebloggedByUsername; private ImageButton replyButton; - private ImageButton reblogButton; - private ImageButton favouriteButton; + private StatusButton reblogButton; + private StatusButton favouriteButton; private ImageButton moreButton; private boolean favourited; private boolean reblogged; @@ -69,11 +69,11 @@ public class StatusViewHolder extends RecyclerView.ViewHolder { avatar = (NetworkImageView) itemView.findViewById(R.id.status_avatar); avatar.setDefaultImageResId(R.drawable.avatar_default); avatar.setErrorImageResId(R.drawable.avatar_error); - boostedIcon = (ImageView) itemView.findViewById(R.id.status_boosted_icon); - boostedByUsername = (TextView) itemView.findViewById(R.id.status_boosted); + rebloggedBar = itemView.findViewById(R.id.status_reblogged_bar); + rebloggedByUsername = (TextView) itemView.findViewById(R.id.status_reblogged); replyButton = (ImageButton) itemView.findViewById(R.id.status_reply); - reblogButton = (ImageButton) itemView.findViewById(R.id.status_reblog); - favouriteButton = (ImageButton) itemView.findViewById(R.id.status_favourite); + reblogButton = (StatusButton) itemView.findViewById(R.id.status_reblog); + favouriteButton = (StatusButton) itemView.findViewById(R.id.status_favourite); moreButton = (ImageButton) itemView.findViewById(R.id.status_more); reblogged = false; favourited = false; @@ -175,40 +175,34 @@ public class StatusViewHolder extends RecyclerView.ViewHolder { } public void setRebloggedByUsername(String name) { - Context context = boostedByUsername.getContext(); + Context context = rebloggedByUsername.getContext(); String format = context.getString(R.string.status_boosted_format); String boostedText = String.format(format, name); - boostedByUsername.setText(boostedText); - boostedIcon.setVisibility(View.VISIBLE); - boostedByUsername.setVisibility(View.VISIBLE); + rebloggedByUsername.setText(boostedText); + rebloggedBar.setVisibility(View.VISIBLE); } public void hideRebloggedByUsername() { - boostedIcon.setVisibility(View.GONE); - boostedByUsername.setVisibility(View.GONE); + rebloggedBar.setVisibility(View.GONE); } public void setReblogged(boolean reblogged) { this.reblogged = reblogged; - if (!reblogged) { - reblogButton.setImageResource(R.drawable.ic_reblog_off); - } else { - reblogButton.setImageResource(R.drawable.ic_reblog_on); - } + reblogButton.setMarked(reblogged); } - public void disableReblogging() { - reblogButton.setEnabled(false); - reblogButton.setImageResource(R.drawable.ic_reblog_disabled); + public void setRebloggingEnabled(boolean enabled) { + reblogButton.setEnabled(enabled); + if (enabled) { + reblogButton.setImageResource(R.drawable.ic_reblog); + } else { + reblogButton.setImageResource(R.drawable.ic_reblog_disabled); + } } public void setFavourited(boolean favourited) { this.favourited = favourited; - if (!favourited) { - favouriteButton.setImageResource(R.drawable.ic_favourite_off); - } else { - favouriteButton.setImageResource(R.drawable.ic_favourite_on); - } + favouriteButton.setMarked(favourited); } public void setMediaPreviews(final Status.MediaAttachment[] attachments, @@ -353,9 +347,7 @@ public class StatusViewHolder extends RecyclerView.ViewHolder { hideSensitiveMediaWarning(); } setupButtons(listener, position); - if (status.getVisibility() == Status.Visibility.PRIVATE) { - disableReblogging(); - } + setRebloggingEnabled(status.getVisibility() != Status.Visibility.PRIVATE); if (status.getSpoilerText().isEmpty()) { hideSpoilerText(); } else { diff --git a/app/src/main/java/com/keylesspalace/tusky/TimelineFragment.java b/app/src/main/java/com/keylesspalace/tusky/TimelineFragment.java index dcef6553..8fe9ad47 100644 --- a/app/src/main/java/com/keylesspalace/tusky/TimelineFragment.java +++ b/app/src/main/java/com/keylesspalace/tusky/TimelineFragment.java @@ -157,7 +157,7 @@ public class TimelineFragment extends SFragment implements } private void jumpToTop() { - layoutManager.scrollToPositionWithOffset(0, 0); + layoutManager.scrollToPosition(0); scrollListener.reset(); } @@ -241,7 +241,7 @@ public class TimelineFragment extends SFragment implements public void onFetchTimelineFailure(Exception exception) { setFetchTimelineState(FooterViewHolder.State.RETRY); swipeRefreshLayout.setRefreshing(false); - Log.e(TAG, exception.getMessage()); + Log.e(TAG, "Fetch Failure: " + exception.getMessage()); } private void setFetchTimelineState(FooterViewHolder.State state) { diff --git a/app/src/main/java/com/keylesspalace/tusky/TimelinePagerAdapter.java b/app/src/main/java/com/keylesspalace/tusky/TimelinePagerAdapter.java index 35e5921e..3ce1b4bd 100644 --- a/app/src/main/java/com/keylesspalace/tusky/TimelinePagerAdapter.java +++ b/app/src/main/java/com/keylesspalace/tusky/TimelinePagerAdapter.java @@ -15,15 +15,21 @@ package com.keylesspalace.tusky; +import android.content.Context; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentPagerAdapter; +import android.view.LayoutInflater; +import android.view.View; +import android.widget.TextView; public class TimelinePagerAdapter extends FragmentPagerAdapter { private String[] pageTitles; + private Context context; - public TimelinePagerAdapter(FragmentManager manager) { + public TimelinePagerAdapter(FragmentManager manager, Context context) { super(manager); + this.context = context; } public void setPageTitles(String[] titles) { @@ -57,4 +63,11 @@ public class TimelinePagerAdapter extends FragmentPagerAdapter { public CharSequence getPageTitle(int position) { return pageTitles[position]; } + + public View getTabView(int position) { + View view = LayoutInflater.from(context).inflate(R.layout.tab_main, null); + TextView title = (TextView) view.findViewById(R.id.title); + title.setText(pageTitles[position]); + return view; + } } diff --git a/app/src/main/res/color/favourite_button_dark.xml b/app/src/main/res/color/favourite_button_dark.xml new file mode 100644 index 00000000..fe6dc5a8 --- /dev/null +++ b/app/src/main/res/color/favourite_button_dark.xml @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/color/reblog_button_dark.xml b/app/src/main/res/color/reblog_button_dark.xml new file mode 100644 index 00000000..cd05a725 --- /dev/null +++ b/app/src/main/res/color/reblog_button_dark.xml @@ -0,0 +1,8 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/ic_extra.xml b/app/src/main/res/drawable/ic_extra.xml index a87c95d5..62fddb87 100644 --- a/app/src/main/res/drawable/ic_extra.xml +++ b/app/src/main/res/drawable/ic_extra.xml @@ -1,15 +1,7 @@ - - - - + + diff --git a/app/src/main/res/drawable/ic_favourite.xml b/app/src/main/res/drawable/ic_favourite.xml new file mode 100644 index 00000000..24478b8b --- /dev/null +++ b/app/src/main/res/drawable/ic_favourite.xml @@ -0,0 +1,7 @@ + + + diff --git a/app/src/main/res/drawable/ic_favourite_off.xml b/app/src/main/res/drawable/ic_favourite_off.xml deleted file mode 100644 index 7a171bea..00000000 --- a/app/src/main/res/drawable/ic_favourite_off.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - diff --git a/app/src/main/res/drawable/ic_favourite_on.xml b/app/src/main/res/drawable/ic_favourite_on.xml deleted file mode 100644 index 7ebaaee5..00000000 --- a/app/src/main/res/drawable/ic_favourite_on.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - diff --git a/app/src/main/res/drawable/ic_favourited.xml b/app/src/main/res/drawable/ic_favourited.xml index 62dc1101..fe780bc2 100644 --- a/app/src/main/res/drawable/ic_favourited.xml +++ b/app/src/main/res/drawable/ic_favourited.xml @@ -1,7 +1,7 @@ - diff --git a/app/src/main/res/drawable/ic_followed.xml b/app/src/main/res/drawable/ic_followed.xml index a586267b..bdef7ee8 100644 --- a/app/src/main/res/drawable/ic_followed.xml +++ b/app/src/main/res/drawable/ic_followed.xml @@ -1,6 +1,6 @@ - diff --git a/app/src/main/res/drawable/ic_media.xml b/app/src/main/res/drawable/ic_media.xml index 53658657..ee873111 100644 --- a/app/src/main/res/drawable/ic_media.xml +++ b/app/src/main/res/drawable/ic_media.xml @@ -2,30 +2,30 @@ android:viewportWidth="1134.6519" android:width="48dp" xmlns:android="http://schemas.android.com/apk/res/android"> diff --git a/app/src/main/res/drawable/ic_options.xml b/app/src/main/res/drawable/ic_options.xml index 7981620b..b4f39bea 100644 --- a/app/src/main/res/drawable/ic_options.xml +++ b/app/src/main/res/drawable/ic_options.xml @@ -2,6 +2,6 @@ android:viewportWidth="1133.8583" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android"> diff --git a/app/src/main/res/drawable/ic_reblog.xml b/app/src/main/res/drawable/ic_reblog.xml new file mode 100644 index 00000000..3666855f --- /dev/null +++ b/app/src/main/res/drawable/ic_reblog.xml @@ -0,0 +1,7 @@ + + + diff --git a/app/src/main/res/drawable/ic_reblog_disabled.xml b/app/src/main/res/drawable/ic_reblog_disabled.xml index 8d1960db..afafe08e 100644 --- a/app/src/main/res/drawable/ic_reblog_disabled.xml +++ b/app/src/main/res/drawable/ic_reblog_disabled.xml @@ -1,11 +1,7 @@ - - - + + diff --git a/app/src/main/res/drawable/ic_reblog_off.xml b/app/src/main/res/drawable/ic_reblog_off.xml deleted file mode 100644 index bae42451..00000000 --- a/app/src/main/res/drawable/ic_reblog_off.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - diff --git a/app/src/main/res/drawable/ic_reblog_on.xml b/app/src/main/res/drawable/ic_reblog_on.xml deleted file mode 100644 index 516a346b..00000000 --- a/app/src/main/res/drawable/ic_reblog_on.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - diff --git a/app/src/main/res/drawable/ic_reblogged.xml b/app/src/main/res/drawable/ic_reblogged.xml index 18fcfcd6..1f9d8b64 100644 --- a/app/src/main/res/drawable/ic_reblogged.xml +++ b/app/src/main/res/drawable/ic_reblogged.xml @@ -1,7 +1,7 @@ - diff --git a/app/src/main/res/drawable/ic_reply.xml b/app/src/main/res/drawable/ic_reply.xml index 03247650..3df673b9 100644 --- a/app/src/main/res/drawable/ic_reply.xml +++ b/app/src/main/res/drawable/ic_reply.xml @@ -1,7 +1,7 @@ - - + + diff --git a/app/src/main/res/drawable/splash_background.xml b/app/src/main/res/drawable/splash_background.xml index a52d78a0..fb783fdf 100644 --- a/app/src/main/res/drawable/splash_background.xml +++ b/app/src/main/res/drawable/splash_background.xml @@ -1,6 +1,6 @@ - + - + \ No newline at end of file diff --git a/app/src/main/res/drawable/tab_page_margin.xml b/app/src/main/res/drawable/tab_page_margin.xml index ebad62bd..cc795044 100644 --- a/app/src/main/res/drawable/tab_page_margin.xml +++ b/app/src/main/res/drawable/tab_page_margin.xml @@ -1,5 +1,5 @@ - + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_account.xml b/app/src/main/res/layout/activity_account.xml index 5169d596..02f73c95 100644 --- a/app/src/main/res/layout/activity_account.xml +++ b/app/src/main/res/layout/activity_account.xml @@ -23,7 +23,7 @@ android:layout_height="wrap_content" android:orientation="vertical" android:layout_marginTop="?attr/actionBarSize" - android:background="@color/account_header_background"> + android:background="?attr/account_header_background_color"> diff --git a/app/src/main/res/layout/activity_compose.xml b/app/src/main/res/layout/activity_compose.xml index 4e1d5468..8238b6c0 100644 --- a/app/src/main/res/layout/activity_compose.xml +++ b/app/src/main/res/layout/activity_compose.xml @@ -15,7 +15,7 @@ android:layout_width="48dp" android:layout_height="48dp" app:srcCompat="@drawable/media_selector" - style="?android:attr/borderlessButtonStyle" + style="?attr/image_button_style" android:id="@+id/compose_photo_pick" android:layout_marginLeft="8dp" /> @@ -24,7 +24,7 @@ android:layout_height="48dp" android:id="@+id/compose_options" app:srcCompat="@drawable/ic_options" - style="?android:attr/borderlessButtonStyle" + style="?attr/image_button_style" android:layout_marginLeft="8dp" /> diff --git a/app/src/main/res/layout/activity_login.xml b/app/src/main/res/layout/activity_login.xml index e7d97d29..b913af60 100644 --- a/app/src/main/res/layout/activity_login.xml +++ b/app/src/main/res/layout/activity_login.xml @@ -1,7 +1,6 @@ + android:background="@color/colorPrimary" + android:elevation="4dp" /> + android:background="@color/colorPrimary" + android:elevation="4dp" /> + android:background="@color/colorPrimary" + android:elevation="4dp" /> + android:background="@color/colorPrimary" + android:elevation="4dp" /> - - - - - + android:id="@+id/follow_icon" + app:srcCompat="@drawable/ic_followed" + android:paddingTop="@dimen/notification_icon_vertical_padding" + android:paddingBottom="@dimen/notification_icon_vertical_padding" + android:paddingRight="@dimen/status_avatar_padding" + android:paddingLeft="@dimen/follow_icon_left_padding" + android:tint="?attr/notification_icon_tint" /> + android:layout_centerVertical="true" + android:layout_toRightOf="@id/follow_icon" /> \ No newline at end of file diff --git a/app/src/main/res/layout/item_status.xml b/app/src/main/res/layout/item_status.xml index a89d5430..98459f67 100644 --- a/app/src/main/res/layout/item_status.xml +++ b/app/src/main/res/layout/item_status.xml @@ -5,38 +5,37 @@ android:layout_height="wrap_content" android:id="@+id/status_container"> - + android:layout_alignParentLeft="true" + android:layout_marginTop="@dimen/status_reblogged_bar_top_padding"> - + + + + + + android:layout_below="@+id/status_reblogged_bar" + android:layout_width="wrap_content" + android:paddingTop="@dimen/status_avatar_padding"> + android:paddingLeft="@dimen/status_username_left_margin" + android:textColor="?attr/status_text_color_secondary" /> + android:paddingLeft="@dimen/status_since_created_left_margin" + android:textColor="?attr/status_text_color_secondary" /> @@ -92,7 +94,7 @@ android:id="@+id/status_content_warning_button" android:textOn="@string/status_content_warning_show_less" android:textOff="@string/status_content_warning_show_more" - android:background="@drawable/toggle_small" + android:background="?attr/content_warning_button" android:padding="4dp" /> @@ -196,7 +198,7 @@ @@ -205,10 +207,10 @@ android:layout_height="match_parent" android:layout_weight="1" /> - @@ -217,12 +219,12 @@ android:layout_height="match_parent" android:layout_weight="1" /> - + style="?attr/favourite_button_style" + app:srcCompat="@drawable/ic_favourite" + android:id="@+id/status_favourite" /> diff --git a/app/src/main/res/layout/item_status_notification.xml b/app/src/main/res/layout/item_status_notification.xml index 3e6bc7c4..02f630f6 100644 --- a/app/src/main/res/layout/item_status_notification.xml +++ b/app/src/main/res/layout/item_status_notification.xml @@ -1,13 +1,13 @@ - + android:id="@+id/notification_top_bar"> + android:tint="?attr/notification_icon_tint" /> + + - - - \ No newline at end of file + \ No newline at end of file diff --git a/app/src/main/res/layout/tab_main.xml b/app/src/main/res/layout/tab_main.xml new file mode 100644 index 00000000..d0e481be --- /dev/null +++ b/app/src/main/res/layout/tab_main.xml @@ -0,0 +1,15 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/mipmap-hdpi/ic_notify.png b/app/src/main/res/mipmap-hdpi/ic_notify.png new file mode 100644 index 0000000000000000000000000000000000000000..14b0e5e7d0ffbe2728c4955a08ac69b9bb284c5f GIT binary patch literal 918 zcmV;H18Mw;P)ZDDC{FM4HiZ!a+} zFfYdAz4-tD0z3exp&U| zzsH>anVB15gWi3U;r1rz?y)%CZM(0=G%ea#{4EQ zr9k}|prcsktAHV6{v4GabASf zsWZPzq6YW}pbGe8uH+d|8i9M>@Gd3^aF85YBJidIUkz_xT=Pon>hDJ69<_omj~k%P z64@Amw-6XKyq;L*M(CCi`4+MFSu6OaxaPC1ht7=%yuFtBBfyCpV234iG9;%77%`kN zps_H^A0?8~*6~mX^Tm>`OR6wKXC23Rnj}EIbzD}!e5#~wNpsE68%f9Fnoo%KSuMyG zsO_?9{{Wdp=0^0TCHk3wHy^N@$>>UKZiH`pg!lN=q=4^M%`i|?tN@*!0PlfnPt9ph z&4oOA(}0yx0yOYHx-nZVpn}}fZUW6dI_1DFpdWY*lt&41%_qbqUGd>JdSlk-m z2=LBRw?9gN6q6U@1O|Y|K4aT}Q@}&q2az8JfRvBdX571}+IwOaa4$eCDt-V5FuP~V zBTcTIZ-KNoL^*H>_!-l96gUUW^SSa3CYX)hpq4BGt^ng9jlbZwq}E5P6nBmIwW_7i z+E@l0$A3mfO~?!ZD;`)2^aO;yoY&kVv@Sqo9Ctyr0&{?wKt0d_+{rUzuW;Wh;bCT? z82AXp+dbp?Tch@HT%80PnZ1&Pe95Ou&+!rdkPxNE|9uNiM2mkUxWsZCNw s(o#t&Nh6X5B|VXpm6UZHXEaFTFP|~KyBnZu)Bpeg07*qoM6N<$g70>YJ^%m! literal 0 HcmV?d00001 diff --git a/app/src/main/res/mipmap-ldpi/ic_notify.png b/app/src/main/res/mipmap-ldpi/ic_notify.png new file mode 100644 index 0000000000000000000000000000000000000000..af1bb099dbb6f79bb1082c39721fa90fc60b93ef GIT binary patch literal 529 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`EX7WqAsj$Z!;#Vf2?- zNDyXRHFsqjkRe&(8c`CQpH@mmtT}V`<;yxP*DU(k#l}Q zWl?5&MhSznvw=cDX;MyRvVu!~ZenJhf=g;jW^!UlW`3SRMoCG5mA-y*Q7VvMmYSTO zo133k3^Gi=0IVkktVO>nwJ2ZTP|raB*yFuF85kI~JY5_^EP8t{*=igOlwkYtcu}6% zl!FhFCpJzzleD?hQ`7jRmS(Eqrs$Lqp-HY?K{KYT@k%n(;Q3@2BX8ea{968h_4;(n z=e75rSDvdpU+v_4k_^;F5#YqB5Qsgtm-+Qv}g8%ElGNB=Q3G+lya4}==<%;lguq| zXg=%0*Tt&@zB~vje6n#?MzN0Fhq_N{kv@;i6!#pmnWem3PP_A0MU;1Gp%Lqx1j*TT z`>GjtpZH_gp_W@HbaX>+&d!%t6xxez9x+x+_yRMP)ZDDC{FM4HiZ!a+} zFfYdAz4-tD1UE@UK~!jg#oAklRb?2)@pq4!m4}GZ($XvlEwj{0BnzS_#5BXGq#`6L z%9|o0I$Q_|NfHHVB^r7WNnT`02fFBD(7-^!3zLd6NE0(lOKV6|e_gEEwPx+L_F?wg z({nY<{=Vn=zk9y*oz_IOC``jjY{M~$j^Yhm)~ert3FGmpzWM>rVN6c@3NFU2IP?Et zPQ%Q_Zz=E-c(oZY4999L7zoxpfO)B*QiZ>#MUS(vAJ24(vnY5P{>luShx_UEVsHQX zWpfqLBv_!VvV-QMf*H7aGY76q=zz<<@w!-$(wUe}h%nin<$CsTnvnB1o4ohiRZ z%3|%x393ZI%bCw!s8lMu+RU1o`gv5FUd6&4nW6IyPAkE8N6PbwGFbCMy6|PDfSXJ3 zotW|L%$k7PGC?1e9s&W0_@1Z^zAb5+K(N6xmp z6yd#0*pqGg&Cd)SSY8%yHf%5sXToN;;Wq)lX8gX_sY4BBs@0T!dYvuVZKib!HTJ%_) z;{kI!#hniSEGKwL3;k#5duFa`QzyC809$gxzi6`WIruTB|DPDwY4$2ab`7ZN>L&WG zE9kpyAlR!Ac@HtHZ_sa++QkYEVZ=c32No6-a0=Jg>9@I{-%BlIcWL*A0;6%f0A@Ev z=Jc6S(Ee{+*ktZ3Y{$KA70_$;P5}^Xk}Oi`_HP!n-O@zXRBZI$@Y{=F?G`Xe?G0R7 zYj8%Y{l0>Bxx)v8Fb5yXe{PnxRX}gZ^K}X!xrtt+_JE$&!VL6GER}rA_0)q2O)yTA z84c+VD|oj-5Xl^0q-A&t@2lP6HqwR$@KbsV?Z)_`MuV}o#o#jZIj*P!KTa|Nsyc+b z>s7lLe+&TlK0Jh)8^RRJ7|G>Yp4QeY;v#(9A@IX^R)a$huEL%=K5OdrubRxku9Coa z<8e)_)VND>xlp7-Xzq?xGNU|zZ~FoLJ2pt}TnmRvDr;14`$l@KDfoL=1|E^CMz%MC8xu`8pO6vr9W;<5K+6SzaDf#M{rBW;8R76kZhC7)J{zAIDD#z3hq<;ez{d0#S#o1F!)R%LnLcJx4y4y z8)-k5YvC1C$KRMsu2&XB#EgizJR-(M#E^(M5fKL>VsAuji-^q;(Os!jPPXFz53nZ; Uf;yBstpET307*qoM6N<$f + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index 6259a454..003920a1 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -1,13 +1,21 @@ - #3F51B5 - #303F9F - #FF4081 - #4F4F4F + #44A673 + #2C996E + #3F8A65 + #3C4945 + #191E1E + #4F4F4F + #3F8A65 + #CFCFCF #000000 #303030 - #DFDFDF - #4F5F6F + #2F2F2F + #AFBFCF #9F9F9F - #FFFFFF + #CFCFCF + #A4B4BC + #000000 + #4C534B + #000000 diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml index cb38da87..96aad150 100644 --- a/app/src/main/res/values/dimens.xml +++ b/app/src/main/res/values/dimens.xml @@ -3,9 +3,9 @@ 0dp 4dp 4dp - 56dp 8dp - 5dp + 8dp + 40dp 4dp 96dp 8dp @@ -13,7 +13,11 @@ 16dp 48dp 8dp - 4dp + 8dp + 40dp + 64dp + 40dp 8dp 8dp + 8dp diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index f3b6bd2a..4f5fbbfc 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -1,10 +1,51 @@ - - + + + + + + + +