Commit fb94a19c authored by linfeng's avatar linfeng

短视频优化

parent 22b5c6cc
......@@ -207,7 +207,6 @@ public class MainActivity extends BaseActivity<CommonPresenter> implements DownL
dialogInterface.dismiss();
}).setCancelable(false).show();
}
}
private void initCopy() {
......
......@@ -26,6 +26,7 @@ import com.ruiwenliu.wrapper.util.ViewHolder;
import com.ruiwenliu.wrapper.util.permission.RxPermission;
import com.ruiwenliu.wrapper.weight.horizontal.GallerySnapHelper;
import com.ruiwenliu.wrapper.weight.horizontal.SpaceItemDecoration;
import com.rv.component.utils.DisplayUtil;
import com.xxfc.discovery.adapter.DiscoveryMenuAdapter;
import com.xxfc.discovery.event.PostPatEvent;
import com.xxfc.discovery.event.PostVideoEvent;
......@@ -276,11 +277,13 @@ public class DiscoveryFragment extends BaseFragment<DiscoveryPresenter> {
mPop.setOutsideTouchable(true);
mPop.update();
if (isShow) {
mPop.showPopupWindow(view);
} else {
mPop.dismiss();
}
// if (isShow) {
mPop.getContentView().measure(View.MeasureSpec.UNSPECIFIED, View.MeasureSpec.UNSPECIFIED); //这句代码必须要才能获得正确的popupwindow的宽度
int popupwindowWidth = mPop.getContentView().getMeasuredWidth() / 2 + (int) DisplayUtil.dpToPx(_mActivity, 18);
mPop.showPopupWindow(view, popupwindowWidth);
// } else {
// mPop.dismiss();
// }
isShow = !isShow;
......
......@@ -61,15 +61,16 @@ public class AddDiscoveryContentPw extends BasePopupWindow {
/**
* @param anchor v
*/
public void showPopupWindow(final View anchor) {
public void showPopupWindow(final View anchor, int popupwindowWidth) {
if (Build.VERSION.SDK_INT >= 24) {
Rect visibleFrame = new Rect();
anchor.getGlobalVisibleRect(visibleFrame);
// int height = anchor.getResources().getDisplayMetrics().heightPixels - visibleFrame.bottom;
// this.setHeight(height);
this.showAsDropDown(anchor, -170, 0);
this.showAsDropDown(anchor, -popupwindowWidth, 0);
} else {
this.showAsDropDown(anchor, -170, 0);
this.showAsDropDown(anchor, -popupwindowWidth, 0);
}
}
......
......@@ -22,7 +22,7 @@
<string name="tv_point">请拍摄/上传身份证</string>
<string name="tv_front">正面</string>
<string name="tv_negative">反面</string>
<string name="tv_id_card_photo_hint">*您所上传的身份证信息,仅用于欣新房车验证</string>
<string name="tv_id_card_photo_hint">*您所上传的身份证信息,仅用于房车验证</string>
<string name="tv_id_card_certrfication_title">身份证认证</string>
<string name="setting_title">设置</string>
<string name="et_traveler_name_hint">请输入出游人姓名</string>
......
......@@ -60,9 +60,13 @@ public class SelectVideoActivity extends BaseStatusActivity<VideoPresenter> {
@Override
public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
VideoFile item = (VideoFile) adapter.getItem(position);
getIntent().putExtra("videofile", item);
setResult(201, getIntent());
finish();
if (item.getFileLength() <= 25) {
getIntent().putExtra("videofile", item);
setResult(201, getIntent());
finish();
} else {
showToast("亲!发布的视频不能超过25秒喔");
}
}
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment