diff --git a/android/android-simple-release.apk b/android/android-simple-release.apk new file mode 100644 index 0000000..9231fb6 Binary files /dev/null and b/android/android-simple-release.apk differ diff --git a/android/build.gradle b/android/build.gradle index fb0bfba..a2c8f26 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -3,8 +3,8 @@ apply plugin: 'crashlytics' apply plugin: 'newrelic' android { - compileSdkVersion 21 - buildToolsVersion '21.1.2' + compileSdkVersion 22 + buildToolsVersion '22.0.1' lintOptions { abortOnError false @@ -25,7 +25,7 @@ android { defaultConfig { applicationId 'com.xda.one' minSdkVersion 14 - targetSdkVersion 21 + targetSdkVersion 22 } buildTypes { @@ -56,38 +56,38 @@ android { } dependencies { - compile 'com.google.android.gms:play-services-plus:6.5.+' - compile 'com.google.android.gms:play-services-identity:6.5.+' + compile 'com.google.android.gms:play-services-plus:7.0.0' + compile 'com.google.android.gms:play-services-identity:7.0.0' + compile 'com.google.android.gms:play-services-analytics:7.0.0' compile 'com.crashlytics.android:crashlytics:1.+' - compile 'com.android.support:support-v4:21.0.3' - compile 'com.android.support:appcompat-v7:21.0.3' - compile 'com.android.support:cardview-v7:21.0.3' - compile 'com.android.support:recyclerview-v7:21.0.3' + compile 'com.android.support:support-v4:22.1.0' + compile 'com.android.support:appcompat-v7:22.1.0' + compile 'com.android.support:cardview-v7:22.1.0' + compile 'com.android.support:recyclerview-v7:22.1.0' - compile 'com.squareup.retrofit:retrofit:1.8.0' - compile 'com.squareup.retrofit:converter-jackson:1.8.0' - compile 'com.squareup.picasso:picasso:2.4.0' + compile 'com.squareup.retrofit:retrofit:1.9.0' + compile 'com.squareup.retrofit:converter-jackson:1.9.0' + compile 'com.squareup.picasso:picasso:2.5.2' - compile 'com.fasterxml.jackson.core:jackson-databind:2.5.0-rc1' - compile 'com.fasterxml.jackson.core:jackson-core:2.5.0-rc1' - compile 'com.fasterxml.jackson.core:jackson-annotations:2.5.0-rc1' + compile 'com.fasterxml.jackson.core:jackson-annotations:2.5.2' + compile 'com.fasterxml.jackson.core:jackson-core:2.5.2' + compile 'com.fasterxml.jackson.core:jackson-databind:2.5.2' - compile 'com.squareup:otto:1.3.5' + compile 'com.squareup:otto:1.3.6' compile 'net.nightwhistler.htmlspanner:htmlspanner:0.5-SNAPSHOT' - - compile 'com.makeramen:roundedimageview:1.3.0' - compile 'me.grantland:autofittextview:0.2.0' + compile 'com.makeramen:roundedimageview:2.0.1' + compile 'me.grantland:autofittextview:0.2.1' compile 'com.github.dmytrodanylyk.circular-progress-button:library:1.1.3' - compile 'org.apache.commons:commons-lang3:3.3.2' + compile 'org.apache.commons:commons-lang3:3.4' compile 'commons-io:commons-io:2.4' - compile 'com.newrelic.agent.android:android-agent:4.+' + compile 'com.newrelic.agent.android:android-agent:4.273.4' - compile fileTree(dir: 'libs', include: '*.jar') + compile fileTree(include: '*.jar', dir: 'libs') } def Properties props = new Properties() @@ -108,4 +108,4 @@ if (propFile.canRead()) { } else { println 'signing.properties not found' android.buildTypes.release.signingConfig = null -} +} \ No newline at end of file diff --git a/android/src/main/java/com/xda/one/auth/XDAAuthenticatorActivity.java b/android/src/main/java/com/xda/one/auth/XDAAuthenticatorActivity.java index edf4881..f2facb1 100644 --- a/android/src/main/java/com/xda/one/auth/XDAAuthenticatorActivity.java +++ b/android/src/main/java/com/xda/one/auth/XDAAuthenticatorActivity.java @@ -1,14 +1,12 @@ package com.xda.one.auth; -import com.xda.one.R; - import android.os.Bundle; import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentActivity; +import android.support.v7.app.AppCompatActivity; -public class XDAAuthenticatorActivity extends FragmentActivity { +import com.xda.one.R; - private final String SCREEN_NAME = "XDAAuthenticatorActivity"; +public class XDAAuthenticatorActivity extends AppCompatActivity { @Override public void onCreate(final Bundle savedInstanceState) { diff --git a/android/src/main/java/com/xda/one/model/augmented/AugmentedUnifiedThread.java b/android/src/main/java/com/xda/one/model/augmented/AugmentedUnifiedThread.java index 93aa419..4e532fc 100644 --- a/android/src/main/java/com/xda/one/model/augmented/AugmentedUnifiedThread.java +++ b/android/src/main/java/com/xda/one/model/augmented/AugmentedUnifiedThread.java @@ -1,16 +1,15 @@ package com.xda.one.model.augmented; +import android.content.Context; +import android.os.Parcel; +import android.os.Parcelable; +import android.text.Spannable; + import com.xda.one.api.model.interfaces.UnifiedThread; import com.xda.one.api.model.response.ResponseUnifiedThread; import com.xda.one.parser.ContentParser; import com.xda.one.parser.TextDataStructure; import com.xda.one.util.PostUtils; -import com.xda.one.util.StringUtils; - -import android.content.Context; -import android.os.Parcel; -import android.os.Parcelable; -import android.text.Spannable; public class AugmentedUnifiedThread implements UnifiedThread { @@ -27,7 +26,7 @@ public AugmentedUnifiedThread[] newArray(int size) { } }; - private static final int MAX_STRING_LENGTH = 100; + private static final int MAX_STRING_LENGTH = 200; private final UnifiedThread mUnifiedThread; diff --git a/android/src/main/java/com/xda/one/ui/BaseActivity.java b/android/src/main/java/com/xda/one/ui/BaseActivity.java index 1867c69..5f1fb62 100644 --- a/android/src/main/java/com/xda/one/ui/BaseActivity.java +++ b/android/src/main/java/com/xda/one/ui/BaseActivity.java @@ -3,8 +3,9 @@ import com.xda.one.util.OneApplication; import android.support.v7.app.ActionBarActivity; +import android.support.v7.app.AppCompatActivity; -public abstract class BaseActivity extends ActionBarActivity { +public abstract class BaseActivity extends AppCompatActivity { public OneApplication getOneApplication() { return (OneApplication) super.getApplication(); diff --git a/android/src/main/java/com/xda/one/ui/FindYourDeviceAdapter.java b/android/src/main/java/com/xda/one/ui/FindYourDeviceAdapter.java index c4acd17..67e3c63 100644 --- a/android/src/main/java/com/xda/one/ui/FindYourDeviceAdapter.java +++ b/android/src/main/java/com/xda/one/ui/FindYourDeviceAdapter.java @@ -1,10 +1,5 @@ package com.xda.one.ui; -import com.squareup.picasso.Picasso; -import com.xda.one.R; -import com.xda.one.api.model.response.ResponseForum; -import com.xda.one.db.ForumDbHelper; - import android.content.Context; import android.database.Cursor; import android.support.v7.widget.RecyclerView; @@ -14,6 +9,11 @@ import android.widget.ImageView; import android.widget.TextView; +import com.squareup.picasso.Picasso; +import com.xda.one.R; +import com.xda.one.api.model.response.ResponseForum; +import com.xda.one.db.ForumDbHelper; + public class FindYourDeviceAdapter extends RecyclerView.Adapter { @@ -48,8 +48,8 @@ public void onBindViewHolder(final FindYourDeviceViewHolder holder, final int po Picasso.with(mContext) .load(forum.getImageUrl()) - .placeholder(R.drawable.phone) - .error(R.drawable.phone) + .placeholder(R.drawable.ic_nav_phone) + .error(R.drawable.ic_nav_phone) .into(holder.imageView); } diff --git a/android/src/main/java/com/xda/one/ui/ForumFragment.java b/android/src/main/java/com/xda/one/ui/ForumFragment.java index a3897db..7f27398 100644 --- a/android/src/main/java/com/xda/one/ui/ForumFragment.java +++ b/android/src/main/java/com/xda/one/ui/ForumFragment.java @@ -1,5 +1,26 @@ package com.xda.one.ui; +import android.content.Intent; +import android.os.Bundle; +import android.support.v4.app.Fragment; +import android.support.v4.app.LoaderManager; +import android.support.v4.content.Loader; +import android.support.v4.view.MenuItemCompat; +import android.support.v4.view.ViewCompat; +import android.support.v4.widget.SwipeRefreshLayout; +import android.support.v7.app.ActionBar; +import android.support.v7.view.ActionMode; +import android.support.v7.widget.RecyclerView; +import android.support.v7.widget.ShareActionProvider; +import android.support.v7.widget.XDALinerLayoutManager; +import android.view.LayoutInflater; +import android.view.Menu; +import android.view.MenuItem; +import android.view.View; +import android.view.ViewGroup; +import android.widget.ImageView; +import android.widget.Toast; + import com.squareup.otto.Subscribe; import com.squareup.picasso.Picasso; import com.xda.one.R; @@ -15,6 +36,8 @@ import com.xda.one.loader.ForumLoader; import com.xda.one.model.misc.ForumType; import com.xda.one.ui.helper.ActionModeHelper; +import com.xda.one.ui.helper.QuickReturnHelper; +import com.xda.one.ui.widget.DividerItemDecoration; import com.xda.one.ui.widget.HierarchySpinnerAdapter; import com.xda.one.ui.widget.XDARefreshLayout; import com.xda.one.util.AccountUtils; @@ -22,27 +45,6 @@ import com.xda.one.util.UIUtils; import com.xda.one.util.Utils; -import android.content.Intent; -import android.os.Bundle; -import android.support.v4.app.Fragment; -import android.support.v4.app.LoaderManager; -import android.support.v4.content.Loader; -import android.support.v4.view.MenuItemCompat; -import android.support.v4.view.ViewCompat; -import android.support.v4.widget.SwipeRefreshLayout; -import android.support.v7.app.ActionBar; -import android.support.v7.view.ActionMode; -import android.support.v7.widget.RecyclerView; -import android.support.v7.widget.ShareActionProvider; -import android.support.v7.widget.XDALinerLayoutManager; -import android.view.LayoutInflater; -import android.view.Menu; -import android.view.MenuItem; -import android.view.View; -import android.view.ViewGroup; -import android.widget.ImageView; -import android.widget.Toast; - import java.util.ArrayList; import java.util.Collections; import java.util.List; @@ -70,7 +72,6 @@ public class ForumFragment extends Fragment private ForumType mForumType = ForumType.ALL; - // Adapter for ListView private ForumAdapter mAdapter; private XDARefreshLayout mRefreshLayout; @@ -94,7 +95,7 @@ public static ForumFragment createInstance(final ForumType forumType) { } public static ForumFragment createInstance(final Forum forum, final String parentTitle, - final ArrayList hierarchy) { + final ArrayList hierarchy) { final Bundle bundle = new Bundle(); bundle.putSerializable(FORUM_TYPE, ForumType.CHILD); bundle.putParcelable(FORUM, forum); @@ -154,7 +155,7 @@ public void setupImageViewDevice(ImageView imageView, Forum forum) { new ForumAdapter.SubscribeButtonDelegate() { @Override public void setupSubscribeButton(ImageView subscribeButton, - final Forum forum) { + final Forum forum) { // Subscribe button onSetupSubscribeButton(subscribeButton, forum); } @@ -175,16 +176,16 @@ public void onClick(final View view) { } }); subscribeButton.setImageResource(forum.isSubscribed() - ? R.drawable.ic_star_light - : R.drawable.ic_star_outline_light); + ? R.drawable.ic_star_outline_selected + : R.drawable.ic_star_outline); } } private void onSetupImageViewListItem(final ImageView imageView, final Forum responseForum) { Picasso.with(getActivity()) .load(responseForum.getImageUrl()) - .placeholder(R.drawable.phone) - .error(R.drawable.phone) + .placeholder(R.drawable.ic_nav_phone) + .error(R.drawable.ic_nav_phone) .into(imageView); } @@ -195,7 +196,7 @@ private void onListItemClicked(final Forum forum) { @Override public View onCreateView(final LayoutInflater inflater, final ViewGroup container, - final Bundle savedInstanceState) { + final Bundle savedInstanceState) { return inflater.inflate(R.layout.forum_fragment, container, false); } @@ -261,7 +262,7 @@ public Loader> onCreateLoader(final int id, final Bundle bun @Override public void onLoadFinished(final Loader> loader, - final List responseForums) { + final List responseForums) { // Remove the old data if the adapter is not empty if (mAdapter.getItemCount() != 0) { mAdapter.clear(); @@ -360,7 +361,7 @@ public boolean onActionItemClicked(ActionMode actionMode, MenuItem menuItem) { @Override public void onCheckedStateChanged(final ActionMode actionMode, final int position, - final boolean isNowChecked) { + final boolean isNowChecked) { actionMode.invalidate(); } } diff --git a/android/src/main/java/com/xda/one/ui/ForumPagerFragment.java b/android/src/main/java/com/xda/one/ui/ForumPagerFragment.java index fdea36f..51ee907 100644 --- a/android/src/main/java/com/xda/one/ui/ForumPagerFragment.java +++ b/android/src/main/java/com/xda/one/ui/ForumPagerFragment.java @@ -4,10 +4,12 @@ import com.xda.one.api.model.response.ResponseForum; import com.xda.one.db.ForumDbHelper; import com.xda.one.model.misc.ForumType; +import com.xda.one.ui.helper.QuickReturnHelper; import com.xda.one.ui.widget.TabLayout; import com.xda.one.util.FragmentUtils; import com.xda.one.util.UIUtils; +import android.app.Activity; import android.app.SearchManager; import android.content.Context; import android.database.Cursor; @@ -21,6 +23,7 @@ import android.support.v7.app.ActionBar; import android.support.v7.app.ActionBarActivity; import android.support.v7.widget.SearchView; +import android.support.v7.widget.Toolbar; import android.text.TextUtils; import android.view.LayoutInflater; import android.view.Menu; @@ -206,4 +209,9 @@ public boolean onSuggestionClick(final int position) { return true; } } + + public interface Callback { + + Toolbar getToolbar(); + } } \ No newline at end of file diff --git a/android/src/main/java/com/xda/one/ui/MainActivity.java b/android/src/main/java/com/xda/one/ui/MainActivity.java index 9a7fe2f..5111d79 100644 --- a/android/src/main/java/com/xda/one/ui/MainActivity.java +++ b/android/src/main/java/com/xda/one/ui/MainActivity.java @@ -1,16 +1,5 @@ package com.xda.one.ui; -import com.google.android.gms.analytics.HitBuilders; -import com.google.android.gms.analytics.Tracker; - -import com.xda.one.R; -import com.xda.one.api.misc.Consumer; -import com.xda.one.model.misc.ForumType; -import com.xda.one.ui.helper.UrlParseHelper; -import com.xda.one.util.AccountUtils; -import com.xda.one.util.FragmentUtils; -import com.xda.one.util.OneApplication; - import android.app.FragmentManager; import android.app.ProgressDialog; import android.content.Intent; @@ -27,11 +16,19 @@ import android.view.View; import android.widget.Toast; -// Add New Relic Reporting -// import com.newrelic.agent.android.NewRelic; +import com.google.android.gms.analytics.HitBuilders; +import com.google.android.gms.analytics.Tracker; +import com.xda.one.R; +import com.xda.one.api.misc.Consumer; +import com.xda.one.model.misc.ForumType; +import com.xda.one.ui.helper.UrlParseHelper; +import com.xda.one.util.AccountUtils; +import com.xda.one.util.FragmentUtils; +import com.xda.one.util.OneApplication; public class MainActivity extends BaseActivity - implements NavigationDrawerFragment.Callback, SubscribedPagerFragment.Callback, + implements NavigationDrawerFragment.Callback, ForumPagerFragment.Callback, + SubscribedPagerFragment.Callback, ThreadFragment.Callback, PostPagerFragment.Callback, SearchFragment.Callback { private static final String SCREEN_NAME = "XDA-One MainActivity"; @@ -166,8 +163,15 @@ protected void onResumeFragments() { } } + private static long back_pressed; + @Override public void onBackPressed() { + if (mDrawerLayout.isDrawerOpen(Gravity.START)) { + mDrawerLayout.closeDrawer(Gravity.LEFT); + return; + } + final Fragment fragment = getSupportFragmentManager().findFragmentById(R.id.content_frame); // TODO - fix this hack if (fragment instanceof SearchFragment) { @@ -182,12 +186,26 @@ public void onBackPressed() { } } + if (getSupportFragmentManager().getBackStackEntryCount() == 0) { + if (back_pressed + 2000 > System.currentTimeMillis()) { + super.onBackPressed(); + } else { + Toast.makeText(getBaseContext(), R.string.double_back_press, Toast.LENGTH_SHORT).show(); + back_pressed = System.currentTimeMillis(); + return; + } + } + + /* if (!mDrawerLayout.isDrawerOpen(Gravity.START) && getSupportFragmentManager().getBackStackEntryCount() == 0) { mDrawerLayout.openDrawer(Gravity.START); return; } + */ + super.onBackPressed(); + } @Override @@ -225,7 +243,7 @@ private void switchCurrentlyDisplayedFragment(final Fragment fragment) { @Override public void switchCurrentlyDisplayedFragment(final Fragment fragment, - final boolean backStackAndAnimate, final String title) { + final boolean backStackAndAnimate, final String title) { getSupportFragmentManager().popBackStack(null, FragmentManager.POP_BACK_STACK_INCLUSIVE); final FragmentTransaction transaction = FragmentUtils .getDefaultTransaction(getSupportFragmentManager()); diff --git a/android/src/main/java/com/xda/one/ui/MessageFragment.java b/android/src/main/java/com/xda/one/ui/MessageFragment.java index 1a0d492..dc8d95b 100644 --- a/android/src/main/java/com/xda/one/ui/MessageFragment.java +++ b/android/src/main/java/com/xda/one/ui/MessageFragment.java @@ -13,6 +13,7 @@ import com.xda.one.model.augmented.container.AugmentedMessageContainer; import com.xda.one.ui.listener.AvatarClickListener; import com.xda.one.ui.listener.InfiniteRecyclerLoadHelper; +import com.xda.one.ui.widget.DividerItemDecoration; import com.xda.one.ui.widget.XDARefreshLayout; import com.xda.one.util.UIUtils; import com.xda.one.util.Utils; @@ -138,6 +139,7 @@ public void onRefresh() { mRecyclerView = (RecyclerView) view.findViewById(android.R.id.list); mRecyclerView.setAdapter(mAdapter); mRecyclerView.setLayoutManager(new XDALinerLayoutManager(getActivity())); + mRecyclerView.addItemDecoration(new DividerItemDecoration(getActivity(), XDALinerLayoutManager.VERTICAL)); ViewCompat.setOverScrollMode(mRecyclerView, ViewCompat.OVER_SCROLL_NEVER); // If the listener already exists then tell it about the new recycler view diff --git a/android/src/main/java/com/xda/one/ui/MyDeviceFragment.java b/android/src/main/java/com/xda/one/ui/MyDeviceFragment.java index 254f7ea..e4a1e43 100644 --- a/android/src/main/java/com/xda/one/ui/MyDeviceFragment.java +++ b/android/src/main/java/com/xda/one/ui/MyDeviceFragment.java @@ -1,14 +1,5 @@ package com.xda.one.ui; -import com.squareup.picasso.Picasso; -import com.xda.one.R; -import com.xda.one.api.model.interfaces.Forum; -import com.xda.one.api.model.response.ResponseUserProfile; -import com.xda.one.loader.UserProfileLoader; -import com.xda.one.ui.helper.ActionModeHelper; -import com.xda.one.util.FragmentUtils; -import com.xda.one.util.UIUtils; - import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v4.app.Fragment; @@ -26,6 +17,15 @@ import android.view.ViewGroup; import android.widget.ImageView; +import com.squareup.picasso.Picasso; +import com.xda.one.R; +import com.xda.one.api.model.interfaces.Forum; +import com.xda.one.api.model.response.ResponseUserProfile; +import com.xda.one.loader.UserProfileLoader; +import com.xda.one.ui.helper.ActionModeHelper; +import com.xda.one.util.FragmentUtils; +import com.xda.one.util.UIUtils; + import java.util.ArrayList; import java.util.List; @@ -106,8 +106,8 @@ private class ImageViewDeviceDelegate implements ForumAdapter.ImageViewDeviceDel public void setupImageViewDevice(final ImageView imageView, final Forum forum) { Picasso.with(getActivity()) .load(forum.getImageUrl()) - .placeholder(R.drawable.phone) - .error(R.drawable.phone) + .placeholder(R.drawable.ic_nav_phone) + .error(R.drawable.ic_nav_phone) .into(imageView); } } diff --git a/android/src/main/java/com/xda/one/ui/NavigationDrawerAdapter.java b/android/src/main/java/com/xda/one/ui/NavigationDrawerAdapter.java index f9454e8..ab1d69a 100644 --- a/android/src/main/java/com/xda/one/ui/NavigationDrawerAdapter.java +++ b/android/src/main/java/com/xda/one/ui/NavigationDrawerAdapter.java @@ -1,8 +1,5 @@ package com.xda.one.ui; -import com.xda.one.R; -import com.xda.one.auth.XDAAccount; - import android.content.Context; import android.text.TextUtils; import android.view.LayoutInflater; @@ -12,6 +9,9 @@ import android.widget.ImageView; import android.widget.TextView; +import com.xda.one.R; +import com.xda.one.auth.XDAAccount; + import java.util.ArrayList; import java.util.List; @@ -81,32 +81,32 @@ public View getView(int position, View convertView, ViewGroup parent) { public void onUserProfileChanged(final XDAAccount account) { NAVIGATION_DRAWER_ITEMS.clear(); - NAVIGATION_DRAWER_ITEMS.add(new NavigationDrawerItem(R.drawable.forum, + NAVIGATION_DRAWER_ITEMS.add(new NavigationDrawerItem(R.drawable.ic_nav_forums, R.string.forum_home_title, R.string.forums)); NAVIGATION_DRAWER_ITEMS.add(new NavigationDrawerItem(R.drawable.ic_feed_icon, R.string.xda_news, R.string.forums)); - NAVIGATION_DRAWER_ITEMS.add(new NavigationDrawerItem(R.drawable.ic_search_dark, + NAVIGATION_DRAWER_ITEMS.add(new NavigationDrawerItem(R.drawable.ic_nav_search, R.string.find_a_device, R.string.forums)); if (account != null) { final String quoteMentionsCount = account.getQuoteCount() + "/" + account .getMentionCount(); - NAVIGATION_DRAWER_ITEMS.add(new NavigationDrawerItem(R.drawable.account_circle, + NAVIGATION_DRAWER_ITEMS.add(new NavigationDrawerItem(R.drawable.ic_nav_account, R.string.quote_mentions, R.string.user, quoteMentionsCount)); - NAVIGATION_DRAWER_ITEMS.add(new NavigationDrawerItem(R.drawable.phone, + NAVIGATION_DRAWER_ITEMS.add(new NavigationDrawerItem(R.drawable.ic_nav_phone, R.string.my_devices, R.string.user)); - NAVIGATION_DRAWER_ITEMS.add(new NavigationDrawerItem(R.drawable.message, + NAVIGATION_DRAWER_ITEMS.add(new NavigationDrawerItem(R.drawable.ic_nav_message, R.string.private_messages, R.string.user, String.valueOf(account.getPmCount()))); - NAVIGATION_DRAWER_ITEMS.add(new NavigationDrawerItem(R.drawable.favorite, + NAVIGATION_DRAWER_ITEMS.add(new NavigationDrawerItem(R.drawable.ic_nav_favorite, R.string.subscribed, R.string.user)); - NAVIGATION_DRAWER_ITEMS.add(new NavigationDrawerItem(R.drawable.reply, + NAVIGATION_DRAWER_ITEMS.add(new NavigationDrawerItem(R.drawable.ic_nav_reply, R.string.participated, R.string.user)); } - NAVIGATION_DRAWER_ITEMS.add(new NavigationDrawerItem(R.drawable.ic_search_dark, + NAVIGATION_DRAWER_ITEMS.add(new NavigationDrawerItem(R.drawable.ic_nav_search, R.string.search, R.string.other)); } diff --git a/android/src/main/java/com/xda/one/ui/NavigationDrawerFragment.java b/android/src/main/java/com/xda/one/ui/NavigationDrawerFragment.java index c4ef5cf..635e07a 100644 --- a/android/src/main/java/com/xda/one/ui/NavigationDrawerFragment.java +++ b/android/src/main/java/com/xda/one/ui/NavigationDrawerFragment.java @@ -1,5 +1,23 @@ package com.xda.one.ui; +import android.accounts.Account; +import android.app.Activity; +import android.app.ProgressDialog; +import android.content.Intent; +import android.os.Bundle; +import android.support.v4.app.Fragment; +import android.support.v4.app.LoaderManager; +import android.support.v4.content.Loader; +import android.support.v4.view.ViewCompat; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.AdapterView; +import android.widget.ImageView; +import android.widget.ListView; +import android.widget.TextView; +import android.widget.Toast; + import com.dd.CircularProgressButton; import com.mobsandgeeks.adapters.Sectionizer; import com.mobsandgeeks.adapters.SimpleSectionAdapter; @@ -19,24 +37,6 @@ import com.xda.one.util.AccountUtils; import com.xda.one.util.Utils; -import android.accounts.Account; -import android.app.Activity; -import android.app.ProgressDialog; -import android.content.Intent; -import android.os.Bundle; -import android.support.v4.app.Fragment; -import android.support.v4.app.LoaderManager; -import android.support.v4.content.Loader; -import android.support.v4.view.ViewCompat; -import android.view.LayoutInflater; -import android.view.View; -import android.view.ViewGroup; -import android.widget.AdapterView; -import android.widget.ImageView; -import android.widget.ListView; -import android.widget.TextView; -import android.widget.Toast; - import java.util.List; import static com.xda.one.ui.NavigationDrawerAdapter.NavigationDrawerItem; @@ -54,6 +54,8 @@ public class NavigationDrawerFragment extends Fragment private TextView mUsernameTextView; + private TextView mEmailTextView; + private UserClient mUserClient; private ImageView mAvatar; @@ -118,6 +120,10 @@ public void onClick(final View v) { mUsernameTextView = (TextView) headerView .findViewById(R.id.navigation_drawer_fragment_username); + + mEmailTextView = (TextView) headerView + .findViewById(R.id.navigation_drawer_fragment_email); + mAvatar = (ImageView) headerView.findViewById(R.id.navigation_drawer_fragment_avatar); mLoginLogout = (CircularProgressButton) headerView @@ -216,6 +222,7 @@ public void onUserAccountSelected(final XDAAccount account) { mLoginLogout.setText(getString(R.string.logout)); mUsernameTextView.setText(account.getUserName()); + mEmailTextView.setText(account.getEmail()); Picasso.with(getActivity()) .load(account.getAvatarUrl()) .placeholder(R.drawable.ic_account_circle_light) diff --git a/android/src/main/java/com/xda/one/ui/NewsAdapter.java b/android/src/main/java/com/xda/one/ui/NewsAdapter.java index 3472867..3115609 100644 --- a/android/src/main/java/com/xda/one/ui/NewsAdapter.java +++ b/android/src/main/java/com/xda/one/ui/NewsAdapter.java @@ -1,11 +1,5 @@ package com.xda.one.ui; -import com.squareup.picasso.Picasso; -import com.xda.one.R; -import com.xda.one.api.model.response.ResponseNews; -import com.xda.one.util.StringUtils; -import com.xda.one.util.Utils; - import android.content.Context; import android.support.v7.widget.RecyclerView; import android.text.Html; @@ -15,6 +9,11 @@ import android.widget.ImageView; import android.widget.TextView; +import com.squareup.picasso.Picasso; +import com.xda.one.R; +import com.xda.one.api.model.response.ResponseNews; +import com.xda.one.util.Utils; + import java.util.ArrayList; import java.util.Collections; import java.util.List; @@ -74,24 +73,30 @@ public void onBindViewHolder(final NewsViewHolder holder, final int position) { holder.itemView.setOnClickListener(mOnClickListener); holder.titleView.setText(Html.fromHtml(item.getTitle())); - final String content = item.getContent(); - final String text = StringUtils.trimCharSequence(Html.fromHtml(content).toString(), 200); - holder.contentView.setText(text); - Picasso.with(mContext) - .load(item.getThumbnail()) - .placeholder(R.drawable.ic_account_circle_light) - .error(R.drawable.ic_account_circle_light) + .load(getFullImage(item.getThumbnail())).fit().centerCrop() + .placeholder(R.drawable.ic_image_placeholder) + .error(R.drawable.ic_image_placeholder) .into(holder.imageView); } + private String getFullImage(String url) { + if (url == null) + return null; + + String main_url = url.substring(0, url.lastIndexOf("-")); + String extension = url.substring(url.lastIndexOf(".")); + + return main_url + extension; + } + public ResponseNews getItem(int position) { return mNews.get(position); } @Override public int getItemCount() { - return mNews.size() + mFooterItemCount ; + return mNews.size() + mFooterItemCount; } public void clear() { @@ -137,15 +142,12 @@ public static class NewsViewHolder extends RecyclerView.ViewHolder { private final TextView titleView; - private final TextView contentView; - private final ImageView imageView; public NewsViewHolder(View itemView) { super(itemView); titleView = (TextView) itemView.findViewById(R.id.news_title); - contentView = (TextView) itemView.findViewById(R.id.news_content); imageView = (ImageView) itemView.findViewById(R.id.avatar); } } diff --git a/android/src/main/java/com/xda/one/ui/PostAdapter.java b/android/src/main/java/com/xda/one/ui/PostAdapter.java index fe19a39..3dfa627 100644 --- a/android/src/main/java/com/xda/one/ui/PostAdapter.java +++ b/android/src/main/java/com/xda/one/ui/PostAdapter.java @@ -1,5 +1,14 @@ package com.xda.one.ui; +import android.content.Context; +import android.support.v7.widget.RecyclerView; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.ImageView; +import android.widget.LinearLayout; +import android.widget.TextView; + import com.dd.xda.CircularProgressButton; import com.squareup.picasso.Callback; import com.squareup.picasso.Picasso; @@ -13,16 +22,6 @@ import com.xda.one.util.SectionUtils; import com.xda.one.util.Utils; -import android.content.Context; -import android.support.v7.widget.RecyclerView; -import android.view.LayoutInflater; -import android.view.View; -import android.view.ViewGroup; -import android.widget.Button; -import android.widget.ImageView; -import android.widget.LinearLayout; -import android.widget.TextView; - import java.util.ArrayList; import java.util.Collection; import java.util.Collections; @@ -137,8 +136,13 @@ public void onBindViewHolder(PostViewHolder holder, int position) { holder.multiQuoteButton.setTag(holder.itemView); if (account.getUserName().equals(post.getUserName())) { - holder.thanksButton.setVisibility(View.GONE); - holder.thanksCount.setVisibility(View.GONE); + //holder.thanksButton.setVisibility(View.GONE); + //holder.thanksCount.setVisibility(View.GONE); + holder.thanksButton.setVisibility(View.VISIBLE); + holder.thanksCount.setVisibility(View.VISIBLE); + + holder.thanksButton.setImageResource(R.drawable.ic_thumb_up_dark_outline); + holder.thanksCount.setText(String.valueOf(post.getThanksCount())); } else { holder.thanksButton.setVisibility(View.VISIBLE); holder.thanksButton.setOnClickListener(mThanksClickListener); @@ -222,12 +226,14 @@ private void attachFiles(PostViewHolder holder, ResponseAttachment a) { false); holder.attachments.addView(group); - final TextView nameView = (TextView) group.findViewById(R.id.file_name); - final TextView sizeView = (TextView) group.findViewById(R.id.file_size); - Button downloadButton = (Button) group - .findViewById(R.id.download_button); - downloadButton.setOnClickListener(mDownloadClickListener); - downloadButton.setTag(a); + final TextView nameView = (TextView) group.findViewById(R.id.attachment_name); + final TextView sizeView = (TextView) group.findViewById(R.id.attachment_size); + + LinearLayout attachmentContainer = (LinearLayout) group + .findViewById(R.id.attachment_container); + attachmentContainer.setOnClickListener(mDownloadClickListener); + attachmentContainer.setTag(a); + nameView.setText(a.getFileName()); sizeView.setText(a.getFileSize() + " Kb"); } diff --git a/android/src/main/java/com/xda/one/ui/PostFragment.java b/android/src/main/java/com/xda/one/ui/PostFragment.java index 868dd93..76c4c56 100644 --- a/android/src/main/java/com/xda/one/ui/PostFragment.java +++ b/android/src/main/java/com/xda/one/ui/PostFragment.java @@ -1,24 +1,5 @@ package com.xda.one.ui; -import com.xda.one.R; -import com.xda.one.api.inteface.PostClient; -import com.xda.one.api.misc.Consumer; -import com.xda.one.api.misc.Result; -import com.xda.one.api.model.interfaces.Post; -import com.xda.one.api.model.interfaces.UnifiedThread; -import com.xda.one.api.model.response.ResponseAttachment; -import com.xda.one.api.model.response.ResponseUnifiedThread; -import com.xda.one.api.model.response.container.ResponsePostContainer; -import com.xda.one.api.retrofit.RetrofitPostClient; -import com.xda.one.loader.PostLoader; -import com.xda.one.model.augmented.AugmentedPost; -import com.xda.one.model.augmented.AugmentedPostContainer; -import com.xda.one.ui.helper.ActionModeHelper; -import com.xda.one.ui.helper.CancellableCallbackHelper; -import com.xda.one.ui.listener.AvatarClickListener; -import com.xda.one.util.UIUtils; -import com.xda.one.util.Utils; - import android.app.Activity; import android.app.AlertDialog; import android.app.DownloadManager; @@ -46,6 +27,25 @@ import android.view.ViewGroup; import android.widget.Toast; +import com.xda.one.R; +import com.xda.one.api.inteface.PostClient; +import com.xda.one.api.misc.Consumer; +import com.xda.one.api.misc.Result; +import com.xda.one.api.model.interfaces.Post; +import com.xda.one.api.model.interfaces.UnifiedThread; +import com.xda.one.api.model.response.ResponseAttachment; +import com.xda.one.api.model.response.ResponseUnifiedThread; +import com.xda.one.api.model.response.container.ResponsePostContainer; +import com.xda.one.api.retrofit.RetrofitPostClient; +import com.xda.one.loader.PostLoader; +import com.xda.one.model.augmented.AugmentedPost; +import com.xda.one.model.augmented.AugmentedPostContainer; +import com.xda.one.ui.helper.ActionModeHelper; +import com.xda.one.ui.helper.CancellableCallbackHelper; +import com.xda.one.ui.listener.AvatarClickListener; +import com.xda.one.util.UIUtils; +import com.xda.one.util.Utils; + import java.util.ArrayList; import java.util.List; @@ -222,7 +222,7 @@ public void onDestroy() { @Override public View onCreateView(final LayoutInflater inflater, final ViewGroup container, - final Bundle savedInstanceState) { + final Bundle savedInstanceState) { return inflater.inflate(R.layout.post_fragment, container, false); } @@ -300,7 +300,7 @@ public Loader onCreateLoader(int id, Bundle args) { @Override public void onLoadFinished(final Loader loader, - final AugmentedPostContainer container) { + final AugmentedPostContainer container) { if (container == null) { onItemsReceived(null); } else { @@ -374,17 +374,17 @@ public void scrollToPosition(final ResponsePostContainer data) { mRecyclerView.scrollToPosition(data.getIndex()); } - public static interface Callback { + public interface Callback { - public void quotePost(final AugmentedPost... post); + void quotePost(final AugmentedPost... post); - public void switchToFragment(final ResponsePostContainer container); + void switchToFragment(final ResponsePostContainer container); - public void setQuickReturnListener(final RecyclerView recyclerView, final int page); + void setQuickReturnListener(final RecyclerView recyclerView, final int page); - public void postPaddingToQuickReturn(final View content); + void postPaddingToQuickReturn(final View content); - public void onPageLoaded(final ResponseUnifiedThread thread); + void onPageLoaded(final ResponseUnifiedThread thread); } private class DownloadButtonClickListener implements View.OnClickListener { diff --git a/android/src/main/java/com/xda/one/ui/PostPagerFragment.java b/android/src/main/java/com/xda/one/ui/PostPagerFragment.java index 461da93..bc03bb3 100644 --- a/android/src/main/java/com/xda/one/ui/PostPagerFragment.java +++ b/android/src/main/java/com/xda/one/ui/PostPagerFragment.java @@ -1,21 +1,5 @@ package com.xda.one.ui; -import com.squareup.otto.Subscribe; -import com.xda.one.R; -import com.xda.one.api.inteface.ThreadClient; -import com.xda.one.api.model.response.ResponseUnifiedThread; -import com.xda.one.api.model.response.container.ResponsePostContainer; -import com.xda.one.api.retrofit.RetrofitThreadClient; -import com.xda.one.event.thread.ThreadSubscriptionChangedEvent; -import com.xda.one.event.thread.ThreadSubscriptionChangingFailedEvent; -import com.xda.one.model.augmented.AugmentedPost; -import com.xda.one.model.augmented.AugmentedUnifiedThread; -import com.xda.one.ui.helper.QuickReturnHelper; -import com.xda.one.ui.widget.FloatingActionButton; -import com.xda.one.util.AccountUtils; -import com.xda.one.util.CompatUtils; -import com.xda.one.util.UIUtils; - import android.annotation.TargetApi; import android.app.Activity; import android.content.Intent; @@ -44,6 +28,22 @@ import android.widget.TextView; import android.widget.Toast; +import com.squareup.otto.Subscribe; +import com.xda.one.R; +import com.xda.one.api.inteface.ThreadClient; +import com.xda.one.api.model.response.ResponseUnifiedThread; +import com.xda.one.api.model.response.container.ResponsePostContainer; +import com.xda.one.api.retrofit.RetrofitThreadClient; +import com.xda.one.event.thread.ThreadSubscriptionChangedEvent; +import com.xda.one.event.thread.ThreadSubscriptionChangingFailedEvent; +import com.xda.one.model.augmented.AugmentedPost; +import com.xda.one.model.augmented.AugmentedUnifiedThread; +import com.xda.one.ui.helper.QuickReturnHelper; +import com.xda.one.ui.widget.FloatingActionButton; +import com.xda.one.util.AccountUtils; +import com.xda.one.util.CompatUtils; +import com.xda.one.util.UIUtils; + import java.util.ArrayList; import java.util.List; @@ -119,8 +119,8 @@ public void onPageScrollStateChanged(int state) { private View mLast; public static PostPagerFragment getInstance(final AugmentedUnifiedThread unifiedThread, - final ResponsePostContainer container, final int pageCount, - final ArrayList hierarchy) { + final ResponsePostContainer container, final int pageCount, + final ArrayList hierarchy) { final Bundle bundle = new Bundle(); bundle.putParcelable(THREAD_ARGUMENT, unifiedThread); bundle.putParcelable(PAGE_CONTAINER_ARGUMENT, container); @@ -163,7 +163,7 @@ public void expand(final View view) { final Animation animation = new Animation() { @Override protected void applyTransformation(final float interpolatedTime, - final Transformation transformation) { + final Transformation transformation) { view.getLayoutParams().height = interpolatedTime == 1 ? ViewGroup.LayoutParams.WRAP_CONTENT : (int) (mTargetHeight * interpolatedTime); @@ -210,7 +210,7 @@ public void onCreate(final Bundle savedInstanceState) { @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, - Bundle savedInstanceState) { + Bundle savedInstanceState) { return inflater.inflate(R.layout.post_pager_fragment, container, false); } @@ -346,7 +346,7 @@ public void switchToFragment(final ResponsePostContainer container) { @Override public void setQuickReturnListener(final RecyclerView recyclerView, final int position) { if (mTotalPages != 1) { - mQuickReturnHelper.setOnScrollListener(recyclerView, position); + mQuickReturnHelper.addOnScrollListener(recyclerView, position); } } @@ -411,16 +411,15 @@ public void onPageLoaded(final ResponseUnifiedThread thread) { if (getTargetFragment() != null) { final Intent intent = new Intent(); intent.putExtra("thread", thread); - getTargetFragment() - .onActivityResult(getTargetRequestCode(), Activity.RESULT_OK, intent); + getTargetFragment().onActivityResult(getTargetRequestCode(), Activity.RESULT_OK, intent); } } public interface Callback { - public Toolbar getToolbar(); + Toolbar getToolbar(); - public void login(final Runnable runnable); + void login(final Runnable runnable); } private class CreatePostListener implements View.OnClickListener { @@ -516,7 +515,7 @@ public void onThreadSubscriptionToggled(final ThreadSubscriptionChangedEvent eve @Subscribe public void onThreadSubscriptionToggleFailed(final ThreadSubscriptionChangingFailedEvent - event) { + event) { Toast.makeText(getActivity(), R.string.thread_subscription_toggle_failed, Toast.LENGTH_LONG).show(); } diff --git a/android/src/main/java/com/xda/one/ui/QuoteMentionBaseFragment.java b/android/src/main/java/com/xda/one/ui/QuoteMentionBaseFragment.java index 22ee3bf..5ef4ff0 100644 --- a/android/src/main/java/com/xda/one/ui/QuoteMentionBaseFragment.java +++ b/android/src/main/java/com/xda/one/ui/QuoteMentionBaseFragment.java @@ -2,6 +2,7 @@ import com.xda.one.R; import com.xda.one.ui.listener.InfiniteRecyclerLoadHelper; +import com.xda.one.ui.widget.DividerItemDecoration; import com.xda.one.ui.widget.XDARefreshLayout; import android.os.Bundle; @@ -42,6 +43,7 @@ public void onViewCreated(final View view, @Nullable Bundle savedInstanceState) mRecyclerView = (RecyclerView) view.findViewById(android.R.id.list); mRecyclerView.setLayoutManager(new XDALinerLayoutManager(getActivity())); + mRecyclerView.addItemDecoration(new DividerItemDecoration(getActivity(), XDALinerLayoutManager.VERTICAL)); ViewCompat.setOverScrollMode(mRecyclerView, ViewCompat.OVER_SCROLL_NEVER); // If the listener already exists then tell it about the new recycler view diff --git a/android/src/main/java/com/xda/one/ui/SearchFragment.java b/android/src/main/java/com/xda/one/ui/SearchFragment.java index d200b7b..e89dd97 100644 --- a/android/src/main/java/com/xda/one/ui/SearchFragment.java +++ b/android/src/main/java/com/xda/one/ui/SearchFragment.java @@ -1,8 +1,5 @@ package com.xda.one.ui; -import com.xda.one.R; -import com.xda.one.util.UIUtils; - import android.app.Activity; import android.net.Uri; import android.os.Bundle; @@ -22,6 +19,9 @@ import android.webkit.WebViewClient; import android.widget.SearchView; +import com.xda.one.R; +import com.xda.one.util.UIUtils; + public class SearchFragment extends Fragment { private WebView mWebView; @@ -104,7 +104,9 @@ public void onCreateOptionsMenu(final Menu menu, final MenuInflater inflater) { final SearchView searchView = (SearchView) MenuItemCompat.getActionView(mSearchMenuItem); final SearchQueryListener listener = new SearchQueryListener(); + searchView.setQueryHint(getResources().getString(R.string.search_xda_title)); searchView.setOnQueryTextListener(listener); + searchView.onActionViewExpanded(); // TODO - stop this from constantly happening when you go to a item and then come back searchView.post(new Runnable() { diff --git a/android/src/main/java/com/xda/one/ui/SubscribedForumFragment.java b/android/src/main/java/com/xda/one/ui/SubscribedForumFragment.java index 7b299fb..6935f95 100644 --- a/android/src/main/java/com/xda/one/ui/SubscribedForumFragment.java +++ b/android/src/main/java/com/xda/one/ui/SubscribedForumFragment.java @@ -1,16 +1,5 @@ package com.xda.one.ui; -import com.squareup.otto.Subscribe; -import com.xda.one.R; -import com.xda.one.api.inteface.ForumClient; -import com.xda.one.api.model.interfaces.Forum; -import com.xda.one.api.model.response.ResponseForum; -import com.xda.one.api.retrofit.RetrofitForumClient; -import com.xda.one.event.forum.ForumSubscriptionChangedEvent; -import com.xda.one.event.forum.ForumSubscriptionChangingFailedEvent; -import com.xda.one.loader.SubscribedForumLoader; -import com.xda.one.ui.widget.XDARefreshLayout; - import android.app.Activity; import android.os.Bundle; import android.support.v4.app.Fragment; @@ -26,6 +15,17 @@ import android.widget.ImageView; import android.widget.Toast; +import com.squareup.otto.Subscribe; +import com.xda.one.R; +import com.xda.one.api.inteface.ForumClient; +import com.xda.one.api.model.interfaces.Forum; +import com.xda.one.api.model.response.ResponseForum; +import com.xda.one.api.retrofit.RetrofitForumClient; +import com.xda.one.event.forum.ForumSubscriptionChangedEvent; +import com.xda.one.event.forum.ForumSubscriptionChangingFailedEvent; +import com.xda.one.loader.SubscribedForumLoader; +import com.xda.one.ui.widget.XDARefreshLayout; + import java.util.ArrayList; import java.util.List; @@ -34,7 +34,7 @@ public class SubscribedForumFragment extends Fragment implements LoaderManager.LoaderCallbacks> { - private static final int FORUM_LOADER = 1; + private static final int FORUM_LOADER = 2; private final EventHandler mEventHandler = new EventHandler(); diff --git a/android/src/main/java/com/xda/one/ui/SubscribedPagerFragment.java b/android/src/main/java/com/xda/one/ui/SubscribedPagerFragment.java index ec0edf1..7ee5f8e 100644 --- a/android/src/main/java/com/xda/one/ui/SubscribedPagerFragment.java +++ b/android/src/main/java/com/xda/one/ui/SubscribedPagerFragment.java @@ -1,9 +1,5 @@ package com.xda.one.ui; -import com.xda.one.R; -import com.xda.one.ui.widget.TabLayout; -import com.xda.one.util.UIUtils; - import android.app.Activity; import android.os.Bundle; import android.support.v4.app.Fragment; @@ -15,6 +11,10 @@ import android.view.View; import android.view.ViewGroup; +import com.xda.one.R; +import com.xda.one.ui.widget.TabLayout; +import com.xda.one.util.UIUtils; + public class SubscribedPagerFragment extends Fragment implements SubscribedForumFragment.Callback { private Callback mCallback; @@ -86,9 +86,10 @@ public SubscribeFragmentAdapter(final FragmentManager fm) { public Fragment getItem(int i) { switch (i) { case 0: - return mSubscribedForumFragment; - case 1: return mSubscribedThreadFragment; + case 1: + return mSubscribedForumFragment; + default: throw new UnsupportedOperationException(); } @@ -98,9 +99,9 @@ public Fragment getItem(int i) { public CharSequence getPageTitle(int position) { switch (position) { case 0: - return getString(R.string.forums); - case 1: return getString(R.string.threads); + case 1: + return getString(R.string.forums); default: return super.getPageTitle(position); } diff --git a/android/src/main/java/com/xda/one/ui/ThreadAdapter.java b/android/src/main/java/com/xda/one/ui/ThreadAdapter.java index 72b48c4..3cac2a6 100644 --- a/android/src/main/java/com/xda/one/ui/ThreadAdapter.java +++ b/android/src/main/java/com/xda/one/ui/ThreadAdapter.java @@ -1,11 +1,5 @@ package com.xda.one.ui; -import com.squareup.picasso.Picasso; -import com.xda.one.R; -import com.xda.one.model.augmented.AugmentedUnifiedThread; -import com.xda.one.ui.helper.ActionModeHelper; -import com.xda.one.util.Utils; - import android.content.Context; import android.graphics.Typeface; import android.support.v7.widget.RecyclerView; @@ -14,9 +8,15 @@ import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; -import android.widget.RelativeLayout; import android.widget.TextView; +import com.squareup.picasso.Picasso; +import com.xda.one.R; +import com.xda.one.model.augmented.AugmentedUnifiedThread; +import com.xda.one.ui.helper.ActionModeHelper; +import com.xda.one.util.StringUtils; +import com.xda.one.util.Utils; + import java.text.NumberFormat; import java.util.ArrayList; import java.util.Collections; @@ -73,6 +73,7 @@ public NormalThreadViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) { .inflate(R.layout.load_more_progress_bar_only, viewGroup, false); return new FooterViewType(view); } + //final View view = mLayoutInflater.inflate(R.layout.thread_list_item, viewGroup, false); final View view = mLayoutInflater.inflate(R.layout.thread_list_item, viewGroup, false); return new NormalThreadViewHolder(view); } @@ -104,7 +105,7 @@ public void onBindViewHolder(final NormalThreadViewHolder holder, final int posi holder.titleView.setText(Html.fromHtml(thread.getTitle())); holder.titleView.setTypeface(null, thread.isUnread() ? Typeface.BOLD : Typeface.NORMAL); - holder.textView.setText(thread.getSubPageText()); + holder.textView.setText(StringUtils.removeWhiteSpaces(thread.getSubPageText())); holder.replyCount.setText(mNumberFormat.format(thread.getReplyCount())); holder.lastPostTimeView @@ -169,7 +170,7 @@ public boolean isEmpty() { public static class NormalThreadViewHolder extends RecyclerView.ViewHolder { - public final RelativeLayout container; + public final View container; public final TextView titleView; @@ -190,7 +191,7 @@ public static class NormalThreadViewHolder extends RecyclerView.ViewHolder { public NormalThreadViewHolder(View itemView) { super(itemView); - container = (RelativeLayout) itemView.findViewById(R.id.thread_list_item_container); + container = itemView.findViewById(R.id.thread_list_item_container); titleView = (TextView) itemView.findViewById(R.id.thread_title); textView = (TextView) itemView.findViewById(R.id.thread_list_item_content); replyCount = (TextView) itemView.findViewById(R.id.reply_count); diff --git a/android/src/main/java/com/xda/one/ui/ThreadFragment.java b/android/src/main/java/com/xda/one/ui/ThreadFragment.java index 7d11a65..ddc74c9 100644 --- a/android/src/main/java/com/xda/one/ui/ThreadFragment.java +++ b/android/src/main/java/com/xda/one/ui/ThreadFragment.java @@ -1,5 +1,23 @@ package com.xda.one.ui; +import android.app.Activity; +import android.content.Intent; +import android.graphics.drawable.Drawable; +import android.os.Bundle; +import android.support.annotation.Nullable; +import android.support.v4.app.DialogFragment; +import android.support.v4.app.Fragment; +import android.support.v4.app.LoaderManager; +import android.support.v4.content.Loader; +import android.support.v4.view.ViewCompat; +import android.support.v4.widget.SwipeRefreshLayout; +import android.support.v7.app.ActionBar; +import android.support.v7.widget.RecyclerView; +import android.support.v7.widget.XDALinerLayoutManager; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; + import com.xda.one.R; import com.xda.one.api.inteface.ThreadClient; import com.xda.one.api.model.interfaces.UnifiedThread; @@ -25,24 +43,6 @@ import com.xda.one.util.UIUtils; import com.xda.one.util.Utils; -import android.app.Activity; -import android.content.Intent; -import android.graphics.drawable.Drawable; -import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.v4.app.DialogFragment; -import android.support.v4.app.Fragment; -import android.support.v4.app.LoaderManager; -import android.support.v4.content.Loader; -import android.support.v4.view.ViewCompat; -import android.support.v4.widget.SwipeRefreshLayout; -import android.support.v7.app.ActionBar; -import android.support.v7.widget.RecyclerView; -import android.support.v7.widget.XDALinerLayoutManager; -import android.view.LayoutInflater; -import android.view.View; -import android.view.ViewGroup; - import java.util.ArrayList; import java.util.List; @@ -355,7 +355,7 @@ public void onActivityResult(final int requestCode, final int resultCode, final if (requestCode == 1) { UIUtils.updateEmptyViewState(getView(), mRecyclerView, true); reloadTheFirstPage(); - } else if (requestCode == 101) { + } else if (requestCode == CREATE_THREAD_REQUEST_CODE) { final UnifiedThread thread = data.getParcelableExtra("thread"); updateThread(thread); } @@ -379,7 +379,7 @@ private void addDataToAdapter(final List data) { public interface Callback { - public void login(final Runnable runnable); + void login(final Runnable runnable); } private class InfiniteLoadCallback implements InfiniteRecyclerLoadHelper.Callback { @@ -396,7 +396,7 @@ private class ThreadClickListener implements View.OnClickListener { @Override public void onClick(final View view) { - final int position = mRecyclerView.getChildPosition(view); + final int position = mRecyclerView.getChildAdapterPosition(view); if (position == RecyclerView.NO_POSITION) { return; } diff --git a/android/src/main/java/com/xda/one/ui/UserProfileFragment.java b/android/src/main/java/com/xda/one/ui/UserProfileFragment.java index ccfd07b..28d6382 100644 --- a/android/src/main/java/com/xda/one/ui/UserProfileFragment.java +++ b/android/src/main/java/com/xda/one/ui/UserProfileFragment.java @@ -1,6 +1,6 @@ package com.xda.one.ui; -import com.makeramen.RoundedImageView; +import com.makeramen.roundedimageview.RoundedImageView; import com.squareup.picasso.Picasso; import com.xda.one.R; import com.xda.one.api.model.response.ResponseUserProfile; @@ -80,7 +80,7 @@ public void onCreate(final Bundle savedInstanceState) { @Override public View onCreateView(final LayoutInflater inflater, final @Nullable ViewGroup container, - final @Nullable Bundle savedInstanceState) { + final @Nullable Bundle savedInstanceState) { return inflater.inflate(R.layout.user_profile_fragment, container, false); } @@ -94,7 +94,7 @@ public void onViewCreated(final View view, @Nullable Bundle savedInstanceState) mUsernameTextView = (TextView) view.findViewById(R.id.header_user_name); mTagTextView = (TextView) view.findViewById(R.id.header_user_stuff); - mAvatar = (RoundedImageView) view.findViewById(R.id.avatar); + mAvatar = (ImageView) view.findViewById(R.id.avatar); CompatUtils.setBackground(mAvatar, new ColorDrawable(getResources() .getColor(android.R.color.white))); diff --git a/android/src/main/java/com/xda/one/ui/helper/ActionModeHelper.java b/android/src/main/java/com/xda/one/ui/helper/ActionModeHelper.java index a28ca2f..ea8f2c1 100644 --- a/android/src/main/java/com/xda/one/ui/helper/ActionModeHelper.java +++ b/android/src/main/java/com/xda/one/ui/helper/ActionModeHelper.java @@ -1,16 +1,17 @@ package com.xda.one.ui.helper; -import com.xda.one.ui.BaseActivity; -import com.xda.one.util.Utils; - import android.app.Activity; import android.os.Bundle; import android.support.v7.view.ActionMode; import android.support.v7.widget.RecyclerView; +import android.util.Log; import android.view.Menu; import android.view.MenuItem; import android.view.View; +import com.xda.one.ui.BaseActivity; +import com.xda.one.util.Utils; + import java.util.ArrayList; import java.util.HashSet; import java.util.List; @@ -59,12 +60,13 @@ public boolean onLongClick(final View view) { if (mActionMode == null) { mActionMode = mActivity.startSupportActionMode(this); } + toggleViewActivatedState(view); return true; } private void toggleViewActivatedState(final View view) { - final int position = mRecyclerView.getChildPosition(view); + final int position = mRecyclerView.getChildAdapterPosition(view); if (position == RecyclerView.NO_POSITION) { return; } @@ -130,10 +132,18 @@ public boolean onActionItemClicked(final ActionMode actionMode, final MenuItem m menuItem); } + // + // ToDo Fix, prevents FC during long press for now + // public void onCheckedStateChanged(final ActionMode actionMode, int position, boolean isNowChecked) { if (mActionModeCallback != null) { - mActionModeCallback.onCheckedStateChanged(actionMode, position, isNowChecked); + try { + mActionModeCallback.onCheckedStateChanged(actionMode, position, isNowChecked); + } + catch (NullPointerException ex) { + Log.d("onCheckedStateChanged", ex.toString()); + } } } diff --git a/android/src/main/java/com/xda/one/ui/helper/QuickReturnHelper.java b/android/src/main/java/com/xda/one/ui/helper/QuickReturnHelper.java index e28800e..a1044fd 100644 --- a/android/src/main/java/com/xda/one/ui/helper/QuickReturnHelper.java +++ b/android/src/main/java/com/xda/one/ui/helper/QuickReturnHelper.java @@ -1,7 +1,5 @@ package com.xda.one.ui.helper; -import com.xda.one.util.UIUtils; - import android.content.Context; import android.support.v7.widget.RecyclerView; import android.support.v7.widget.Toolbar; @@ -11,6 +9,8 @@ import android.view.ViewConfiguration; import android.view.animation.AccelerateInterpolator; +import com.xda.one.util.UIUtils; + public class QuickReturnHelper { private static final int ANIMATION_DURATION_MILLIS = 300; @@ -34,7 +34,7 @@ public class QuickReturnHelper { private int mTouchSlop; public QuickReturnHelper(final Context context, final View quickReturnView, - final Toolbar toolbar) { + final Toolbar toolbar) { mQuickReturnView = quickReturnView; mToolbar = toolbar; @@ -42,7 +42,6 @@ public QuickReturnHelper(final Context context, final View quickReturnView, mTouchSlop = vc.getScaledTouchSlop(); mActionBarHeight = UIUtils.calculateActionBarSize(context); - //////mActionBarHeight = toolbar.getHeight(); if (quickReturnView == null) { return; @@ -72,12 +71,12 @@ public void run() { }); } - public void setOnScrollListener(final RecyclerView recyclerView, final int position) { + public void addOnScrollListener(final RecyclerView recyclerView, final int position) { final XDALinerLayoutManager linerLayoutManager = (XDALinerLayoutManager) recyclerView .getLayoutManager(); final QuickReturnOnScroll onScroll = new QuickReturnOnScroll(position, linerLayoutManager); mScrollSparseArray.put(position, onScroll); - recyclerView.setOnScrollListener(onScroll); + recyclerView.addOnScrollListener(onScroll); } public void showTopBar() { @@ -133,7 +132,7 @@ private class QuickReturnOnScroll extends RecyclerView.OnScrollListener { private final XDALinerLayoutManager mLinerLayoutManager; private QuickReturnOnScroll(final int fragmentPosition, - final XDALinerLayoutManager linerLayoutManager) { + final XDALinerLayoutManager linerLayoutManager) { mFragmentPosition = fragmentPosition; mLinerLayoutManager = linerLayoutManager; } diff --git a/android/src/main/java/com/xda/one/ui/listener/RecyclerEndHelper.java b/android/src/main/java/com/xda/one/ui/listener/RecyclerEndHelper.java index 50acb35..7a3d811 100644 --- a/android/src/main/java/com/xda/one/ui/listener/RecyclerEndHelper.java +++ b/android/src/main/java/com/xda/one/ui/listener/RecyclerEndHelper.java @@ -41,6 +41,6 @@ public void updateRecyclerView(final RecyclerView recyclerView) { public interface Callback { - public void onListEndReached(); + void onListEndReached(); } } diff --git a/android/src/main/java/com/xda/one/ui/thread/FirstThreadClickStrategy.java b/android/src/main/java/com/xda/one/ui/thread/FirstThreadClickStrategy.java index 481afea..56fa60e 100644 --- a/android/src/main/java/com/xda/one/ui/thread/FirstThreadClickStrategy.java +++ b/android/src/main/java/com/xda/one/ui/thread/FirstThreadClickStrategy.java @@ -1,14 +1,14 @@ package com.xda.one.ui.thread; -import com.xda.one.R; -import com.xda.one.model.augmented.AugmentedUnifiedThread; -import com.xda.one.util.FragmentUtils; - import android.os.Parcel; import android.os.Parcelable; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentTransaction; +import com.xda.one.R; +import com.xda.one.model.augmented.AugmentedUnifiedThread; +import com.xda.one.util.FragmentUtils; + import java.util.ArrayList; import java.util.List; @@ -27,10 +27,11 @@ public FirstThreadClickStrategy[] newArray(int size) { @Override public void onClick(final Fragment threadFragment, final List hierarchy, - final AugmentedUnifiedThread thread) { - final Fragment fragment = FragmentUtils.switchToPostList(thread, - new ArrayList<>(hierarchy)); + final AugmentedUnifiedThread thread) { + final ArrayList copyOfHierarchy = new ArrayList<>(hierarchy); + final Fragment fragment = FragmentUtils.switchToPostList(thread, copyOfHierarchy); fragment.setTargetFragment(threadFragment, 101); + final FragmentTransaction transaction = FragmentUtils .getDefaultTransaction(threadFragment.getFragmentManager()); transaction.addToBackStack(thread.getTitle()); diff --git a/android/src/main/java/com/xda/one/ui/thread/ThreadUnreadPostHelper.java b/android/src/main/java/com/xda/one/ui/thread/ThreadUnreadPostHelper.java index efcdb3d..29bbbf3 100644 --- a/android/src/main/java/com/xda/one/ui/thread/ThreadUnreadPostHelper.java +++ b/android/src/main/java/com/xda/one/ui/thread/ThreadUnreadPostHelper.java @@ -1,5 +1,12 @@ package com.xda.one.ui.thread; +import android.app.AlertDialog; +import android.content.Context; +import android.support.v4.app.Fragment; +import android.support.v4.app.FragmentManager; +import android.support.v4.app.FragmentTransaction; +import android.widget.Toast; + import com.xda.one.R; import com.xda.one.api.inteface.PostClient; import com.xda.one.api.model.response.container.ResponsePostContainer; @@ -8,17 +15,12 @@ import com.xda.one.ui.helper.CancellableCallbackHelper; import com.xda.one.util.FragmentUtils; -import android.app.AlertDialog; -import android.content.Context; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentManager; -import android.support.v4.app.FragmentTransaction; -import android.widget.Toast; - import java.util.ArrayList; public class ThreadUnreadPostHelper extends CancellableCallbackHelper { + private final Fragment mThreadFragment; + private final Context mContext; private final FragmentManager mFragmentManager; @@ -27,11 +29,12 @@ public class ThreadUnreadPostHelper extends CancellableCallbackHelper(), - data); + final Fragment fragment = FragmentUtils.switchToPostList(mUnifiedThread, + new ArrayList(), data); + fragment.setTargetFragment(mThreadFragment, 101); final FragmentTransaction transaction = FragmentUtils .getDefaultTransaction(mFragmentManager); diff --git a/android/src/main/java/com/xda/one/ui/thread/UnreadThreadClickStrategy.java b/android/src/main/java/com/xda/one/ui/thread/UnreadThreadClickStrategy.java index ca3bd71..96ef3b5 100644 --- a/android/src/main/java/com/xda/one/ui/thread/UnreadThreadClickStrategy.java +++ b/android/src/main/java/com/xda/one/ui/thread/UnreadThreadClickStrategy.java @@ -1,13 +1,13 @@ package com.xda.one.ui.thread; -import com.xda.one.model.augmented.AugmentedUnifiedThread; - import android.app.ProgressDialog; import android.os.Parcel; import android.os.Parcelable; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; +import com.xda.one.model.augmented.AugmentedUnifiedThread; + import java.util.List; public class UnreadThreadClickStrategy implements ThreadClickStrategy { @@ -24,18 +24,18 @@ public UnreadThreadClickStrategy[] newArray(int size) { }; @Override - public void onClick(final Fragment fragment, final List hierarchy, - final AugmentedUnifiedThread thread) { - final ProgressDialog progressDialog = ProgressDialog.show(fragment.getActivity(), + public void onClick(final Fragment threadFragment, final List hierarchy, + final AugmentedUnifiedThread thread) { + final ProgressDialog progressDialog = ProgressDialog.show(threadFragment.getActivity(), "Finding post position", "Finding position of most recently read post", true, true); - final Fragment parentFragment = fragment.getParentFragment(); + final Fragment parentFragment = threadFragment.getParentFragment(); final FragmentManager fragmentManager = parentFragment == null - ? fragment.getFragmentManager() + ? threadFragment.getFragmentManager() : parentFragment.getFragmentManager(); - final ThreadUnreadPostHelper postHelper = new ThreadUnreadPostHelper(fragment.getActivity(), + final ThreadUnreadPostHelper postHelper = new ThreadUnreadPostHelper(threadFragment, fragmentManager, thread, progressDialog); postHelper.start(); } diff --git a/android/src/main/java/com/xda/one/ui/widget/DividerItemDecoration.java b/android/src/main/java/com/xda/one/ui/widget/DividerItemDecoration.java new file mode 100644 index 0000000..5b6db6f --- /dev/null +++ b/android/src/main/java/com/xda/one/ui/widget/DividerItemDecoration.java @@ -0,0 +1,108 @@ +/* + * Copyright (C) 2014 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.xda.one.ui.widget; + +import android.content.Context; +import android.content.res.TypedArray; +import android.graphics.Canvas; +import android.graphics.Rect; +import android.graphics.drawable.Drawable; +import android.support.v4.view.ViewCompat; +import android.support.v7.widget.LinearLayoutManager; +import android.support.v7.widget.RecyclerView; +import android.view.View; + +public class DividerItemDecoration extends RecyclerView.ItemDecoration { + + private static final int[] ATTRS = new int[]{ + android.R.attr.listDivider + }; + + public static final int HORIZONTAL_LIST = LinearLayoutManager.HORIZONTAL; + + public static final int VERTICAL_LIST = LinearLayoutManager.VERTICAL; + + private Drawable mDivider; + + private int mOrientation; + + public DividerItemDecoration(Context context, int orientation) { + final TypedArray a = context.obtainStyledAttributes(ATTRS); + mDivider = a.getDrawable(0); + a.recycle(); + setOrientation(orientation); + } + + public void setOrientation(int orientation) { + if (orientation != HORIZONTAL_LIST && orientation != VERTICAL_LIST) { + throw new IllegalArgumentException("invalid orientation"); + } + mOrientation = orientation; + } + + @Override + public void onDraw(Canvas c, RecyclerView parent) { + if (mOrientation == VERTICAL_LIST) { + drawVertical(c, parent); + } else { + drawHorizontal(c, parent); + } + } + + public void drawVertical(Canvas c, RecyclerView parent) { + final int left = parent.getPaddingLeft(); + final int right = parent.getWidth() - parent.getPaddingRight(); + + final int childCount = parent.getChildCount(); + for (int i = 0; i < childCount; i++) { + final View child = parent.getChildAt(i); + final RecyclerView.LayoutParams params = (RecyclerView.LayoutParams) child + .getLayoutParams(); + final int top = child.getBottom() + params.bottomMargin + + Math.round(ViewCompat.getTranslationY(child)); + final int bottom = top + mDivider.getIntrinsicHeight(); + mDivider.setBounds(left, top, right, bottom); + mDivider.draw(c); + } + } + + public void drawHorizontal(Canvas c, RecyclerView parent) { + final int top = parent.getPaddingTop(); + final int bottom = parent.getHeight() - parent.getPaddingBottom(); + + final int childCount = parent.getChildCount(); + for (int i = 0; i < childCount; i++) { + final View child = parent.getChildAt(i); + final RecyclerView.LayoutParams params = (RecyclerView.LayoutParams) child + .getLayoutParams(); + final int left = child.getRight() + params.rightMargin + + Math.round(ViewCompat.getTranslationX(child)); + final int right = left + mDivider.getIntrinsicHeight(); + mDivider.setBounds(left, top, right, bottom); + mDivider.draw(c); + } + } + + @Override + public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state) { + if (mOrientation == VERTICAL_LIST) { + outRect.set(0, 0, 0, mDivider.getIntrinsicHeight()); + } else { + outRect.set(0, 0, mDivider.getIntrinsicWidth(), 0); + } + } +} \ No newline at end of file diff --git a/android/src/main/java/com/xda/one/ui/widget/FloatingActionButton.java b/android/src/main/java/com/xda/one/ui/widget/FloatingActionButton.java index 6264f88..fe9752b 100644 --- a/android/src/main/java/com/xda/one/ui/widget/FloatingActionButton.java +++ b/android/src/main/java/com/xda/one/ui/widget/FloatingActionButton.java @@ -1,8 +1,5 @@ package com.xda.one.ui.widget; -import com.xda.one.R; -import com.xda.one.util.CompatUtils; - import android.annotation.TargetApi; import android.content.Context; import android.graphics.Canvas; @@ -17,6 +14,9 @@ import android.view.ViewOutlineProvider; import android.widget.ImageView; +import com.xda.one.R; +import com.xda.one.util.CompatUtils; + public class FloatingActionButton extends ImageView { private Paint mButtonPaint; @@ -24,13 +24,13 @@ public class FloatingActionButton extends ImageView { public FloatingActionButton(final Context context, final AttributeSet attributeSet) { super(context, attributeSet); - init(Color.BLUE); + init(getResources().getColor(R.color.fab_color)); } public FloatingActionButton(final Context context) { super(context); - init(Color.BLUE); + init(getResources().getColor(R.color.fab_color)); } @TargetApi(Build.VERSION_CODES.LOLLIPOP) diff --git a/android/src/main/java/com/xda/one/ui/widget/ScrimInsetsFrameLayout.java b/android/src/main/java/com/xda/one/ui/widget/ScrimInsetsFrameLayout.java new file mode 100644 index 0000000..bc69d58 --- /dev/null +++ b/android/src/main/java/com/xda/one/ui/widget/ScrimInsetsFrameLayout.java @@ -0,0 +1,138 @@ +package com.xda.one.ui.widget; + +import android.content.Context; +import android.content.res.TypedArray; +import android.graphics.Canvas; +import android.graphics.Rect; +import android.graphics.drawable.Drawable; +import android.support.v4.view.ViewCompat; +import android.util.AttributeSet; +import android.widget.FrameLayout; + +import com.xda.one.R; + +/* + * Copyright 2014 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * A layout that draws something in the insets passed to {@link #fitSystemWindows(android.graphics.Rect)}, i.e. the area above UI chrome (status and + * navigation bars, overlay action bars). + * + * Essentially its used to allow a navigation drawer to appear behind the status bar. + */ +public class ScrimInsetsFrameLayout extends FrameLayout { + private Drawable mInsetForeground; + + private Rect mInsets; + private Rect mTempRect = new Rect(); + private OnInsetsCallback mOnInsetsCallback; + + public ScrimInsetsFrameLayout(Context context) { + super(context); + init(context, null, 0); + } + + public ScrimInsetsFrameLayout(Context context, AttributeSet attrs) { + super(context, attrs); + init(context, attrs, 0); + } + + public ScrimInsetsFrameLayout(Context context, AttributeSet attrs, int defStyle) { + super(context, attrs, defStyle); + init(context, attrs, defStyle); + } + + private void init(Context context, AttributeSet attrs, int defStyle) { + final TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.ScrimInsetsView, defStyle, 0); + if (a == null) { + return; + } + mInsetForeground = a.getDrawable(R.styleable.ScrimInsetsView_insetForeground); + a.recycle(); + + setWillNotDraw(true); + } + + @Override protected boolean fitSystemWindows(Rect insets) { + mInsets = new Rect(insets); + setWillNotDraw(mInsetForeground == null); + ViewCompat.postInvalidateOnAnimation(this); + if (mOnInsetsCallback != null) { + mOnInsetsCallback.onInsetsChanged(insets); + } + return true; // consume insets + } + + @Override public void draw(Canvas canvas) { + super.draw(canvas); + + int width = getWidth(); + int height = getHeight(); + if (mInsets != null && mInsetForeground != null) { + int sc = canvas.save(); + canvas.translate(getScrollX(), getScrollY()); + + // Top + mTempRect.set(0, 0, width, mInsets.top); + mInsetForeground.setBounds(mTempRect); + mInsetForeground.draw(canvas); + + // Bottom + mTempRect.set(0, height - mInsets.bottom, width, height); + mInsetForeground.setBounds(mTempRect); + mInsetForeground.draw(canvas); + + // Left + mTempRect.set(0, mInsets.top, mInsets.left, height - mInsets.bottom); + mInsetForeground.setBounds(mTempRect); + mInsetForeground.draw(canvas); + + // Right + mTempRect.set(width - mInsets.right, mInsets.top, width, height - mInsets.bottom); + mInsetForeground.setBounds(mTempRect); + mInsetForeground.draw(canvas); + + canvas.restoreToCount(sc); + } + } + + @Override protected void onAttachedToWindow() { + super.onAttachedToWindow(); + if (mInsetForeground != null) { + mInsetForeground.setCallback(this); + } + } + + @Override protected void onDetachedFromWindow() { + super.onDetachedFromWindow(); + if (mInsetForeground != null) { + mInsetForeground.setCallback(null); + } + } + + /** + * Allows the calling container to specify a callback for custom processing when insets change (i.e. when + * {@link #fitSystemWindows(android.graphics.Rect)} is called. This is useful for setting padding on UI elements based on UI chrome insets (e.g. a Google + * Map or a ListView). When using with ListView or GridView, remember to set clipToPadding to false. + */ + public void setOnInsetsCallback(OnInsetsCallback onInsetsCallback) { + mOnInsetsCallback = onInsetsCallback; + } + + public static interface OnInsetsCallback { + public void onInsetsChanged(Rect insets); + } +} \ No newline at end of file diff --git a/android/src/main/java/com/xda/one/ui/widget/SlidingTabStrip.java b/android/src/main/java/com/xda/one/ui/widget/SlidingTabStrip.java index bd31229..92b54d1 100644 --- a/android/src/main/java/com/xda/one/ui/widget/SlidingTabStrip.java +++ b/android/src/main/java/com/xda/one/ui/widget/SlidingTabStrip.java @@ -27,19 +27,18 @@ class SlidingTabStrip extends LinearLayout { - private static final int DEFAULT_BOTTOM_BORDER_THICKNESS_DIPS = 2; + private static final int DEFAULT_BOTTOM_BORDER_THICKNESS_DIPS = 0; //2 private static final byte DEFAULT_BOTTOM_BORDER_COLOR_ALPHA = 0x26; - private static final int SELECTED_INDICATOR_THICKNESS_DIPS = 8; + private static final int SELECTED_INDICATOR_THICKNESS_DIPS = 2;//8 private static final int DEFAULT_SELECTED_INDICATOR_COLOR = 0xFF33B5E5; - private static final int DEFAULT_DIVIDER_THICKNESS_DIPS = 1; - private static final byte DEFAULT_DIVIDER_COLOR_ALPHA = 0x20; + //private static final byte DEFAULT_DIVIDER_COLOR_ALPHA = 0x20; - private static final float DEFAULT_DIVIDER_HEIGHT = 0.5f; + //private static final float DEFAULT_DIVIDER_HEIGHT = 0.5f; private final int mBottomBorderThickness; @@ -51,9 +50,9 @@ class SlidingTabStrip extends LinearLayout { private final int mDefaultBottomBorderColor; - private final Paint mDividerPaint; + //private final Paint mDividerPaint; - private final float mDividerHeight; + //private final float mDividerHeight; private final SimpleTabColorizer mDefaultTabColorizer; @@ -82,8 +81,8 @@ class SlidingTabStrip extends LinearLayout { mDefaultTabColorizer = new SimpleTabColorizer(); mDefaultTabColorizer.setIndicatorColors(DEFAULT_SELECTED_INDICATOR_COLOR); - mDefaultTabColorizer.setDividerColors(setColorAlpha(themeForegroundColor, - DEFAULT_DIVIDER_COLOR_ALPHA)); + //mDefaultTabColorizer.setDividerColors(setColorAlpha(themeForegroundColor, + // DEFAULT_DIVIDER_COLOR_ALPHA)); mBottomBorderThickness = (int) (DEFAULT_BOTTOM_BORDER_THICKNESS_DIPS * density); mBottomBorderPaint = new Paint(); @@ -92,9 +91,9 @@ class SlidingTabStrip extends LinearLayout { mSelectedIndicatorThickness = (int) (SELECTED_INDICATOR_THICKNESS_DIPS * density); mSelectedIndicatorPaint = new Paint(); - mDividerHeight = DEFAULT_DIVIDER_HEIGHT; - mDividerPaint = new Paint(); - mDividerPaint.setStrokeWidth((int) (DEFAULT_DIVIDER_THICKNESS_DIPS * density)); + //mDividerHeight = DEFAULT_DIVIDER_HEIGHT; + //mDividerPaint = new Paint(); + //mDividerPaint.setStrokeWidth((int) (DEFAULT_DIVIDER_THICKNESS_DIPS * density)); } /** @@ -147,7 +146,7 @@ void onTabPositionChanged(int position, float positionOffset) { protected void onDraw(Canvas canvas) { final int height = getHeight(); final int childCount = getChildCount(); - final int dividerHeightPx = (int) (Math.min(Math.max(0f, mDividerHeight), 1f) * height); + //final int dividerHeightPx = (int) (Math.min(Math.max(0f, mDividerHeight), 1f) * height); final TabLayout.TabColorizer tabColorizer = mCustomTabColorizer != null ? mCustomTabColorizer : mDefaultTabColorizer; @@ -182,6 +181,7 @@ protected void onDraw(Canvas canvas) { // Thin underline along the entire bottom edge canvas.drawRect(0, height - mBottomBorderThickness, getWidth(), height, mBottomBorderPaint); + /* // Vertical separators between the titles int separatorTop = (height - dividerHeightPx) / 2; for (int i = 0; i < childCount - 1; i++) { @@ -190,6 +190,7 @@ protected void onDraw(Canvas canvas) { canvas.drawLine(child.getRight(), separatorTop, child.getRight(), separatorTop + dividerHeightPx, mDividerPaint); } + */ } private static class SimpleTabColorizer implements TabLayout.TabColorizer { diff --git a/android/src/main/java/com/xda/one/util/OneApplication.java b/android/src/main/java/com/xda/one/util/OneApplication.java index 07a88ec..2059dbe 100644 --- a/android/src/main/java/com/xda/one/util/OneApplication.java +++ b/android/src/main/java/com/xda/one/util/OneApplication.java @@ -10,6 +10,7 @@ import android.content.Context; import java.util.HashMap; +import java.util.Map; public class OneApplication extends Application { @@ -22,7 +23,7 @@ public enum TrackerName { ECOMMERCE_TRACKER, // Tracker used by all ecommerce transactions from a company. } - private final HashMap mTrackers = new HashMap<>(); + private final Map mTrackers = new HashMap<>(); public synchronized Tracker getTracker(TrackerName trackerId) { if (mTrackers.containsKey(trackerId)) { diff --git a/android/src/main/java/com/xda/one/util/UIUtils.java b/android/src/main/java/com/xda/one/util/UIUtils.java index e8dba1a..af9a3c3 100644 --- a/android/src/main/java/com/xda/one/util/UIUtils.java +++ b/android/src/main/java/com/xda/one/util/UIUtils.java @@ -1,8 +1,5 @@ package com.xda.one.util; -import com.xda.one.R; -import com.xda.one.ui.BaseActivity; - import android.app.Activity; import android.content.Context; import android.support.v7.app.ActionBar; @@ -10,6 +7,9 @@ import android.util.TypedValue; import android.view.View; +import com.xda.one.R; +import com.xda.one.ui.BaseActivity; + import static android.view.View.GONE; import static android.view.View.VISIBLE; @@ -30,7 +30,7 @@ public static void updateEmptyViewState(final View view, final RecyclerView recy // If we don't have any threads then simply tell the user this and quit if (isEmpty) { // Toggle what's happening with the view - showEmptyText(recyclerView, emptyView); + showEmptyView(recyclerView, emptyView); // TODO - find if there's a better way to do this // For now simply show the empty view ... @@ -53,14 +53,14 @@ public static void updateEmptyViewState(final View view, final RecyclerView recy updateEmptyViewState(view, recyclerView, itemCount == 0); } - public static void showEmptyText(final RecyclerView recyclerView, final View emptyView) { + public static void showEmptyView(final RecyclerView recyclerView, final View emptyView) { recyclerView.setVisibility(GONE); emptyView.setVisibility(VISIBLE); - final View textView = emptyView.findViewById(R.id.empty_view_text_view); + final View linearLayout = emptyView.findViewById(R.id.empty_view); final View progressBar = emptyView.findViewById(R.id.empty_view_progress_bar); - textView.setVisibility(VISIBLE); + linearLayout.setVisibility(VISIBLE); progressBar.setVisibility(GONE); } @@ -68,10 +68,10 @@ public static void showLoadingProgress(final RecyclerView recyclerView, final Vi recyclerView.setVisibility(GONE); emptyView.setVisibility(VISIBLE); - final View textView = emptyView.findViewById(R.id.empty_view_text_view); + final View linearLayout = emptyView.findViewById(R.id.empty_view); final View progressBar = emptyView.findViewById(R.id.empty_view_progress_bar); - textView.setVisibility(GONE); + linearLayout.setVisibility(GONE); progressBar.setVisibility(VISIBLE); } diff --git a/android/src/main/res/drawable-hdpi/account_circle.png b/android/src/main/res/drawable-hdpi/account_circle.png new file mode 100644 index 0000000..a24d5a2 Binary files /dev/null and b/android/src/main/res/drawable-hdpi/account_circle.png differ diff --git a/android/src/main/res/drawable-hdpi/attachment_bg.9.png b/android/src/main/res/drawable-hdpi/attachment_bg.9.png new file mode 100644 index 0000000..6077ce1 Binary files /dev/null and b/android/src/main/res/drawable-hdpi/attachment_bg.9.png differ diff --git a/android/src/main/res/drawable-hdpi/ic_account_circle_light.png b/android/src/main/res/drawable-hdpi/ic_account_circle_light.png index e12a16b..8720319 100644 Binary files a/android/src/main/res/drawable-hdpi/ic_account_circle_light.png and b/android/src/main/res/drawable-hdpi/ic_account_circle_light.png differ diff --git a/android/src/main/res/drawable-hdpi/ic_action_menu.png b/android/src/main/res/drawable-hdpi/ic_action_menu.png deleted file mode 100644 index 73b5b52..0000000 Binary files a/android/src/main/res/drawable-hdpi/ic_action_menu.png and /dev/null differ diff --git a/android/src/main/res/drawable-hdpi/ic_action_send.png b/android/src/main/res/drawable-hdpi/ic_action_send.png index ba1e279..b771392 100644 Binary files a/android/src/main/res/drawable-hdpi/ic_action_send.png and b/android/src/main/res/drawable-hdpi/ic_action_send.png differ diff --git a/android/src/main/res/drawable-hdpi/ic_action_send_disabled.png b/android/src/main/res/drawable-hdpi/ic_action_send_disabled.png index d235dcc..a28ad00 100644 Binary files a/android/src/main/res/drawable-hdpi/ic_action_send_disabled.png and b/android/src/main/res/drawable-hdpi/ic_action_send_disabled.png differ diff --git a/android/src/main/res/drawable-hdpi/ic_action_send_light.png b/android/src/main/res/drawable-hdpi/ic_action_send_light.png index bdcc9a7..f7753d4 100644 Binary files a/android/src/main/res/drawable-hdpi/ic_action_send_light.png and b/android/src/main/res/drawable-hdpi/ic_action_send_light.png differ diff --git a/android/src/main/res/drawable-hdpi/ic_attach_file.png b/android/src/main/res/drawable-hdpi/ic_attach_file.png new file mode 100644 index 0000000..73e6910 Binary files /dev/null and b/android/src/main/res/drawable-hdpi/ic_attach_file.png differ diff --git a/android/src/main/res/drawable-hdpi/ic_feed_icon.png b/android/src/main/res/drawable-hdpi/ic_feed_icon.png index dd6f980..abe31ab 100644 Binary files a/android/src/main/res/drawable-hdpi/ic_feed_icon.png and b/android/src/main/res/drawable-hdpi/ic_feed_icon.png differ diff --git a/android/src/main/res/drawable-hdpi/ic_insert_emoticon.png b/android/src/main/res/drawable-hdpi/ic_insert_emoticon.png index 60e99ed..8952052 100644 Binary files a/android/src/main/res/drawable-hdpi/ic_insert_emoticon.png and b/android/src/main/res/drawable-hdpi/ic_insert_emoticon.png differ diff --git a/android/src/main/res/drawable-hdpi/ic_lock.png b/android/src/main/res/drawable-hdpi/ic_lock.png index e4224fe..4034dc9 100644 Binary files a/android/src/main/res/drawable-hdpi/ic_lock.png and b/android/src/main/res/drawable-hdpi/ic_lock.png differ diff --git a/android/src/main/res/drawable-hdpi/ic_mult_quote_dark.png b/android/src/main/res/drawable-hdpi/ic_mult_quote_dark.png index e28b066..7f34f55 100644 Binary files a/android/src/main/res/drawable-hdpi/ic_mult_quote_dark.png and b/android/src/main/res/drawable-hdpi/ic_mult_quote_dark.png differ diff --git a/android/src/main/res/drawable-hdpi/ic_nav_account.png b/android/src/main/res/drawable-hdpi/ic_nav_account.png new file mode 100644 index 0000000..c7fee29 Binary files /dev/null and b/android/src/main/res/drawable-hdpi/ic_nav_account.png differ diff --git a/android/src/main/res/drawable-hdpi/ic_nav_favorite.png b/android/src/main/res/drawable-hdpi/ic_nav_favorite.png new file mode 100644 index 0000000..c4ad1cb Binary files /dev/null and b/android/src/main/res/drawable-hdpi/ic_nav_favorite.png differ diff --git a/android/src/main/res/drawable-hdpi/ic_nav_forums.png b/android/src/main/res/drawable-hdpi/ic_nav_forums.png new file mode 100644 index 0000000..ad852de Binary files /dev/null and b/android/src/main/res/drawable-hdpi/ic_nav_forums.png differ diff --git a/android/src/main/res/drawable-hdpi/ic_nav_message.png b/android/src/main/res/drawable-hdpi/ic_nav_message.png new file mode 100644 index 0000000..3864f22 Binary files /dev/null and b/android/src/main/res/drawable-hdpi/ic_nav_message.png differ diff --git a/android/src/main/res/drawable-hdpi/ic_nav_participated.png b/android/src/main/res/drawable-hdpi/ic_nav_participated.png new file mode 100644 index 0000000..c810c8c Binary files /dev/null and b/android/src/main/res/drawable-hdpi/ic_nav_participated.png differ diff --git a/android/src/main/res/drawable-hdpi/ic_nav_phone.png b/android/src/main/res/drawable-hdpi/ic_nav_phone.png new file mode 100644 index 0000000..aadfe17 Binary files /dev/null and b/android/src/main/res/drawable-hdpi/ic_nav_phone.png differ diff --git a/android/src/main/res/drawable-hdpi/ic_nav_reply.png b/android/src/main/res/drawable-hdpi/ic_nav_reply.png new file mode 100644 index 0000000..a821520 Binary files /dev/null and b/android/src/main/res/drawable-hdpi/ic_nav_reply.png differ diff --git a/android/src/main/res/drawable-hdpi/ic_nav_search.png b/android/src/main/res/drawable-hdpi/ic_nav_search.png new file mode 100644 index 0000000..f9c0b2e Binary files /dev/null and b/android/src/main/res/drawable-hdpi/ic_nav_search.png differ diff --git a/android/src/main/res/drawable-hdpi/ic_no_items.png b/android/src/main/res/drawable-hdpi/ic_no_items.png new file mode 100644 index 0000000..abe31ab Binary files /dev/null and b/android/src/main/res/drawable-hdpi/ic_no_items.png differ diff --git a/android/src/main/res/drawable-hdpi/ic_pin.png b/android/src/main/res/drawable-hdpi/ic_pin.png index 1228f97..a05649f 100644 Binary files a/android/src/main/res/drawable-hdpi/ic_pin.png and b/android/src/main/res/drawable-hdpi/ic_pin.png differ diff --git a/android/src/main/res/drawable-hdpi/ic_quote_dark.png b/android/src/main/res/drawable-hdpi/ic_quote_dark.png index 2074ce2..a81493a 100644 Binary files a/android/src/main/res/drawable-hdpi/ic_quote_dark.png and b/android/src/main/res/drawable-hdpi/ic_quote_dark.png differ diff --git a/android/src/main/res/drawable-hdpi/ic_search_dark.png b/android/src/main/res/drawable-hdpi/ic_search_dark.png index d0a404f..ba65a13 100644 Binary files a/android/src/main/res/drawable-hdpi/ic_search_dark.png and b/android/src/main/res/drawable-hdpi/ic_search_dark.png differ diff --git a/android/src/main/res/drawable-hdpi/ic_search_light.png b/android/src/main/res/drawable-hdpi/ic_search_light.png index a7f03d9..a2fc5b2 100644 Binary files a/android/src/main/res/drawable-hdpi/ic_search_light.png and b/android/src/main/res/drawable-hdpi/ic_search_light.png differ diff --git a/android/src/main/res/drawable-hdpi/ic_share.png b/android/src/main/res/drawable-hdpi/ic_share.png new file mode 100644 index 0000000..93b3c21 Binary files /dev/null and b/android/src/main/res/drawable-hdpi/ic_share.png differ diff --git a/android/src/main/res/drawable-hdpi/ic_star_light.png b/android/src/main/res/drawable-hdpi/ic_star_light.png index 2a2f8a5..c31388b 100644 Binary files a/android/src/main/res/drawable-hdpi/ic_star_light.png and b/android/src/main/res/drawable-hdpi/ic_star_light.png differ diff --git a/android/src/main/res/drawable-hdpi/ic_star_outline.png b/android/src/main/res/drawable-hdpi/ic_star_outline.png new file mode 100644 index 0000000..52a2227 Binary files /dev/null and b/android/src/main/res/drawable-hdpi/ic_star_outline.png differ diff --git a/android/src/main/res/drawable-hdpi/ic_star_outline_selected.png b/android/src/main/res/drawable-hdpi/ic_star_outline_selected.png new file mode 100644 index 0000000..c42f507 Binary files /dev/null and b/android/src/main/res/drawable-hdpi/ic_star_outline_selected.png differ diff --git a/android/src/main/res/drawable-hdpi/ic_thumb_up_dark.png b/android/src/main/res/drawable-hdpi/ic_thumb_up_dark.png index e6dfdac..a7427e6 100644 Binary files a/android/src/main/res/drawable-hdpi/ic_thumb_up_dark.png and b/android/src/main/res/drawable-hdpi/ic_thumb_up_dark.png differ diff --git a/android/src/main/res/drawable-hdpi/ic_thumb_up_dark_outline.png b/android/src/main/res/drawable-hdpi/ic_thumb_up_dark_outline.png index 28a8dda..a49f529 100644 Binary files a/android/src/main/res/drawable-hdpi/ic_thumb_up_dark_outline.png and b/android/src/main/res/drawable-hdpi/ic_thumb_up_dark_outline.png differ diff --git a/android/src/main/res/drawable-hdpi/ic_thumb_up_outline.png b/android/src/main/res/drawable-hdpi/ic_thumb_up_outline.png index 28a8dda..a49f529 100644 Binary files a/android/src/main/res/drawable-hdpi/ic_thumb_up_outline.png and b/android/src/main/res/drawable-hdpi/ic_thumb_up_outline.png differ diff --git a/android/src/main/res/drawable-hdpi/profile_background.png b/android/src/main/res/drawable-hdpi/profile_background.png new file mode 100644 index 0000000..de9ad82 Binary files /dev/null and b/android/src/main/res/drawable-hdpi/profile_background.png differ diff --git a/android/src/main/res/drawable-hdpi/skip_next.png b/android/src/main/res/drawable-hdpi/skip_next.png index 19913ca..1512685 100644 Binary files a/android/src/main/res/drawable-hdpi/skip_next.png and b/android/src/main/res/drawable-hdpi/skip_next.png differ diff --git a/android/src/main/res/drawable-hdpi/skip_previous.png b/android/src/main/res/drawable-hdpi/skip_previous.png index 1104aa8..5fa4948 100644 Binary files a/android/src/main/res/drawable-hdpi/skip_previous.png and b/android/src/main/res/drawable-hdpi/skip_previous.png differ diff --git a/android/src/main/res/drawable-mdpi/ic_account_circle_light.png b/android/src/main/res/drawable-mdpi/ic_account_circle_light.png index ea6682d..4b7e584 100644 Binary files a/android/src/main/res/drawable-mdpi/ic_account_circle_light.png and b/android/src/main/res/drawable-mdpi/ic_account_circle_light.png differ diff --git a/android/src/main/res/drawable-mdpi/ic_attach_file.png b/android/src/main/res/drawable-mdpi/ic_attach_file.png new file mode 100644 index 0000000..57e2066 Binary files /dev/null and b/android/src/main/res/drawable-mdpi/ic_attach_file.png differ diff --git a/android/src/main/res/drawable-mdpi/ic_feed_icon.png b/android/src/main/res/drawable-mdpi/ic_feed_icon.png index 3c4e0ed..be95134 100644 Binary files a/android/src/main/res/drawable-mdpi/ic_feed_icon.png and b/android/src/main/res/drawable-mdpi/ic_feed_icon.png differ diff --git a/android/src/main/res/drawable-mdpi/ic_insert_emoticon.png b/android/src/main/res/drawable-mdpi/ic_insert_emoticon.png index 987e4b2..fdc1714 100644 Binary files a/android/src/main/res/drawable-mdpi/ic_insert_emoticon.png and b/android/src/main/res/drawable-mdpi/ic_insert_emoticon.png differ diff --git a/android/src/main/res/drawable-mdpi/ic_lock.png b/android/src/main/res/drawable-mdpi/ic_lock.png index 65960dd..3aa7f36 100644 Binary files a/android/src/main/res/drawable-mdpi/ic_lock.png and b/android/src/main/res/drawable-mdpi/ic_lock.png differ diff --git a/android/src/main/res/drawable-mdpi/ic_mult_quote_dark.png b/android/src/main/res/drawable-mdpi/ic_mult_quote_dark.png index e233588..e560997 100644 Binary files a/android/src/main/res/drawable-mdpi/ic_mult_quote_dark.png and b/android/src/main/res/drawable-mdpi/ic_mult_quote_dark.png differ diff --git a/android/src/main/res/drawable-mdpi/ic_no_items.png b/android/src/main/res/drawable-mdpi/ic_no_items.png new file mode 100644 index 0000000..be95134 Binary files /dev/null and b/android/src/main/res/drawable-mdpi/ic_no_items.png differ diff --git a/android/src/main/res/drawable-mdpi/ic_pin.png b/android/src/main/res/drawable-mdpi/ic_pin.png index 6d1bbc0..9d2797e 100644 Binary files a/android/src/main/res/drawable-mdpi/ic_pin.png and b/android/src/main/res/drawable-mdpi/ic_pin.png differ diff --git a/android/src/main/res/drawable-mdpi/ic_quote_dark.png b/android/src/main/res/drawable-mdpi/ic_quote_dark.png index a4e8643..df72079 100644 Binary files a/android/src/main/res/drawable-mdpi/ic_quote_dark.png and b/android/src/main/res/drawable-mdpi/ic_quote_dark.png differ diff --git a/android/src/main/res/drawable-mdpi/ic_share_white_24dp.png b/android/src/main/res/drawable-mdpi/ic_share_white_24dp.png new file mode 100644 index 0000000..4d01972 Binary files /dev/null and b/android/src/main/res/drawable-mdpi/ic_share_white_24dp.png differ diff --git a/android/src/main/res/drawable-mdpi/ic_star_light.png b/android/src/main/res/drawable-mdpi/ic_star_light.png index dec70e4..9ef21b8 100644 Binary files a/android/src/main/res/drawable-mdpi/ic_star_light.png and b/android/src/main/res/drawable-mdpi/ic_star_light.png differ diff --git a/android/src/main/res/drawable-mdpi/ic_thumb_up_dark.png b/android/src/main/res/drawable-mdpi/ic_thumb_up_dark.png index 9ec51e2..07c167e 100644 Binary files a/android/src/main/res/drawable-mdpi/ic_thumb_up_dark.png and b/android/src/main/res/drawable-mdpi/ic_thumb_up_dark.png differ diff --git a/android/src/main/res/drawable-mdpi/ic_thumb_up_dark_outline.png b/android/src/main/res/drawable-mdpi/ic_thumb_up_dark_outline.png index 0da4f00..576430c 100644 Binary files a/android/src/main/res/drawable-mdpi/ic_thumb_up_dark_outline.png and b/android/src/main/res/drawable-mdpi/ic_thumb_up_dark_outline.png differ diff --git a/android/src/main/res/drawable-mdpi/ic_thumb_up_outline.png b/android/src/main/res/drawable-mdpi/ic_thumb_up_outline.png index 0da4f00..576430c 100644 Binary files a/android/src/main/res/drawable-mdpi/ic_thumb_up_outline.png and b/android/src/main/res/drawable-mdpi/ic_thumb_up_outline.png differ diff --git a/android/src/main/res/drawable-xhdpi/account_circle.png b/android/src/main/res/drawable-xhdpi/account_circle.png index 08d3748..c7fee29 100644 Binary files a/android/src/main/res/drawable-xhdpi/account_circle.png and b/android/src/main/res/drawable-xhdpi/account_circle.png differ diff --git a/android/src/main/res/drawable-xhdpi/attachment_bg.9.png b/android/src/main/res/drawable-xhdpi/attachment_bg.9.png new file mode 100644 index 0000000..de242d9 Binary files /dev/null and b/android/src/main/res/drawable-xhdpi/attachment_bg.9.png differ diff --git a/android/src/main/res/drawable-xhdpi/forum.png b/android/src/main/res/drawable-xhdpi/forum.png deleted file mode 100644 index 56f99df..0000000 Binary files a/android/src/main/res/drawable-xhdpi/forum.png and /dev/null differ diff --git a/android/src/main/res/drawable-xhdpi/ic_account_circle_light.png b/android/src/main/res/drawable-xhdpi/ic_account_circle_light.png index 8f0050d..9934f37 100644 Binary files a/android/src/main/res/drawable-xhdpi/ic_account_circle_light.png and b/android/src/main/res/drawable-xhdpi/ic_account_circle_light.png differ diff --git a/android/src/main/res/drawable-xhdpi/ic_action_send.png b/android/src/main/res/drawable-xhdpi/ic_action_send.png index efb6ab4..e138046 100644 Binary files a/android/src/main/res/drawable-xhdpi/ic_action_send.png and b/android/src/main/res/drawable-xhdpi/ic_action_send.png differ diff --git a/android/src/main/res/drawable-xhdpi/ic_action_send_disabled.png b/android/src/main/res/drawable-xhdpi/ic_action_send_disabled.png index a52ef24..c8ee50b 100644 Binary files a/android/src/main/res/drawable-xhdpi/ic_action_send_disabled.png and b/android/src/main/res/drawable-xhdpi/ic_action_send_disabled.png differ diff --git a/android/src/main/res/drawable-xhdpi/ic_action_send_light.png b/android/src/main/res/drawable-xhdpi/ic_action_send_light.png index 2907079..6e09313 100644 Binary files a/android/src/main/res/drawable-xhdpi/ic_action_send_light.png and b/android/src/main/res/drawable-xhdpi/ic_action_send_light.png differ diff --git a/android/src/main/res/drawable-xhdpi/ic_attach_file.png b/android/src/main/res/drawable-xhdpi/ic_attach_file.png new file mode 100644 index 0000000..b544bea Binary files /dev/null and b/android/src/main/res/drawable-xhdpi/ic_attach_file.png differ diff --git a/android/src/main/res/drawable-xhdpi/ic_feed_icon.png b/android/src/main/res/drawable-xhdpi/ic_feed_icon.png new file mode 100644 index 0000000..c8bd5e8 Binary files /dev/null and b/android/src/main/res/drawable-xhdpi/ic_feed_icon.png differ diff --git a/android/src/main/res/drawable-xhdpi/ic_insert_emoticon.png b/android/src/main/res/drawable-xhdpi/ic_insert_emoticon.png index 9d8a4c0..526992e 100644 Binary files a/android/src/main/res/drawable-xhdpi/ic_insert_emoticon.png and b/android/src/main/res/drawable-xhdpi/ic_insert_emoticon.png differ diff --git a/android/src/main/res/drawable-xhdpi/ic_lock.png b/android/src/main/res/drawable-xhdpi/ic_lock.png index 1658e92..c398ccf 100644 Binary files a/android/src/main/res/drawable-xhdpi/ic_lock.png and b/android/src/main/res/drawable-xhdpi/ic_lock.png differ diff --git a/android/src/main/res/drawable-xhdpi/ic_mult_quote_dark.png b/android/src/main/res/drawable-xhdpi/ic_mult_quote_dark.png index 467e547..ad852de 100644 Binary files a/android/src/main/res/drawable-xhdpi/ic_mult_quote_dark.png and b/android/src/main/res/drawable-xhdpi/ic_mult_quote_dark.png differ diff --git a/android/src/main/res/drawable-xhdpi/ic_nav_account.png b/android/src/main/res/drawable-xhdpi/ic_nav_account.png new file mode 100644 index 0000000..c7fee29 Binary files /dev/null and b/android/src/main/res/drawable-xhdpi/ic_nav_account.png differ diff --git a/android/src/main/res/drawable-xhdpi/ic_nav_favorite.png b/android/src/main/res/drawable-xhdpi/ic_nav_favorite.png new file mode 100644 index 0000000..c4ad1cb Binary files /dev/null and b/android/src/main/res/drawable-xhdpi/ic_nav_favorite.png differ diff --git a/android/src/main/res/drawable-xhdpi/ic_nav_forums.png b/android/src/main/res/drawable-xhdpi/ic_nav_forums.png new file mode 100644 index 0000000..ad852de Binary files /dev/null and b/android/src/main/res/drawable-xhdpi/ic_nav_forums.png differ diff --git a/android/src/main/res/drawable-xhdpi/ic_nav_message.png b/android/src/main/res/drawable-xhdpi/ic_nav_message.png new file mode 100644 index 0000000..3864f22 Binary files /dev/null and b/android/src/main/res/drawable-xhdpi/ic_nav_message.png differ diff --git a/android/src/main/res/drawable-xhdpi/ic_nav_participated.png b/android/src/main/res/drawable-xhdpi/ic_nav_participated.png new file mode 100644 index 0000000..c810c8c Binary files /dev/null and b/android/src/main/res/drawable-xhdpi/ic_nav_participated.png differ diff --git a/android/src/main/res/drawable-xhdpi/ic_nav_phone.png b/android/src/main/res/drawable-xhdpi/ic_nav_phone.png new file mode 100644 index 0000000..aadfe17 Binary files /dev/null and b/android/src/main/res/drawable-xhdpi/ic_nav_phone.png differ diff --git a/android/src/main/res/drawable-xhdpi/ic_nav_reply.png b/android/src/main/res/drawable-xhdpi/ic_nav_reply.png new file mode 100644 index 0000000..a821520 Binary files /dev/null and b/android/src/main/res/drawable-xhdpi/ic_nav_reply.png differ diff --git a/android/src/main/res/drawable-xhdpi/ic_nav_search.png b/android/src/main/res/drawable-xhdpi/ic_nav_search.png new file mode 100644 index 0000000..f9c0b2e Binary files /dev/null and b/android/src/main/res/drawable-xhdpi/ic_nav_search.png differ diff --git a/android/src/main/res/drawable-xhdpi/ic_no_items.png b/android/src/main/res/drawable-xhdpi/ic_no_items.png new file mode 100644 index 0000000..c8bd5e8 Binary files /dev/null and b/android/src/main/res/drawable-xhdpi/ic_no_items.png differ diff --git a/android/src/main/res/drawable-xhdpi/ic_pin.png b/android/src/main/res/drawable-xhdpi/ic_pin.png index d51a089..0858313 100644 Binary files a/android/src/main/res/drawable-xhdpi/ic_pin.png and b/android/src/main/res/drawable-xhdpi/ic_pin.png differ diff --git a/android/src/main/res/drawable-xhdpi/ic_quote_dark.png b/android/src/main/res/drawable-xhdpi/ic_quote_dark.png index bb9d6b3..3864f22 100644 Binary files a/android/src/main/res/drawable-xhdpi/ic_quote_dark.png and b/android/src/main/res/drawable-xhdpi/ic_quote_dark.png differ diff --git a/android/src/main/res/drawable-xhdpi/ic_search_dark.png b/android/src/main/res/drawable-xhdpi/ic_search_dark.png index 1f61d00..f9c0b2e 100644 Binary files a/android/src/main/res/drawable-xhdpi/ic_search_dark.png and b/android/src/main/res/drawable-xhdpi/ic_search_dark.png differ diff --git a/android/src/main/res/drawable-xhdpi/ic_search_light.png b/android/src/main/res/drawable-xhdpi/ic_search_light.png index 8b8b05c..043759a 100644 Binary files a/android/src/main/res/drawable-xhdpi/ic_search_light.png and b/android/src/main/res/drawable-xhdpi/ic_search_light.png differ diff --git a/android/src/main/res/drawable-xhdpi/ic_share.png b/android/src/main/res/drawable-xhdpi/ic_share.png new file mode 100644 index 0000000..dd536bc Binary files /dev/null and b/android/src/main/res/drawable-xhdpi/ic_share.png differ diff --git a/android/src/main/res/drawable-xhdpi/ic_star_light.png b/android/src/main/res/drawable-xhdpi/ic_star_light.png index 4cc50be..46de0e9 100644 Binary files a/android/src/main/res/drawable-xhdpi/ic_star_light.png and b/android/src/main/res/drawable-xhdpi/ic_star_light.png differ diff --git a/android/src/main/res/drawable-xhdpi/ic_star_light_outline.png b/android/src/main/res/drawable-xhdpi/ic_star_light_outline.png index 7f2fc83..1472f6a 100644 Binary files a/android/src/main/res/drawable-xhdpi/ic_star_light_outline.png and b/android/src/main/res/drawable-xhdpi/ic_star_light_outline.png differ diff --git a/android/src/main/res/drawable-xhdpi/ic_star_outline.png b/android/src/main/res/drawable-xhdpi/ic_star_outline.png new file mode 100644 index 0000000..55d6a99 Binary files /dev/null and b/android/src/main/res/drawable-xhdpi/ic_star_outline.png differ diff --git a/android/src/main/res/drawable-xhdpi/ic_star_outline_light.png b/android/src/main/res/drawable-xhdpi/ic_star_outline_light.png index 7f2fc83..1472f6a 100644 Binary files a/android/src/main/res/drawable-xhdpi/ic_star_outline_light.png and b/android/src/main/res/drawable-xhdpi/ic_star_outline_light.png differ diff --git a/android/src/main/res/drawable-xhdpi/ic_star_outline_selected.png b/android/src/main/res/drawable-xhdpi/ic_star_outline_selected.png new file mode 100644 index 0000000..037adfc Binary files /dev/null and b/android/src/main/res/drawable-xhdpi/ic_star_outline_selected.png differ diff --git a/android/src/main/res/drawable-xhdpi/ic_thumb_up_dark.png b/android/src/main/res/drawable-xhdpi/ic_thumb_up_dark.png index 87e0a87..a9ed39b 100644 Binary files a/android/src/main/res/drawable-xhdpi/ic_thumb_up_dark.png and b/android/src/main/res/drawable-xhdpi/ic_thumb_up_dark.png differ diff --git a/android/src/main/res/drawable-xhdpi/ic_thumb_up_dark_outline.png b/android/src/main/res/drawable-xhdpi/ic_thumb_up_dark_outline.png index ff746b3..f9d4e84 100644 Binary files a/android/src/main/res/drawable-xhdpi/ic_thumb_up_dark_outline.png and b/android/src/main/res/drawable-xhdpi/ic_thumb_up_dark_outline.png differ diff --git a/android/src/main/res/drawable-xhdpi/ic_thumb_up_outline.png b/android/src/main/res/drawable-xhdpi/ic_thumb_up_outline.png index ff746b3..f9d4e84 100644 Binary files a/android/src/main/res/drawable-xhdpi/ic_thumb_up_outline.png and b/android/src/main/res/drawable-xhdpi/ic_thumb_up_outline.png differ diff --git a/android/src/main/res/drawable-xhdpi/message.png b/android/src/main/res/drawable-xhdpi/message.png deleted file mode 100644 index ce1fecb..0000000 Binary files a/android/src/main/res/drawable-xhdpi/message.png and /dev/null differ diff --git a/android/src/main/res/drawable-xhdpi/phone.png b/android/src/main/res/drawable-xhdpi/phone.png deleted file mode 100644 index dd2ece3..0000000 Binary files a/android/src/main/res/drawable-xhdpi/phone.png and /dev/null differ diff --git a/android/src/main/res/drawable-xhdpi/profile_background.png b/android/src/main/res/drawable-xhdpi/profile_background.png new file mode 100644 index 0000000..c4dc4ff Binary files /dev/null and b/android/src/main/res/drawable-xhdpi/profile_background.png differ diff --git a/android/src/main/res/drawable-xhdpi/reply.png b/android/src/main/res/drawable-xhdpi/reply.png deleted file mode 100644 index e2ca3ff..0000000 Binary files a/android/src/main/res/drawable-xhdpi/reply.png and /dev/null differ diff --git a/android/src/main/res/drawable-xhdpi/skip_next.png b/android/src/main/res/drawable-xhdpi/skip_next.png index ac94e36..5ec9356 100644 Binary files a/android/src/main/res/drawable-xhdpi/skip_next.png and b/android/src/main/res/drawable-xhdpi/skip_next.png differ diff --git a/android/src/main/res/drawable-xhdpi/skip_previous.png b/android/src/main/res/drawable-xhdpi/skip_previous.png index e592c76..addbfc8 100644 Binary files a/android/src/main/res/drawable-xhdpi/skip_previous.png and b/android/src/main/res/drawable-xhdpi/skip_previous.png differ diff --git a/android/src/main/res/drawable-xxhdpi/account_circle.png b/android/src/main/res/drawable-xxhdpi/account_circle.png new file mode 100644 index 0000000..61c0685 Binary files /dev/null and b/android/src/main/res/drawable-xxhdpi/account_circle.png differ diff --git a/android/src/main/res/drawable-xxhdpi/attachment_bg.9.png b/android/src/main/res/drawable-xxhdpi/attachment_bg.9.png new file mode 100644 index 0000000..4d449f3 Binary files /dev/null and b/android/src/main/res/drawable-xxhdpi/attachment_bg.9.png differ diff --git a/android/src/main/res/drawable-xxhdpi/chevron_left.png b/android/src/main/res/drawable-xxhdpi/chevron_left.png index c3b3d41..10643ae 100644 Binary files a/android/src/main/res/drawable-xxhdpi/chevron_left.png and b/android/src/main/res/drawable-xxhdpi/chevron_left.png differ diff --git a/android/src/main/res/drawable-xxhdpi/chevron_right.png b/android/src/main/res/drawable-xxhdpi/chevron_right.png index c6ed883..360d3c5 100644 Binary files a/android/src/main/res/drawable-xxhdpi/chevron_right.png and b/android/src/main/res/drawable-xxhdpi/chevron_right.png differ diff --git a/android/src/main/res/drawable-xxhdpi/forum.png b/android/src/main/res/drawable-xxhdpi/forum.png new file mode 100644 index 0000000..4466d20 Binary files /dev/null and b/android/src/main/res/drawable-xxhdpi/forum.png differ diff --git a/android/src/main/res/drawable-xxhdpi/ic_account_circle_light.png b/android/src/main/res/drawable-xxhdpi/ic_account_circle_light.png index 4616804..247a34d 100644 Binary files a/android/src/main/res/drawable-xxhdpi/ic_account_circle_light.png and b/android/src/main/res/drawable-xxhdpi/ic_account_circle_light.png differ diff --git a/android/src/main/res/drawable-xxhdpi/ic_action_send.png b/android/src/main/res/drawable-xxhdpi/ic_action_send.png index 72643a9..2c7a802 100644 Binary files a/android/src/main/res/drawable-xxhdpi/ic_action_send.png and b/android/src/main/res/drawable-xxhdpi/ic_action_send.png differ diff --git a/android/src/main/res/drawable-xxhdpi/ic_action_send_disabled.png b/android/src/main/res/drawable-xxhdpi/ic_action_send_disabled.png index 13fc675..95c5e57 100644 Binary files a/android/src/main/res/drawable-xxhdpi/ic_action_send_disabled.png and b/android/src/main/res/drawable-xxhdpi/ic_action_send_disabled.png differ diff --git a/android/src/main/res/drawable-xxhdpi/ic_action_send_light.png b/android/src/main/res/drawable-xxhdpi/ic_action_send_light.png index 634385c..cbb64e0 100644 Binary files a/android/src/main/res/drawable-xxhdpi/ic_action_send_light.png and b/android/src/main/res/drawable-xxhdpi/ic_action_send_light.png differ diff --git a/android/src/main/res/drawable-xxhdpi/ic_attach_file.png b/android/src/main/res/drawable-xxhdpi/ic_attach_file.png new file mode 100644 index 0000000..e9eb375 Binary files /dev/null and b/android/src/main/res/drawable-xxhdpi/ic_attach_file.png differ diff --git a/android/src/main/res/drawable-xxhdpi/ic_feed_icon.png b/android/src/main/res/drawable-xxhdpi/ic_feed_icon.png index 108e244..143c4ed 100644 Binary files a/android/src/main/res/drawable-xxhdpi/ic_feed_icon.png and b/android/src/main/res/drawable-xxhdpi/ic_feed_icon.png differ diff --git a/android/src/main/res/drawable-xxhdpi/ic_insert_emoticon.png b/android/src/main/res/drawable-xxhdpi/ic_insert_emoticon.png index a00dc90..cce3d57 100644 Binary files a/android/src/main/res/drawable-xxhdpi/ic_insert_emoticon.png and b/android/src/main/res/drawable-xxhdpi/ic_insert_emoticon.png differ diff --git a/android/src/main/res/drawable-xxhdpi/ic_lock.png b/android/src/main/res/drawable-xxhdpi/ic_lock.png index b8753a7..aac70d9 100644 Binary files a/android/src/main/res/drawable-xxhdpi/ic_lock.png and b/android/src/main/res/drawable-xxhdpi/ic_lock.png differ diff --git a/android/src/main/res/drawable-xxhdpi/ic_mult_quote_dark.png b/android/src/main/res/drawable-xxhdpi/ic_mult_quote_dark.png index 22d3cde..4466d20 100644 Binary files a/android/src/main/res/drawable-xxhdpi/ic_mult_quote_dark.png and b/android/src/main/res/drawable-xxhdpi/ic_mult_quote_dark.png differ diff --git a/android/src/main/res/drawable-xxhdpi/ic_nav_account.png b/android/src/main/res/drawable-xxhdpi/ic_nav_account.png new file mode 100644 index 0000000..61c0685 Binary files /dev/null and b/android/src/main/res/drawable-xxhdpi/ic_nav_account.png differ diff --git a/android/src/main/res/drawable-xxhdpi/ic_nav_favorite.png b/android/src/main/res/drawable-xxhdpi/ic_nav_favorite.png new file mode 100644 index 0000000..11f108d Binary files /dev/null and b/android/src/main/res/drawable-xxhdpi/ic_nav_favorite.png differ diff --git a/android/src/main/res/drawable-xxhdpi/ic_nav_forums.png b/android/src/main/res/drawable-xxhdpi/ic_nav_forums.png new file mode 100644 index 0000000..4466d20 Binary files /dev/null and b/android/src/main/res/drawable-xxhdpi/ic_nav_forums.png differ diff --git a/android/src/main/res/drawable-xxhdpi/ic_nav_message.png b/android/src/main/res/drawable-xxhdpi/ic_nav_message.png new file mode 100644 index 0000000..9242f20 Binary files /dev/null and b/android/src/main/res/drawable-xxhdpi/ic_nav_message.png differ diff --git a/android/src/main/res/drawable-xxhdpi/ic_nav_participated.png b/android/src/main/res/drawable-xxhdpi/ic_nav_participated.png new file mode 100644 index 0000000..123bcfb Binary files /dev/null and b/android/src/main/res/drawable-xxhdpi/ic_nav_participated.png differ diff --git a/android/src/main/res/drawable-xxhdpi/ic_nav_phone.png b/android/src/main/res/drawable-xxhdpi/ic_nav_phone.png new file mode 100644 index 0000000..b7a74b0 Binary files /dev/null and b/android/src/main/res/drawable-xxhdpi/ic_nav_phone.png differ diff --git a/android/src/main/res/drawable-xxhdpi/ic_nav_reply.png b/android/src/main/res/drawable-xxhdpi/ic_nav_reply.png new file mode 100644 index 0000000..5316f27 Binary files /dev/null and b/android/src/main/res/drawable-xxhdpi/ic_nav_reply.png differ diff --git a/android/src/main/res/drawable-xxhdpi/ic_nav_search.png b/android/src/main/res/drawable-xxhdpi/ic_nav_search.png new file mode 100644 index 0000000..9424ae9 Binary files /dev/null and b/android/src/main/res/drawable-xxhdpi/ic_nav_search.png differ diff --git a/android/src/main/res/drawable-xxhdpi/ic_no_items.png b/android/src/main/res/drawable-xxhdpi/ic_no_items.png new file mode 100644 index 0000000..143c4ed Binary files /dev/null and b/android/src/main/res/drawable-xxhdpi/ic_no_items.png differ diff --git a/android/src/main/res/drawable-xxhdpi/ic_pin.png b/android/src/main/res/drawable-xxhdpi/ic_pin.png index 5f28bb7..56917b9 100644 Binary files a/android/src/main/res/drawable-xxhdpi/ic_pin.png and b/android/src/main/res/drawable-xxhdpi/ic_pin.png differ diff --git a/android/src/main/res/drawable-xxhdpi/ic_quote_dark.png b/android/src/main/res/drawable-xxhdpi/ic_quote_dark.png index ba8ea1e..9242f20 100644 Binary files a/android/src/main/res/drawable-xxhdpi/ic_quote_dark.png and b/android/src/main/res/drawable-xxhdpi/ic_quote_dark.png differ diff --git a/android/src/main/res/drawable-xxhdpi/ic_search_dark.png b/android/src/main/res/drawable-xxhdpi/ic_search_dark.png index ec5a154..9424ae9 100644 Binary files a/android/src/main/res/drawable-xxhdpi/ic_search_dark.png and b/android/src/main/res/drawable-xxhdpi/ic_search_dark.png differ diff --git a/android/src/main/res/drawable-xxhdpi/ic_search_light.png b/android/src/main/res/drawable-xxhdpi/ic_search_light.png index 4608638..33f4745 100644 Binary files a/android/src/main/res/drawable-xxhdpi/ic_search_light.png and b/android/src/main/res/drawable-xxhdpi/ic_search_light.png differ diff --git a/android/src/main/res/drawable-xxhdpi/ic_share.png b/android/src/main/res/drawable-xxhdpi/ic_share.png new file mode 100644 index 0000000..9963c6a Binary files /dev/null and b/android/src/main/res/drawable-xxhdpi/ic_share.png differ diff --git a/android/src/main/res/drawable-xxhdpi/ic_star_light.png b/android/src/main/res/drawable-xxhdpi/ic_star_light.png index ebee124..33a28c0 100644 Binary files a/android/src/main/res/drawable-xxhdpi/ic_star_light.png and b/android/src/main/res/drawable-xxhdpi/ic_star_light.png differ diff --git a/android/src/main/res/drawable-xxhdpi/ic_star_light_outline.png b/android/src/main/res/drawable-xxhdpi/ic_star_light_outline.png deleted file mode 100644 index 4381401..0000000 Binary files a/android/src/main/res/drawable-xxhdpi/ic_star_light_outline.png and /dev/null differ diff --git a/android/src/main/res/drawable-xxhdpi/ic_star_outline.png b/android/src/main/res/drawable-xxhdpi/ic_star_outline.png new file mode 100644 index 0000000..b51f478 Binary files /dev/null and b/android/src/main/res/drawable-xxhdpi/ic_star_outline.png differ diff --git a/android/src/main/res/drawable-xxhdpi/ic_star_outline_selected.png b/android/src/main/res/drawable-xxhdpi/ic_star_outline_selected.png new file mode 100644 index 0000000..4409173 Binary files /dev/null and b/android/src/main/res/drawable-xxhdpi/ic_star_outline_selected.png differ diff --git a/android/src/main/res/drawable-xxhdpi/ic_thumb_up_dark.png b/android/src/main/res/drawable-xxhdpi/ic_thumb_up_dark.png index 5a0d8df..5cd2264 100644 Binary files a/android/src/main/res/drawable-xxhdpi/ic_thumb_up_dark.png and b/android/src/main/res/drawable-xxhdpi/ic_thumb_up_dark.png differ diff --git a/android/src/main/res/drawable-xxhdpi/ic_thumb_up_dark_outline.png b/android/src/main/res/drawable-xxhdpi/ic_thumb_up_dark_outline.png index 755f40e..f134936 100644 Binary files a/android/src/main/res/drawable-xxhdpi/ic_thumb_up_dark_outline.png and b/android/src/main/res/drawable-xxhdpi/ic_thumb_up_dark_outline.png differ diff --git a/android/src/main/res/drawable-xxhdpi/ic_thumb_up_outline.png b/android/src/main/res/drawable-xxhdpi/ic_thumb_up_outline.png index 755f40e..f134936 100644 Binary files a/android/src/main/res/drawable-xxhdpi/ic_thumb_up_outline.png and b/android/src/main/res/drawable-xxhdpi/ic_thumb_up_outline.png differ diff --git a/android/src/main/res/drawable-xxhdpi/profile_background.png b/android/src/main/res/drawable-xxhdpi/profile_background.png new file mode 100644 index 0000000..10b1e0b Binary files /dev/null and b/android/src/main/res/drawable-xxhdpi/profile_background.png differ diff --git a/android/src/main/res/drawable-xxhdpi/reply.png b/android/src/main/res/drawable-xxhdpi/reply.png new file mode 100644 index 0000000..5316f27 Binary files /dev/null and b/android/src/main/res/drawable-xxhdpi/reply.png differ diff --git a/android/src/main/res/drawable-xxhdpi/skip_next.png b/android/src/main/res/drawable-xxhdpi/skip_next.png index c77b166..1b77ae1 100644 Binary files a/android/src/main/res/drawable-xxhdpi/skip_next.png and b/android/src/main/res/drawable-xxhdpi/skip_next.png differ diff --git a/android/src/main/res/drawable-xxhdpi/skip_previous.png b/android/src/main/res/drawable-xxhdpi/skip_previous.png index 99078f0..a2d1155 100644 Binary files a/android/src/main/res/drawable-xxhdpi/skip_previous.png and b/android/src/main/res/drawable-xxhdpi/skip_previous.png differ diff --git a/android/src/main/res/drawable-xxxhdpi/account_circle.png b/android/src/main/res/drawable-xxxhdpi/account_circle.png new file mode 100644 index 0000000..fabd949 Binary files /dev/null and b/android/src/main/res/drawable-xxxhdpi/account_circle.png differ diff --git a/android/src/main/res/drawable-xxxhdpi/ic_account_circle_light.png b/android/src/main/res/drawable-xxxhdpi/ic_account_circle_light.png new file mode 100644 index 0000000..ea89a46 Binary files /dev/null and b/android/src/main/res/drawable-xxxhdpi/ic_account_circle_light.png differ diff --git a/android/src/main/res/drawable-xxxhdpi/ic_attach_file.png b/android/src/main/res/drawable-xxxhdpi/ic_attach_file.png new file mode 100644 index 0000000..8dea9c0 Binary files /dev/null and b/android/src/main/res/drawable-xxxhdpi/ic_attach_file.png differ diff --git a/android/src/main/res/drawable-xxxhdpi/ic_image_placeholder.9.png b/android/src/main/res/drawable-xxxhdpi/ic_image_placeholder.9.png new file mode 100644 index 0000000..f52ad45 Binary files /dev/null and b/android/src/main/res/drawable-xxxhdpi/ic_image_placeholder.9.png differ diff --git a/android/src/main/res/drawable-xxxhdpi/ic_insert_emoticon.png b/android/src/main/res/drawable-xxxhdpi/ic_insert_emoticon.png deleted file mode 100644 index 808782f..0000000 Binary files a/android/src/main/res/drawable-xxxhdpi/ic_insert_emoticon.png and /dev/null differ diff --git a/android/src/main/res/drawable-xxxhdpi/ic_no_items.png b/android/src/main/res/drawable-xxxhdpi/ic_no_items.png new file mode 100644 index 0000000..66133d2 Binary files /dev/null and b/android/src/main/res/drawable-xxxhdpi/ic_no_items.png differ diff --git a/android/src/main/res/drawable-xxxhdpi/ic_search_light.png b/android/src/main/res/drawable-xxxhdpi/ic_search_light.png new file mode 100644 index 0000000..7d4150a Binary files /dev/null and b/android/src/main/res/drawable-xxxhdpi/ic_search_light.png differ diff --git a/android/src/main/res/drawable-xxxhdpi/ic_share.png b/android/src/main/res/drawable-xxxhdpi/ic_share.png new file mode 100644 index 0000000..bb521c1 Binary files /dev/null and b/android/src/main/res/drawable-xxxhdpi/ic_share.png differ diff --git a/android/src/main/res/drawable-xxxhdpi/ic_star_light.png b/android/src/main/res/drawable-xxxhdpi/ic_star_light.png new file mode 100644 index 0000000..1956614 Binary files /dev/null and b/android/src/main/res/drawable-xxxhdpi/ic_star_light.png differ diff --git a/android/src/main/res/drawable-xxxhdpi/ic_star_outline.png b/android/src/main/res/drawable-xxxhdpi/ic_star_outline.png new file mode 100644 index 0000000..b5afcbb Binary files /dev/null and b/android/src/main/res/drawable-xxxhdpi/ic_star_outline.png differ diff --git a/android/src/main/res/drawable-xxxhdpi/ic_star_outline_selected.png b/android/src/main/res/drawable-xxxhdpi/ic_star_outline_selected.png new file mode 100644 index 0000000..f01622d Binary files /dev/null and b/android/src/main/res/drawable-xxxhdpi/ic_star_outline_selected.png differ diff --git a/android/src/main/res/drawable/activatable_selectable_selector.xml b/android/src/main/res/drawable/activatable_selectable_selector.xml index 91d68b8..7830b96 100644 --- a/android/src/main/res/drawable/activatable_selectable_selector.xml +++ b/android/src/main/res/drawable/activatable_selectable_selector.xml @@ -22,5 +22,5 @@ - + \ No newline at end of file diff --git a/android/src/main/res/drawable/navigation_header_scrim.xml b/android/src/main/res/drawable/navigation_header_scrim.xml new file mode 100644 index 0000000..0fdb60a --- /dev/null +++ b/android/src/main/res/drawable/navigation_header_scrim.xml @@ -0,0 +1,7 @@ + + + + \ No newline at end of file diff --git a/android/src/main/res/drawable/post_item_background.xml b/android/src/main/res/drawable/post_item_background.xml new file mode 100644 index 0000000..9d50f39 --- /dev/null +++ b/android/src/main/res/drawable/post_item_background.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/android/src/main/res/drawable/post_item_selected.xml b/android/src/main/res/drawable/post_item_selected.xml new file mode 100644 index 0000000..249f09e --- /dev/null +++ b/android/src/main/res/drawable/post_item_selected.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/android/src/main/res/drawable/post_item_selector.xml b/android/src/main/res/drawable/post_item_selector.xml new file mode 100644 index 0000000..f086373 --- /dev/null +++ b/android/src/main/res/drawable/post_item_selector.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/android/src/main/res/layout/attachment_file_view.xml b/android/src/main/res/layout/attachment_file_view.xml index f82061c..6af9c68 100644 --- a/android/src/main/res/layout/attachment_file_view.xml +++ b/android/src/main/res/layout/attachment_file_view.xml @@ -1,34 +1,58 @@ - - - - - - -