import android.support.v4.view.ViewPager;
|
|
14
|
15
|
import android.text.TextUtils;
|
|
|
@ -133,6 +134,9 @@ public class PicturePreviewActivity extends PictureBaseActivity implements View.
|
|
133
|
134
|
imgLeftBack.setOnClickListener(new View.OnClickListener() {
|
|
134
|
135
|
@Override
|
|
135
|
136
|
public void onClick(View v) {
|
|
|
137
|
Intent intent = new Intent("publish-video-topic-activity");
|
|
|
138
|
intent.putExtra("message", "cancel_choosed_video");
|
|
|
139
|
LocalBroadcastManager.getInstance(getApplicationContext()).sendBroadcast(intent);
|
|
136
|
140
|
finish();
|
|
137
|
141
|
overridePendingTransition(0, R.anim.a3);
|
|
138
|
142
|
}
|
|
|
@ -661,6 +665,10 @@ public class PicturePreviewActivity extends PictureBaseActivity implements View.
|
|
661
|
665
|
imageView.setOnViewTapListener(new PhotoViewAttacher.OnViewTapListener() {
|
|
662
|
666
|
@Override
|
|
663
|
667
|
public void onViewTap(View view, float x, float y) {
|
|
|
668
|
Intent intent = new Intent("publish-video-topic-activity");
|
|
|
669
|
intent.putExtra("message", "cancel_choosed_video");
|
|
|
670
|
LocalBroadcastManager.getInstance(getApplicationContext()).sendBroadcast(intent);
|
|
|
671
|
|
|
664
|
672
|
finish();
|
|
665
|
673
|
overridePendingTransition(0, R.anim.a3);
|
|
666
|
674
|
}
|
|
|
@ -668,6 +676,9 @@ public class PicturePreviewActivity extends PictureBaseActivity implements View.
|
|
668
|
676
|
iv_play.setOnClickListener(new View.OnClickListener() {
|
|
669
|
677
|
@Override
|
|
670
|
678
|
public void onClick(View v) {
|
|
|
679
|
Intent intent = new Intent("publish-video-topic-activity");
|
|
|
680
|
intent.putExtra("message", "preview_video");
|
|
|
681
|
LocalBroadcastManager.getInstance(getApplicationContext()).sendBroadcast(intent);
|
|
671
|
682
|
Bundle bundle = new Bundle();
|
|
672
|
683
|
bundle.putString("video_path", path);
|
|
673
|
684
|
startActivity(PictureVideoPlayActivity.class, bundle);
|
|
|
@ -841,6 +852,10 @@ public class PicturePreviewActivity extends PictureBaseActivity implements View.
|
|
841
|
852
|
super.onBackPressed();
|
|
842
|
853
|
finish();
|
|
843
|
854
|
overridePendingTransition(0, R.anim.a3);
|
|
|
855
|
|
|
|
856
|
Intent intent = new Intent("publish-video-topic-activity");
|
|
|
857
|
intent.putExtra("message", "cancel_choosed_video");
|
|
|
858
|
LocalBroadcastManager.getInstance(getApplicationContext()).sendBroadcast(intent);
|
|
844
|
859
|
}
|
|
845
|
860
|
|
|
846
|
861
|
@Override
|
|
|
@ -2,9 +2,11 @@ package com.luck.picture.lib;
|
|
2
|
2
|
|
|
3
|
3
|
import android.content.Context;
|
|
4
|
4
|
import android.content.ContextWrapper;
|
|
|
5
|
import android.content.Intent;
|
|
5
|
6
|
import android.graphics.Color;
|
|
6
|
7
|
import android.media.MediaPlayer;
|
|
7
|
8
|
import android.os.Bundle;
|
|
|
9
|
import android.support.v4.content.LocalBroadcastManager;
|
|
8
|
10
|
import android.view.View;
|
|
9
|
11
|
import android.view.WindowManager;
|
|
10
|
12
|
import android.widget.ImageView;
|
|
|
@ -84,6 +86,9 @@ public class PictureVideoPlayActivity extends PictureBaseActivity implements Med
|
|
84
|
86
|
public void onClick(View v) {
|
|
85
|
87
|
int id = v.getId();
|
|
86
|
88
|
if (id == R.id.picture_left_back) {
|
|
|
89
|
Intent intent = new Intent("publish-video-topic-activity");
|
|
|
90
|
intent.putExtra("message", "finish_preview_video");
|
|
|
91
|
LocalBroadcastManager.getInstance(getApplicationContext()).sendBroadcast(intent);
|
|
87
|
92
|
finish();
|
|
88
|
93
|
} else if (id == R.id.iv_play) {
|
|
89
|
94
|
mVideoView.start();
|
|
|
@ -92,6 +97,14 @@ public class PictureVideoPlayActivity extends PictureBaseActivity implements Med
|
|
92
|
97
|
}
|
|
93
|
98
|
|
|
94
|
99
|
@Override
|
|
|
100
|
public void onBackPressed() {
|
|
|
101
|
super.onBackPressed();
|
|
|
102
|
Intent intent = new Intent("publish-video-topic-activity");
|
|
|
103
|
intent.putExtra("message", "finish_preview_video");
|
|
|
104
|
LocalBroadcastManager.getInstance(getApplicationContext()).sendBroadcast(intent);
|
|
|
105
|
}
|
|
|
106
|
|
|
|
107
|
@Override
|
|
95
|
108
|
protected void attachBaseContext(Context newBase) {
|
|
96
|
109
|
super.attachBaseContext(new ContextWrapper(newBase) {
|
|
97
|
110
|
@Override
|
|
|
@ -3,9 +3,11 @@ package com.luck.picture.lib.adapter;
|
|
3
|
3
|
import android.animation.AnimatorSet;
|
|
4
|
4
|
import android.animation.ObjectAnimator;
|
|
5
|
5
|
import android.content.Context;
|
|
|
6
|
import android.content.Intent;
|
|
6
|
7
|
import android.graphics.PorterDuff;
|
|
7
|
8
|
import android.graphics.drawable.Drawable;
|
|
8
|
9
|
import android.support.v4.content.ContextCompat;
|
|
|
10
|
import android.support.v4.content.LocalBroadcastManager;
|
|
9
|
11
|
import android.support.v7.widget.RecyclerView;
|
|
10
|
12
|
import android.text.TextUtils;
|
|
11
|
13
|
import android.view.LayoutInflater;
|
|
|
@ -142,6 +144,9 @@ public class PictureImageGridAdapter extends RecyclerView.Adapter<RecyclerView.V
|
|
142
|
144
|
@Override
|
|
143
|
145
|
public void onClick(View v) {
|
|
144
|
146
|
if (imageSelectChangedListener != null) {
|
|
|
147
|
Intent intent = new Intent("publish-video-topic-activity");
|
|
|
148
|
intent.putExtra("message", "take_video");
|
|
|
149
|
LocalBroadcastManager.getInstance(context).sendBroadcast(intent);
|
|
145
|
150
|
imageSelectChangedListener.onTakePhoto();
|
|
146
|
151
|
}
|
|
147
|
152
|
}
|