13
13
import com .nostra13 .universalimageloader .core .ImageLoader ;
14
14
import com .rae .cnblogs .R ;
15
15
import com .rae .cnblogs .RaeImageLoader ;
16
- import com .rae .cnblogs .dialog .BlogContentDialog ;
16
+ import com .rae .cnblogs .dialog .BlogCommentDialog ;
17
+ import com .rae .cnblogs .dialog .BlogShareDialog ;
17
18
import com .rae .cnblogs .fragment .BlogContentFragment ;
18
19
import com .rae .cnblogs .sdk .bean .Blog ;
19
20
@@ -42,7 +43,8 @@ public class BlogContentActivity extends BaseActivity {
42
43
@ BindView (R .id .tv_like_badge )
43
44
TextView mLikeBadgeView ;
44
45
45
- private BlogContentDialog mContentDialog ;
46
+ private BlogShareDialog mContentDialog ;
47
+ private BlogCommentDialog mCommentDialog ;
46
48
private BlogContentFragment mContentFragment ;
47
49
48
50
@ Override
@@ -54,7 +56,7 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
54
56
showHomeAsUp (mToolbar );
55
57
56
58
Blog blog = getIntent ().getParcelableExtra ("blog" );
57
- mContentDialog = new BlogContentDialog (this , blog ) {
59
+ mContentDialog = new BlogShareDialog (this , blog ) {
58
60
@ Override
59
61
protected void onViewSourceClick () {
60
62
if (mContentFragment .isHidden () || mContentFragment .isDetached ()) return ;
@@ -70,8 +72,10 @@ protected String getUrl() {
70
72
}
71
73
};
72
74
75
+ mCommentDialog = BlogCommentDialog .newInstance (blog );
76
+
73
77
if (blog != null ) {
74
- ImageLoader .getInstance ().displayImage (blog .getAvatar (), mAvatarView , RaeImageLoader .headerOptinos ());
78
+ ImageLoader .getInstance ().displayImage (blog .getAvatar (), mAvatarView , RaeImageLoader .headerOption ());
75
79
mAuthorView .setText (blog .getAuthor ());
76
80
if (!TextUtils .equals (blog .getComment (), "0" )) {
77
81
mCommentBadgeView .setText (blog .getComment ());
@@ -96,6 +100,11 @@ public void onActionMenuMoreClick() {
96
100
mContentDialog .show ();
97
101
}
98
102
103
+ @ OnClick (R .id .layout_content_comment )
104
+ public void onCommentClick () {
105
+ mCommentDialog .show (getSupportFragmentManager ());
106
+ }
107
+
99
108
@ Override
100
109
public boolean onKeyDown (int keyCode , KeyEvent event ) {
101
110
if (mContentFragment != null && mContentFragment .isVisible () && mContentFragment .onKeyDown (keyCode , event )) {
0 commit comments