-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20798 from wordpress-mobile/issue/comment-details…
…-content The redesign of comment details content
- Loading branch information
Showing
43 changed files
with
748 additions
and
1,367 deletions.
There are no files selected for viewing
660 changes: 52 additions & 608 deletions
660
WordPress/src/main/java/org/wordpress/android/ui/comments/CommentDetailFragment.java
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
...ress/src/main/java/org/wordpress/android/ui/comments/unified/CommentActionPopupHandler.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
@file:Suppress("DEPRECATION") | ||
|
||
package org.wordpress.android.ui.comments.unified | ||
|
||
import android.view.LayoutInflater | ||
import android.view.View | ||
import android.widget.PopupWindow | ||
import org.wordpress.android.R | ||
import org.wordpress.android.databinding.CommentActionsBinding | ||
import org.wordpress.android.ui.comments.CommentDetailFragment | ||
import org.wordpress.android.util.ToastUtils | ||
|
||
object CommentActionPopupHandler { | ||
@JvmStatic | ||
fun show(anchorView: View, listener: CommentDetailFragment.OnActionClickListener?) { | ||
val popupWindow = PopupWindow(anchorView.context, null, R.style.WordPress) | ||
popupWindow.isOutsideTouchable = true | ||
popupWindow.elevation = anchorView.context.resources.getDimension(R.dimen.popup_over_toolbar_elevation) | ||
popupWindow.contentView = CommentActionsBinding | ||
.inflate(LayoutInflater.from(anchorView.context)) | ||
.apply { | ||
textUserInfo.setOnClickListener { | ||
listener?.onUserInfoClicked() | ||
popupWindow.dismiss() | ||
} | ||
textShare.setOnClickListener { | ||
ToastUtils.showToast(it.context, "not yet implemented") | ||
popupWindow.dismiss() | ||
} | ||
textEditComment.setOnClickListener { | ||
listener?.onEditCommentClicked() | ||
popupWindow.dismiss() | ||
} | ||
textChangeStatus.setOnClickListener { | ||
ToastUtils.showToast(it.context, "not yet implemented") | ||
popupWindow.dismiss() | ||
} | ||
}.root | ||
popupWindow.showAsDropDown(anchorView) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.