diff --git a/twidere/src/main/java/org/mariotaku/twidere/adapter/StaggeredGridParcelableStatusesAdapter.java b/twidere/src/main/java/org/mariotaku/twidere/adapter/StaggeredGridParcelableStatusesAdapter.java index f274e58a0..2eb590a65 100644 --- a/twidere/src/main/java/org/mariotaku/twidere/adapter/StaggeredGridParcelableStatusesAdapter.java +++ b/twidere/src/main/java/org/mariotaku/twidere/adapter/StaggeredGridParcelableStatusesAdapter.java @@ -129,7 +129,7 @@ public class StaggeredGridParcelableStatusesAdapter extends ParcelableStatusesAd public void onClick(View v) { if (listener == null) return; switch (v.getId()) { - case R.id.item_content: { + case R.id.itemContent: { listener.onStatusClick(this, getLayoutPosition()); break; } @@ -147,7 +147,7 @@ public class StaggeredGridParcelableStatusesAdapter extends ParcelableStatusesAd @Override public void setStatusClickListener(StatusClickListener listener) { this.listener = listener; - itemView.findViewById(R.id.item_content).setOnClickListener(this); + itemView.findViewById(R.id.itemContent).setOnClickListener(this); } @Override diff --git a/twidere/src/main/java/org/mariotaku/twidere/fragment/RetweetQuoteDialogFragment.java b/twidere/src/main/java/org/mariotaku/twidere/fragment/RetweetQuoteDialogFragment.java index e4cd64499..244de67e9 100644 --- a/twidere/src/main/java/org/mariotaku/twidere/fragment/RetweetQuoteDialogFragment.java +++ b/twidere/src/main/java/org/mariotaku/twidere/fragment/RetweetQuoteDialogFragment.java @@ -104,7 +104,7 @@ public class RetweetQuoteDialogFragment extends BaseDialogFragment { final AlertDialog dialog = (AlertDialog) dialogInterface; - final View itemContent = dialog.findViewById(R.id.item_content); + final View itemContent = dialog.findViewById(R.id.itemContent); final StatusTextCountView textCountView = (StatusTextCountView) dialog.findViewById(R.id.comment_text_count); final View itemMenu = dialog.findViewById(R.id.itemMenu); final View actionButtons = dialog.findViewById(R.id.actionButtons); diff --git a/twidere/src/main/java/org/mariotaku/twidere/fragment/UserListFragment.kt b/twidere/src/main/java/org/mariotaku/twidere/fragment/UserListFragment.kt index 682a4f37d..0ceebaae0 100644 --- a/twidere/src/main/java/org/mariotaku/twidere/fragment/UserListFragment.kt +++ b/twidere/src/main/java/org/mariotaku/twidere/fragment/UserListFragment.kt @@ -399,7 +399,7 @@ class UserListFragment : AbsToolbarTabPagesFragment(), OnClickListener, LoaderCa private val extras: Bundle?, private val accountKey: UserKey, private val listId: String?, - private val listName: String, + private val listName: String?, private val userKey: UserKey?, private val screenName: String? ) : AsyncTaskLoader>(context) { @@ -413,14 +413,20 @@ class UserListFragment : AbsToolbarTabPagesFragment(), OnClickListener, LoaderCa true) ?: return SingleResponse.getInstance() try { val list: UserList - if (listId != null) { - list = twitter.showUserList(listId) - } else if (userKey != null) { - list = twitter.showUserList(listName, userKey.id) - } else if (screenName != null) { - list = twitter.showUserListByScrenName(listName, screenName) - } else - return SingleResponse.getInstance() + when { + listId != null -> { + list = twitter.showUserList(listId) + } + listName != null && userKey != null -> { + list = twitter.showUserList(listName, userKey.id) + } + listName != null && screenName != null -> { + list = twitter.showUserListByScrenName(listName, screenName) + } + else -> { + return SingleResponse.getInstance() + } + } return SingleResponse.getInstance(ParcelableUserListUtils.from(list, accountKey)) } catch (e: MicroBlogException) { return SingleResponse.getInstance(e) diff --git a/twidere/src/main/java/org/mariotaku/twidere/view/holder/ActivityTitleSummaryViewHolder.kt b/twidere/src/main/java/org/mariotaku/twidere/view/holder/ActivityTitleSummaryViewHolder.kt index 2f17d2a27..3eeec3511 100644 --- a/twidere/src/main/java/org/mariotaku/twidere/view/holder/ActivityTitleSummaryViewHolder.kt +++ b/twidere/src/main/java/org/mariotaku/twidere/view/holder/ActivityTitleSummaryViewHolder.kt @@ -57,7 +57,7 @@ class ActivityTitleSummaryViewHolder(private val adapter: ParcelableActivitiesAd init { - itemContent = itemView.findViewById(R.id.item_content) as IColorLabelView + itemContent = itemView.findViewById(R.id.itemContent) as IColorLabelView activityTypeView = itemView.findViewById(R.id.activity_type) as IconActionView titleView = itemView.findViewById(R.id.title) as TextView summaryView = itemView.findViewById(R.id.summary) as TextView @@ -168,7 +168,7 @@ class ActivityTitleSummaryViewHolder(private val adapter: ParcelableActivitiesAd if (mActivityEventListener == null) return val position = layoutPosition when (v.id) { - R.id.item_content -> { + R.id.itemContent -> { mActivityEventListener!!.onActivityClick(this, position) } } diff --git a/twidere/src/main/java/org/mariotaku/twidere/view/holder/GroupViewHolder.java b/twidere/src/main/java/org/mariotaku/twidere/view/holder/GroupViewHolder.java index 4ccb4dc59..840396b27 100644 --- a/twidere/src/main/java/org/mariotaku/twidere/view/holder/GroupViewHolder.java +++ b/twidere/src/main/java/org/mariotaku/twidere/view/holder/GroupViewHolder.java @@ -57,7 +57,7 @@ public class GroupViewHolder extends ViewHolder implements View.OnClickListener, public GroupViewHolder(IGroupsAdapter adapter, View itemView) { super(itemView); - itemContent = (IColorLabelView) itemView.findViewById(R.id.item_content); + itemContent = (IColorLabelView) itemView.findViewById(R.id.itemContent); this.adapter = adapter; profileImageView = (ImageView) itemView.findViewById(R.id.profileImage); nameView = (NameView) itemView.findViewById(R.id.name); @@ -105,7 +105,7 @@ public class GroupViewHolder extends ViewHolder implements View.OnClickListener, public void onClick(View v) { if (groupClickListener == null) return; switch (v.getId()) { - case R.id.item_content: { + case R.id.itemContent: { groupClickListener.onGroupClick(this, getLayoutPosition()); break; } @@ -116,7 +116,7 @@ public class GroupViewHolder extends ViewHolder implements View.OnClickListener, public boolean onLongClick(View v) { if (groupClickListener == null) return false; switch (v.getId()) { - case R.id.item_content: { + case R.id.itemContent: { return groupClickListener.onGroupLongClick(this, getLayoutPosition()); } } diff --git a/twidere/src/main/java/org/mariotaku/twidere/view/holder/StatusViewHolder.kt b/twidere/src/main/java/org/mariotaku/twidere/view/holder/StatusViewHolder.kt index 2c68a9fd3..fe09f78b5 100644 --- a/twidere/src/main/java/org/mariotaku/twidere/view/holder/StatusViewHolder.kt +++ b/twidere/src/main/java/org/mariotaku/twidere/view/holder/StatusViewHolder.kt @@ -568,7 +568,7 @@ class StatusViewHolder(private val adapter: IStatusesAdapter<*>, itemView: View) val listener = holder.statusClickListener ?: return false val position = holder.layoutPosition when (v.id) { - R.id.item_content -> { + R.id.itemContent -> { if (!holder.isCardActionsShown) { holder.showCardActions() return true diff --git a/twidere/src/main/java/org/mariotaku/twidere/view/holder/UserViewHolder.java b/twidere/src/main/java/org/mariotaku/twidere/view/holder/UserViewHolder.java index 5cbc06cfd..04d27ca83 100644 --- a/twidere/src/main/java/org/mariotaku/twidere/view/holder/UserViewHolder.java +++ b/twidere/src/main/java/org/mariotaku/twidere/view/holder/UserViewHolder.java @@ -71,7 +71,7 @@ public class UserViewHolder extends ViewHolder implements OnClickListener, OnLon public UserViewHolder(final IUsersAdapter adapter, final View itemView) { super(itemView); this.adapter = adapter; - itemContent = (IColorLabelView) itemView.findViewById(R.id.item_content); + itemContent = (IColorLabelView) itemView.findViewById(R.id.itemContent); profileImageView = (ImageView) itemView.findViewById(R.id.profileImage); profileTypeView = (ImageView) itemView.findViewById(R.id.profileType); nameView = (NameView) itemView.findViewById(R.id.name); @@ -173,7 +173,7 @@ public class UserViewHolder extends ViewHolder implements OnClickListener, OnLon @Override public void onClick(View v) { switch (v.getId()) { - case R.id.item_content: { + case R.id.itemContent: { if (userClickListener == null) return; userClickListener.onUserClick(this, getLayoutPosition()); break; @@ -200,7 +200,7 @@ public class UserViewHolder extends ViewHolder implements OnClickListener, OnLon public boolean onLongClick(View v) { if (userClickListener == null) return false; switch (v.getId()) { - case R.id.item_content: { + case R.id.itemContent: { return userClickListener.onUserLongClick(this, getLayoutPosition()); } } diff --git a/twidere/src/main/res/layout/adapter_item_media_status.xml b/twidere/src/main/res/layout/adapter_item_media_status.xml index 5db8f6915..7082c65d1 100644 --- a/twidere/src/main/res/layout/adapter_item_media_status.xml +++ b/twidere/src/main/res/layout/adapter_item_media_status.xml @@ -18,7 +18,7 @@ --> - - - - \ No newline at end of file diff --git a/twidere/src/main/res/layout/card_item_activity_summary_common.xml b/twidere/src/main/res/layout/card_item_activity_summary_common.xml deleted file mode 100644 index 25771de71..000000000 --- a/twidere/src/main/res/layout/card_item_activity_summary_common.xml +++ /dev/null @@ -1,157 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/twidere/src/main/res/layout/card_item_activity_summary_compact.xml b/twidere/src/main/res/layout/card_item_activity_summary_compact.xml index 4f1ca8380..c96c00616 100644 --- a/twidere/src/main/res/layout/card_item_activity_summary_compact.xml +++ b/twidere/src/main/res/layout/card_item_activity_summary_compact.xml @@ -1,14 +1,146 @@ - - - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/twidere/src/main/res/layout/card_item_group_compact.xml b/twidere/src/main/res/layout/card_item_group_compact.xml index 5873b290c..905e394ff 100644 --- a/twidere/src/main/res/layout/card_item_group_compact.xml +++ b/twidere/src/main/res/layout/card_item_group_compact.xml @@ -18,7 +18,7 @@ -->