removed scroll to top animation

use retweet dialog for status screen
This commit is contained in:
Mariotaku Lee 2015-04-10 14:55:27 +08:00
parent 947d250dd9
commit cf03196923
4 changed files with 15 additions and 19 deletions

View File

@ -432,7 +432,8 @@ public abstract class AbsStatusesFragment<Data> extends BaseSupportFragment impl
@Override
public boolean scrollToStart() {
saveReadPosition();
mRecyclerView.smoothScrollToPosition(0);
mLayoutManager.scrollToPositionWithOffset(0, 0);
setControlVisible(true);
return true;
}

View File

@ -645,6 +645,8 @@ public class StatusFragment extends BaseSupportFragment implements LoaderCallbac
quoteTextView.setVisibility(View.VISIBLE);
quoteIndicator.setVisibility(View.VISIBLE);
quoteIndicator.setColor(UserColorNameUtils.getUserColor(context, status.user_id));
profileContainer.drawStart(UserColorNameUtils.getUserColor(context, status.quoted_by_user_id));
typeIconRes = getUserTypeIconRes(status.quoted_by_user_is_verified, status.quoted_by_user_is_protected);
@ -812,6 +814,10 @@ public class StatusFragment extends BaseSupportFragment implements LoaderCallbac
final AsyncTwitterWrapper twitter = fragment.getTwitterWrapper();
final FragmentActivity activity = fragment.getActivity();
final FragmentManager fm = fragment.getFragmentManager();
if (item.getItemId() == MENU_RETWEET) {
RetweetQuoteDialogFragment.show(fm, status);
return true;
}
return Utils.handleMenuItemClick(activity, fragment, fm, twitter, status, item);
}

View File

@ -3580,11 +3580,11 @@ public final class Utils implements Constants, TwitterConstants {
ActionIconDrawable.setMenuHighlight(retweet, new TwidereMenuInfo(isMyRetweet, retweetHighlight));
retweet.setTitle(isMyRetweet ? R.string.cancel_retweet : R.string.retweet);
}
final MenuItem retweetSubItem = menu.findItem(R.id.retweet_submenu);
if (retweetSubItem != null) {
ActionIconDrawable.setMenuHighlight(retweetSubItem, new TwidereMenuInfo(isMyRetweet,
retweetHighlight));
}
// final MenuItem retweetSubItem = menu.findItem(R.id.retweet_submenu);
// if (retweetSubItem != null) {
// ActionIconDrawable.setMenuHighlight(retweetSubItem, new TwidereMenuInfo(isMyRetweet,
// retweetHighlight));
// }
final MenuItem favorite = menu.findItem(MENU_FAVORITE);
if (favorite != null) {
ActionIconDrawable.setMenuHighlight(favorite, new TwidereMenuInfo(status.is_favorite, favoriteHighlight));

View File

@ -8,21 +8,10 @@
android:title="@string/reply"
app:showAsAction="always"/>
<item
android:id="@+id/retweet_submenu"
android:id="@id/retweet"
android:icon="@drawable/ic_action_retweet"
android:title="@string/retweet"
app:showAsAction="always">
<menu>
<item
android:id="@id/retweet"
android:icon="@drawable/ic_action_retweet"
android:title="@string/retweet"/>
<item
android:id="@id/quote"
android:icon="@drawable/ic_action_quote"
android:title="@string/quote"/>
</menu>
</item>
app:showAsAction="always"/>
<item
android:id="@id/favorite"
android:icon="@drawable/ic_action_star"