Commit ac53dc51 by wukun

0329

parent 6273740e
......@@ -225,4 +225,11 @@
<uses-permission android:name="com.huawei.android.launcher.permission.CHANGE_BADGE" />
<queries>
<package android:name="com.tencent.mm" />
<package android:name="com.tencent.mobileqq" />
<package android:name="com.sina.weibo" />
<package android:name="com.tencent.wework" />
</queries>
</manifest>
\ No newline at end of file
......@@ -21,6 +21,7 @@ import com.dayu.bigfish.presenter.setting.SettingPresenter;
import com.dayu.common.Constants;
import com.dayu.event.DownloadBean;
import com.dayu.provider.router.RouterPath;
import com.dayu.usercenter.event.ReceiveOrderSwitchEvent;
import com.dayu.utils.AppUtils;
import com.dayu.utils.ToastUtils;
import com.dayu.utils.UIUtils;
......@@ -29,6 +30,7 @@ import com.dayu.widgets.CustomDialog;
import com.dayu.widgets.listener.OnCloseListener;
import com.dayu.widgets.listener.onDownloadListener;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import org.json.JSONException;
import org.json.JSONObject;
......@@ -79,7 +81,9 @@ public class SettingActivity extends BaseActivity<SettingPresenter, ActivitySett
Api.getService(APIService.class).changeWorkStatus(requestBody).compose(Api.applySchedulers())
.subscribe(mPresenter.baseObserver(data -> {
}));
mBind.receiveOrder.setSwitchButton(!mBind.receiveOrder.switchButton);
boolean b = !mBind.receiveOrder.switchButton;
mBind.receiveOrder.setSwitchButton(b);
EventBus.getDefault().post(new ReceiveOrderSwitchEvent(b));
}
});
......
......@@ -91,6 +91,33 @@ public class BitmapUtils {
// }
}
public static File saveBitmap2Local_1(Bitmap bmp, String name, Activity mActivity) {
if (bmp == null)
return null;
// 判断是否可以对SDcard进行操作
// if (Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) { // 获取SDCard指定目录下
File file = new File(mActivity.getExternalFilesDir(Environment.DIRECTORY_DOWNLOADS) + "/dayu/image/");
if (!file.exists()) {
file.mkdirs();
}
file = new File(file, name);
if (file.exists())
return file;
// file.delete();
try {
FileOutputStream out = new FileOutputStream(file);
bmp.compress(Bitmap.CompressFormat.PNG, 100, out);
out.flush();
out.close();
return file;
} catch (Exception e) {
e.printStackTrace();
}
// }
return null;
}
/**
* 获取SDCard的目录路径功能
* @return
......
......@@ -14,6 +14,7 @@ import androidx.recyclerview.widget.RecyclerView;
import com.dayu.usercenter.R;
import com.dayu.usercenter.model.CoursesVideoData;
import com.dayu.utils.ToastUtils;
import java.util.List;
......@@ -63,6 +64,7 @@ public class CoursesVideoAdapter extends RecyclerView.Adapter<CoursesVideoAdapte
@Override
public void onClick(View view) {
if (View.VISIBLE == holder.ivVideoLock.getVisibility()){
ToastUtils.showShortToast("看完上一个才能解锁视频");
return;
}
if (onItemClickListener != null){
......
package com.dayu.usercenter.event;
public class ReceiveOrderSwitchEvent {
private boolean isSwitch;
public ReceiveOrderSwitchEvent(boolean isSwitch) {
this.isSwitch = isSwitch;
}
public boolean isSwitch() {
return isSwitch;
}
public void setSwitch(boolean aSwitch) {
isSwitch = aSwitch;
}
}
......@@ -179,12 +179,12 @@ public class BusinessDetailActivity extends BaseActivity<BusinessDetailPresenter
mBind.llVideo.setVisibility(View.VISIBLE);
mBind.tvTips.setText("共计"+ videoDataList.size()+"个,上下滑动观看更多视频");
setCurrentData(currentId);
coursesVideoAdapter = new CoursesVideoAdapter(mActivity,videoDataList);
mBind.rlVideo.setLayoutManager(new LinearLayoutManager(mActivity));
mBind.rlVideo.setAdapter(coursesVideoAdapter);
setCurrentData(currentId);
coursesVideoAdapter.setOnItemClickListener(new CoursesVideoAdapter.OnItemClickListener() {
@Override
public void onItemClick(int position) {
......
......@@ -76,7 +76,8 @@ public class ShareUserCardActivity extends BaseActivity<SImplePresenter, Activit
.observeOn(AndroidSchedulers.mainThread())
.subscribe(aLong -> {
Bitmap bitmap = BitmapUtils.getBitmap(mBind.llPoster);
File file = BitmapUtils.saveBitmap2Local(bitmap, "card"+System.currentTimeMillis()+mUserId+ ".png");
// File file = BitmapUtils.saveBitmap2Local(bitmap, "card"+System.currentTimeMillis()+mUserId+ ".png");
File file = BitmapUtils.saveBitmap2Local_1(bitmap, "card"+System.currentTimeMillis()+mUserId+ ".png",mActivity);
if (bitmap != null) {
CommonUtils.shareImg(ShareUserCardActivity.this, file, SHARE_MEDIA.WEIXIN_CIRCLE, null);
addShareCardRecord();
......
......@@ -34,6 +34,7 @@ import com.dayu.usercenter.event.AddressData;
import com.dayu.usercenter.event.ChangeNickEvent;
import com.dayu.usercenter.event.EditAddressEvent;
import com.dayu.usercenter.event.EditBankEvent;
import com.dayu.usercenter.event.ReceiveOrderSwitchEvent;
import com.dayu.usercenter.event.RefreshUserInfoEvent;
import com.dayu.usercenter.event.RefreshUserPriceEvent;
import com.dayu.usercenter.event.RefreshUserRecordEvent;
......@@ -583,6 +584,12 @@ public class HomeUserFragment extends BaseFragment<HomeUserPresenter, FragmentHo
getAddress();
}
@Subscribe(threadMode = ThreadMode.MAIN)
public void receiveOrderSwitch(ReceiveOrderSwitchEvent event) {
mBind.receiveOrder.setSwitchButton(event.isSwitch());
}
private void setUserNick(String nickName) {
if (!TextUtils.isEmpty(nickName))
mBind.tvNick.setText("(" + nickName + ")");
......
......@@ -8,7 +8,11 @@
android:supportsRtl="true">
<activity
android:name=".ui.activity.BusinessDetailActivity"
android:exported="false" />
android:exported="false"
android:launchMode="singleTask"
android:screenOrientation="portrait"
android:configChanges="orientation|screenSize|keyboardHidden"
android:windowSoftInputMode="stateHidden|adjustResize"/>
<activity
android:name=".ui.activity2.SelfLicenceDetailActivity"
android:exported="false" />
......
......@@ -53,7 +53,7 @@
android:textSize="20dp"
android:paddingLeft="20dp"
android:gravity="center|left"
android:background="@color/table_record_title_bg"/>
android:background="@color/cl_selector_hui"/>
<TextView
android:id="@+id/tv_name"
......@@ -71,11 +71,11 @@
android:textSize="20dp"
android:paddingLeft="20dp"
android:gravity="center|left"
android:background="@color/table_record_title_bg"/>
android:background="@color/cl_selector_hui"/>
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="70dp">
android:layout_height="140dp">
<TextView
android:id="@+id/tv_info"
......@@ -104,16 +104,21 @@ Y
android:textSize="20dp"
android:paddingLeft="20dp"
android:gravity="center|left"
android:background="@color/table_record_title_bg"/>
android:background="@color/cl_selector_hui"/>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="180dp">
<com.dayu.widgets.MyJzvdStd
android:id="@+id/jz_video"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="180dp" />
android:layout_height="match_parent">
<com.dayu.widgets.MyJzvdStd
android:id="@+id/jz_video"
android:layout_width="match_parent"
android:layout_height="180dp" />
</LinearLayout>
<RelativeLayout
android:id="@+id/rl_click"
......@@ -166,7 +171,7 @@ Y
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rl_video"
android:layout_width="match_parent"
android:layout_height="100dp"/>
android:layout_height="140dp"/>
<TextView
......@@ -189,13 +194,13 @@ Y
android:textSize="20dp"
android:paddingLeft="20dp"
android:gravity="center|left"
android:background="@color/table_record_title_bg"/>
android:background="@color/cl_selector_hui"/>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rl_service"
android:layout_width="match_parent"
android:layout_height="100dp"
android:layout_height="220dp"
android:layout_marginBottom="60dp"/>
......@@ -208,7 +213,7 @@ Y
android:id="@+id/btn_commit"
android:layout_width="wrap_content"
android:layout_height="35dp"
android:background="@drawable/blue_commom"
android:background="@drawable/btn_blue_react_4"
android:layout_marginBottom="10dp"
android:padding="8dp"
android:text="申请商家认证"
......
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 sign in to comment