平板会议管理
This commit is contained in:
parent
f4d15174c5
commit
c2ba7d919b
@ -217,4 +217,9 @@ public class PathConfig {
|
||||
public static final String PATH_MODULE_PAD_OA_FRAGMENT_SCHEDULE_EDIT = "/oamodule/fragment/scheduleEdit";//日程编辑
|
||||
public static final String PATH_MODULE_PAD_OA_FRAGMENT_SCHEDULE_DETAIL = "/oamodule/fragment/scheduleDetail";//日程详情
|
||||
|
||||
public static final String PATH_MODULE_PAD_OA_FRAGMENT_MEETING = "/oamodule/fragment/meeting";//会议管理
|
||||
public static final String PATH_MODULE_PAD_OA_FRAGMENT_MEETING_ADD = "/oamodule/fragment/meetingAdd";//发起会议
|
||||
public static final String PATH_MODULE_PAD_OA_FRAGMENT_MEETING_EDIT = "/oamodule/fragment/meetingEdit";//发起会议
|
||||
public static final String PATH_MODULE_PAD_OA_FRAGMENT_MEETING_DETAIL = "/oamodule/fragment/meetingDetail";//发起会议
|
||||
|
||||
}
|
||||
|
@ -159,7 +159,8 @@ public abstract class BaseActivity extends AppCompatActivity {
|
||||
}
|
||||
|
||||
public boolean isPad() {
|
||||
return (this.getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) >= Configuration.SCREENLAYOUT_SIZE_LARGE;
|
||||
return true;
|
||||
// TODO 判断是否是平板 return (this.getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) >= Configuration.SCREENLAYOUT_SIZE_LARGE;
|
||||
}
|
||||
|
||||
protected boolean isNavBarHasShown(Context ctx) {
|
||||
|
@ -1,7 +1,12 @@
|
||||
package com.tenlionsoft.baselib.core.widget.base;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Environment;
|
||||
import android.provider.Settings;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
@ -11,10 +16,13 @@ import android.widget.LinearLayout;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.hjq.toast.ToastUtils;
|
||||
import com.jcodecraeer.xrecyclerview.progressindicator.AVLoadingIndicatorView;
|
||||
import com.scwang.smart.refresh.layout.SmartRefreshLayout;
|
||||
import com.tenlionsoft.baselib.R;
|
||||
|
||||
import androidx.activity.result.ActivityResultLauncher;
|
||||
import androidx.activity.result.contract.ActivityResultContracts;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
@ -41,6 +49,7 @@ public abstract class BaseFragment extends Fragment {
|
||||
protected ImageView mIvFragmentBack;
|
||||
protected TextView mTvFragmentOption;
|
||||
protected TextView mTvFragmentTitle;
|
||||
private ActivityResultLauncher<Intent> mLauncher;
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
@ -94,7 +103,9 @@ public abstract class BaseFragment extends Fragment {
|
||||
|
||||
protected abstract void loadMoreData();
|
||||
|
||||
protected void checkHasManage(){
|
||||
|
||||
}
|
||||
@Override
|
||||
public void onDestroyView() {
|
||||
super.onDestroyView();
|
||||
@ -107,6 +118,43 @@ public abstract class BaseFragment extends Fragment {
|
||||
public void onAttach(@NonNull Context context) {
|
||||
super.onAttach(context);
|
||||
mActivity = (BaseActivity) getActivity();
|
||||
|
||||
//获取了文件管理权限
|
||||
mLauncher = registerForActivityResult(new ActivityResultContracts.StartActivityForResult(), result -> {
|
||||
//判断是否有权限
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
|
||||
if (!Environment.isExternalStorageManager()) {
|
||||
//没有授权
|
||||
ToastUtils.show("该功能需要SD卡的管理权限,请前往设置进行授权.");
|
||||
} else {
|
||||
//do some thing
|
||||
hasManageFileManage();
|
||||
}
|
||||
} else {
|
||||
hasManageFileManage();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
protected void checkManagePermission() {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
|
||||
if (!Environment.isExternalStorageManager()) {
|
||||
//没有授权
|
||||
ToastUtils.show("该功能需要SD卡的管理权限,请前往设置进行授权.");
|
||||
Intent intent = new Intent(Settings.ACTION_MANAGE_APP_ALL_FILES_ACCESS_PERMISSION);
|
||||
intent.setData(Uri.parse("package:" + mActivity.getPackageName()));
|
||||
mLauncher.launch(intent);
|
||||
} else {
|
||||
hasManageFileManage();
|
||||
}
|
||||
} else {
|
||||
hasManageFileManage();
|
||||
}
|
||||
}
|
||||
|
||||
//有权限进行文件的管理
|
||||
protected void hasManageFileManage() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -38,4 +38,13 @@ public class FragmentUtils {
|
||||
BaseFragment fragment = (BaseFragment) ARouter.getInstance().build(path).withString(key, val).navigation();
|
||||
return fragment;
|
||||
}
|
||||
|
||||
public static BaseFragment getFragmentTwo(String path, String key, String val, String key1, String val1) {
|
||||
BaseFragment fragment = (BaseFragment) ARouter.getInstance()
|
||||
.build(path)
|
||||
.withString(key, val)
|
||||
.withString(key1, val1)
|
||||
.navigation();
|
||||
return fragment;
|
||||
}
|
||||
}
|
||||
|
@ -1,16 +1,16 @@
|
||||
package com.leon.lfilepickerlibrary;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.Fragment;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
|
||||
import com.leon.lfilepickerlibrary.model.ParamEntity;
|
||||
import com.leon.lfilepickerlibrary.ui.LFilePickerActivity;
|
||||
|
||||
import androidx.activity.result.ActivityResultLauncher;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.StyleRes;
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
/**
|
||||
* 作者:Leon
|
||||
@ -37,6 +37,7 @@ public class LFilePicker {
|
||||
private String mStartPath;
|
||||
private boolean mIsGreater = true;//是否大于
|
||||
private long mFileSize;
|
||||
private ActivityResultLauncher<Intent> mFragmentLauncher;
|
||||
|
||||
/**
|
||||
* 绑定Activity
|
||||
@ -139,6 +140,11 @@ public class LFilePicker {
|
||||
return this;
|
||||
}
|
||||
|
||||
public LFilePicker withFragmentLauncher(ActivityResultLauncher<Intent> launcher) {
|
||||
this.mFragmentLauncher = launcher;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置返回图标
|
||||
*
|
||||
@ -265,7 +271,8 @@ public class LFilePicker {
|
||||
if (mActivity != null) {
|
||||
mActivity.startActivityForResult(intent, mRequestCode);
|
||||
} else if (mFragment != null) {
|
||||
mFragment.startActivityForResult(intent, mRequestCode);
|
||||
mFragmentLauncher.launch(intent);
|
||||
// mFragment.startActivityForResult(intent, mRequestCode);
|
||||
} else {
|
||||
mSupportFragment.startActivityForResult(intent, mRequestCode);
|
||||
}
|
||||
|
@ -18,14 +18,15 @@ import com.tenlionsoft.baselib.constant.PathConfig;
|
||||
import com.tenlionsoft.baselib.core.retrofit_net.RetrofitManager;
|
||||
import com.tenlionsoft.baselib.core.retrofit_net.conver.RxTransformer;
|
||||
import com.tenlionsoft.baselib.core.widget.base.BaseFragment;
|
||||
import com.tenlionsoft.baselib.core.widget.base.FragmentUtils;
|
||||
import com.tenlionsoft.baselib.utils.ExceptionHandler;
|
||||
import com.tenlionsoft.baselib.utils.UserLgUtils;
|
||||
import com.tenlionsoft.oamodule.R;
|
||||
import com.tenlionsoft.oamodule.R2;
|
||||
import com.tenlionsoft.oamodule.activity.meeting.MeetingDetailActivity;
|
||||
import com.tenlionsoft.oamodule.adapter.MeetingMineJoinEmceeAdapter;
|
||||
import com.tenlionsoft.oamodule.beans.MineJoinMeetingListBean;
|
||||
import com.tenlionsoft.oamodule.net.OAApi;
|
||||
import com.tenlionsoft.oamodule.pad.activitys.home.PadMainActivity;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
@ -69,6 +70,7 @@ public class EmceeMeetingFragment extends BaseFragment {
|
||||
private int mCurrentPage = 1;
|
||||
private String mKeywords = "";
|
||||
private ActivityResultLauncher<Intent> mLauncher;
|
||||
private PadMainActivity mMainActivity;
|
||||
|
||||
@Override
|
||||
protected int getContentViewId() {
|
||||
@ -90,16 +92,25 @@ public class EmceeMeetingFragment extends BaseFragment {
|
||||
mRlvMeeting.setLayoutManager(new LinearLayoutManager(mActivity));
|
||||
mRlvMeeting.setAdapter(mAdapter);
|
||||
mAdapter.addOnItemClickListener(rowsBean -> {
|
||||
Intent intent = new Intent(mActivity, MeetingDetailActivity.class);
|
||||
intent.putExtra("id", rowsBean.getMeetingId());
|
||||
mLauncher.launch(intent);
|
||||
if (mActivity.isPad()) {
|
||||
BaseFragment fragment = FragmentUtils.getFragmentOne(PathConfig.PATH_MODULE_PAD_OA_FRAGMENT_MEETING_DETAIL,
|
||||
"id",
|
||||
rowsBean.getMeetingId());
|
||||
mMainActivity.addFragment(1, fragment);
|
||||
} else {
|
||||
Intent intent = new Intent(mActivity, MeetingDetailActivity.class);
|
||||
intent.putExtra("id", rowsBean.getMeetingId());
|
||||
mLauncher.launch(intent);
|
||||
}
|
||||
});
|
||||
doRefresh();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onAttach(@androidx.annotation.NonNull @NotNull Context context) {
|
||||
super.onAttach(context);
|
||||
mMainActivity = (PadMainActivity) getActivity();
|
||||
mLauncher = registerForActivityResult(new ActivityResultContracts.StartActivityForResult(), result -> {
|
||||
if (Activity.RESULT_OK == result.getResultCode()) {
|
||||
doRefresh();
|
||||
|
@ -18,6 +18,7 @@ import com.tenlionsoft.baselib.constant.PathConfig;
|
||||
import com.tenlionsoft.baselib.core.retrofit_net.RetrofitManager;
|
||||
import com.tenlionsoft.baselib.core.retrofit_net.conver.RxTransformer;
|
||||
import com.tenlionsoft.baselib.core.widget.base.BaseFragment;
|
||||
import com.tenlionsoft.baselib.core.widget.base.FragmentUtils;
|
||||
import com.tenlionsoft.baselib.utils.ExceptionHandler;
|
||||
import com.tenlionsoft.baselib.utils.UserLgUtils;
|
||||
import com.tenlionsoft.oamodule.R;
|
||||
@ -26,6 +27,7 @@ import com.tenlionsoft.oamodule.activity.meeting.MeetingDetailActivity;
|
||||
import com.tenlionsoft.oamodule.adapter.MeetingMineJoinEmceeAdapter;
|
||||
import com.tenlionsoft.oamodule.beans.MineJoinMeetingListBean;
|
||||
import com.tenlionsoft.oamodule.net.OAApi;
|
||||
import com.tenlionsoft.oamodule.pad.activitys.home.PadMainActivity;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
@ -68,6 +70,7 @@ public class JoinMeetingFragment extends BaseFragment {
|
||||
private int mCurrentPage = 1;
|
||||
private String mKeywords = "";
|
||||
private ActivityResultLauncher<Intent> mLauncher;
|
||||
private PadMainActivity mMainActivity;
|
||||
|
||||
@Override
|
||||
protected int getContentViewId() {
|
||||
@ -89,9 +92,16 @@ public class JoinMeetingFragment extends BaseFragment {
|
||||
mRlvMeeting.setLayoutManager(new LinearLayoutManager(mActivity));
|
||||
mRlvMeeting.setAdapter(mAdapter);
|
||||
mAdapter.addOnItemClickListener(rowsBean -> {
|
||||
Intent intent = new Intent(mActivity, MeetingDetailActivity.class);
|
||||
intent.putExtra("id", rowsBean.getMeetingId());
|
||||
mLauncher.launch(intent);
|
||||
if (mActivity.isPad()) {
|
||||
BaseFragment fragment = FragmentUtils.getFragmentOne(PathConfig.PATH_MODULE_PAD_OA_FRAGMENT_MEETING_DETAIL,
|
||||
"id",
|
||||
rowsBean.getMeetingId());
|
||||
mMainActivity.addFragment(1, fragment);
|
||||
} else {
|
||||
Intent intent = new Intent(mActivity, MeetingDetailActivity.class);
|
||||
intent.putExtra("id", rowsBean.getMeetingId());
|
||||
mLauncher.launch(intent);
|
||||
}
|
||||
});
|
||||
doRefresh();
|
||||
}
|
||||
@ -99,6 +109,7 @@ public class JoinMeetingFragment extends BaseFragment {
|
||||
@Override
|
||||
public void onAttach(@androidx.annotation.NonNull @NotNull Context context) {
|
||||
super.onAttach(context);
|
||||
mMainActivity = (PadMainActivity) getActivity();
|
||||
mLauncher = registerForActivityResult(new ActivityResultContracts.StartActivityForResult(), result -> {
|
||||
if (Activity.RESULT_OK == result.getResultCode()) {
|
||||
doRefresh();
|
||||
@ -129,7 +140,7 @@ public class JoinMeetingFragment extends BaseFragment {
|
||||
mCurrentPage = currentPage;
|
||||
RetrofitManager.getInstance()
|
||||
.create(OAApi.class)
|
||||
.getMineJoinMeetingList("","",mKeywords, mCurrentPage + "")
|
||||
.getMineJoinMeetingList("", "", mKeywords, mCurrentPage + "")
|
||||
.compose(RxTransformer.getTransformer())
|
||||
.subscribe(new Observer<MineJoinMeetingListBean>() {
|
||||
@Override
|
||||
@ -235,6 +246,9 @@ public class JoinMeetingFragment extends BaseFragment {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
protected void refreshView() {
|
||||
|
||||
|
@ -11,7 +11,6 @@ import android.widget.ProgressBar;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.hjq.toast.ToastUtils;
|
||||
import com.scwang.smart.refresh.layout.SmartRefreshLayout;
|
||||
import com.tenlionsoft.baselib.constant.LionActions;
|
||||
@ -19,14 +18,16 @@ import com.tenlionsoft.baselib.constant.PathConfig;
|
||||
import com.tenlionsoft.baselib.core.retrofit_net.RetrofitManager;
|
||||
import com.tenlionsoft.baselib.core.retrofit_net.conver.RxTransformer;
|
||||
import com.tenlionsoft.baselib.core.widget.base.BaseFragment;
|
||||
import com.tenlionsoft.baselib.core.widget.base.FragmentUtils;
|
||||
import com.tenlionsoft.baselib.utils.ExceptionHandler;
|
||||
import com.tenlionsoft.baselib.utils.UserLgUtils;
|
||||
import com.tenlionsoft.oamodule.R;
|
||||
import com.tenlionsoft.oamodule.R2;
|
||||
import com.tenlionsoft.oamodule.activity.meeting.MeetingDetailActivity;
|
||||
import com.tenlionsoft.oamodule.adapter.MeetingMineApplyAdapter;
|
||||
import com.tenlionsoft.oamodule.beans.MeetingRecordListBean;
|
||||
import com.tenlionsoft.oamodule.beans.MeetingRoomRecordBean;
|
||||
import com.tenlionsoft.oamodule.net.OAApi;
|
||||
import com.tenlionsoft.oamodule.pad.activitys.home.PadMainActivity;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
@ -68,6 +69,7 @@ public class MineApplyMeetingFragment extends BaseFragment {
|
||||
private int mCurrentPage = 1;
|
||||
private String mKeywords = "";
|
||||
private ActivityResultLauncher<Intent> mLauncher;
|
||||
private PadMainActivity mMainActivity;
|
||||
|
||||
@Override
|
||||
protected int getContentViewId() {
|
||||
@ -88,17 +90,29 @@ public class MineApplyMeetingFragment extends BaseFragment {
|
||||
mAdapter = new MeetingMineApplyAdapter(mActivity, mDatas);
|
||||
mRlvMeeting.setLayoutManager(new LinearLayoutManager(mActivity));
|
||||
mRlvMeeting.setAdapter(mAdapter);
|
||||
mAdapter.addOnItemClickListener(rowsBean -> ARouter.getInstance()
|
||||
.build(PathConfig.PATH_MODULE_OA_ACTIVITY_MEETING_DETAIL)
|
||||
.withString("id", rowsBean.getMeetingId())
|
||||
.withString("type", "mine")
|
||||
.navigation(mActivity, 12));
|
||||
mAdapter.addOnItemClickListener(rowsBean -> {
|
||||
if (mActivity.isPad()) {
|
||||
BaseFragment fragment = FragmentUtils.getFragmentTwo(
|
||||
PathConfig.PATH_MODULE_PAD_OA_FRAGMENT_MEETING_DETAIL,
|
||||
"id",
|
||||
rowsBean.getMeetingId(),
|
||||
"type",
|
||||
"mine");
|
||||
mMainActivity.addFragment(1, fragment);
|
||||
} else {
|
||||
Intent intent = new Intent(mActivity, MeetingDetailActivity.class);
|
||||
intent.putExtra("id", rowsBean.getMeetingId());
|
||||
intent.putExtra("type", "mine");
|
||||
mLauncher.launch(intent);
|
||||
}
|
||||
});
|
||||
doRefresh();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAttach(@androidx.annotation.NonNull @NotNull Context context) {
|
||||
super.onAttach(context);
|
||||
mMainActivity = (PadMainActivity) getActivity();
|
||||
mLauncher = registerForActivityResult(new ActivityResultContracts.StartActivityForResult(), result -> {
|
||||
if (Activity.RESULT_OK == result.getResultCode()) {
|
||||
doRefresh();
|
||||
|
@ -0,0 +1,633 @@
|
||||
package com.tenlionsoft.oamodule.pad.fragments.home.meeting;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Color;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.bigkoo.pickerview.builder.OptionsPickerBuilder;
|
||||
import com.bigkoo.pickerview.builder.TimePickerBuilder;
|
||||
import com.bigkoo.pickerview.view.OptionsPickerView;
|
||||
import com.bigkoo.pickerview.view.TimePickerView;
|
||||
import com.google.gson.Gson;
|
||||
import com.hjq.toast.ToastUtils;
|
||||
import com.leon.lfilepickerlibrary.LFilePicker;
|
||||
import com.leon.lfilepickerlibrary.utils.Constant;
|
||||
import com.tenlionsoft.baselib.constant.DicIds;
|
||||
import com.tenlionsoft.baselib.constant.LionActions;
|
||||
import com.tenlionsoft.baselib.constant.PathConfig;
|
||||
import com.tenlionsoft.baselib.core.beans.AddFileBean;
|
||||
import com.tenlionsoft.baselib.core.beans.BaseSuccessBean;
|
||||
import com.tenlionsoft.baselib.core.beans.DicBean;
|
||||
import com.tenlionsoft.baselib.core.retrofit_net.BaseUrlApi;
|
||||
import com.tenlionsoft.baselib.core.retrofit_net.RetrofitManager;
|
||||
import com.tenlionsoft.baselib.core.retrofit_net.api.BaseApiService;
|
||||
import com.tenlionsoft.baselib.core.retrofit_net.conver.RxTransformer;
|
||||
import com.tenlionsoft.baselib.core.widget.base.AddFileAdapter;
|
||||
import com.tenlionsoft.baselib.core.widget.base.BaseFragment;
|
||||
import com.tenlionsoft.baselib.utils.ExceptionHandler;
|
||||
import com.tenlionsoft.baselib.utils.LogUtils;
|
||||
import com.tenlionsoft.baselib.utils.TimeUtils;
|
||||
import com.tenlionsoft.baselib.utils.UIUtil;
|
||||
import com.tenlionsoft.oamodule.R;
|
||||
import com.tenlionsoft.oamodule.R2;
|
||||
import com.tenlionsoft.oamodule.activity.car.ChooseUserActivity;
|
||||
import com.tenlionsoft.oamodule.activity.meeting.ChooseMeetingRoomActivity;
|
||||
import com.tenlionsoft.oamodule.adapter.BasePersonShowAdapter;
|
||||
import com.tenlionsoft.oamodule.beans.ChoosePersonListBean;
|
||||
import com.tenlionsoft.oamodule.beans.MeetingAttachListBean;
|
||||
import com.tenlionsoft.oamodule.beans.MeetingRoomBean;
|
||||
import com.tenlionsoft.oamodule.beans.SaveMeetingBean;
|
||||
import com.tenlionsoft.oamodule.net.OAApi;
|
||||
import com.tenlionsoft.oamodule.pad.activitys.home.PadMainActivity;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import androidx.activity.result.ActivityResultLauncher;
|
||||
import androidx.activity.result.contract.ActivityResultContracts;
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers;
|
||||
import io.reactivex.rxjava3.annotations.NonNull;
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import io.reactivex.rxjava3.core.Observer;
|
||||
import io.reactivex.rxjava3.disposables.Disposable;
|
||||
import io.reactivex.rxjava3.schedulers.Schedulers;
|
||||
import okhttp3.MediaType;
|
||||
import okhttp3.MultipartBody;
|
||||
import okhttp3.RequestBody;
|
||||
|
||||
/**
|
||||
* 作者: adam
|
||||
* 日期: 2022/5/9 - 14:31
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述:
|
||||
*/
|
||||
@Route(path = PathConfig.PATH_MODULE_PAD_OA_FRAGMENT_MEETING_ADD)
|
||||
public class MeetingAddFragment extends BaseFragment {
|
||||
@BindView(R2.id.et_name)
|
||||
EditText mEtName;
|
||||
@BindView(R2.id.tv_type)
|
||||
TextView mTvType;
|
||||
@BindView(R2.id.tv_emcee)
|
||||
TextView mTvEmcee;
|
||||
@BindView(R2.id.tv_start_time)
|
||||
TextView mTvStartTime;
|
||||
@BindView(R2.id.tv_end_time)
|
||||
TextView mTvEndTime;
|
||||
@BindView(R2.id.tv_room)
|
||||
TextView mTvRoom;
|
||||
@BindView(R2.id.cb_notice_msg)
|
||||
CheckBox mCbNoticeMsg;
|
||||
@BindView(R2.id.cb_notice_email)
|
||||
CheckBox mCbNoticeEmail;
|
||||
@BindView(R2.id.rlv_join)
|
||||
RecyclerView mRlvJoin;
|
||||
@BindView(R2.id.et_content)
|
||||
EditText mEtContent;
|
||||
@BindView(R2.id.rlv_files)
|
||||
RecyclerView mRlvFiles;
|
||||
@BindView(R2.id.tv_file_hint)
|
||||
TextView mTvFileHint;
|
||||
@BindView(R2.id.iv_add_file)
|
||||
ImageView mIvAddFile;
|
||||
@BindView(R2.id.btn_confirm)
|
||||
Button mBtnConfirm;
|
||||
|
||||
|
||||
private List<AddFileBean> mFileBeans = new ArrayList<>();
|
||||
private AddFileAdapter mAddFileAdapter;
|
||||
private String[] fileFilter = new String[]{".doc", ".docx", ".xls", ".xlsx", ".pptx", ".ppt", ".txt", ".pdf"};
|
||||
private int mFileMax = 9;
|
||||
|
||||
private OptionsPickerView<DicBean> mTypePicker;
|
||||
private List<DicBean> mTyps;
|
||||
private DicBean mSelType;
|
||||
|
||||
|
||||
private ChoosePersonListBean mSelEmcee;
|
||||
private MeetingRoomBean mSelRoom;
|
||||
private List<MeetingAttachListBean> mJoinPerson;
|
||||
private BasePersonShowAdapter mPersonShowAdapter;
|
||||
private PadMainActivity mMainActivity;
|
||||
|
||||
private ActivityResultLauncher<Intent> mEmceeLauncher;
|
||||
private ActivityResultLauncher<Intent> mFileLauncher;
|
||||
private ActivityResultLauncher<Intent> mRoomLauncher;
|
||||
private ActivityResultLauncher<Intent> mJoinUserLauncher;
|
||||
|
||||
|
||||
@Override
|
||||
protected int getContentViewId() {
|
||||
return R.layout.fragment_meeting_add;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setDataToView(View dataView) {
|
||||
ButterKnife.bind(this, dataView);
|
||||
setStateView(STATE_SUCCESS);
|
||||
mSrlView.setEnableRefresh(false);
|
||||
mSrlView.setEnableLoadMore(false);
|
||||
initViews();
|
||||
}
|
||||
|
||||
private void initViews() {
|
||||
setTitleView(true);
|
||||
mTvFragmentTitle.setText("会议申请");
|
||||
mIvFragmentBack.setOnClickListener(v -> mMainActivity.backFragment(1, this));
|
||||
mTvType.setOnClickListener(v -> onShowType());
|
||||
|
||||
mTvEmcee.setOnClickListener(v -> {
|
||||
Intent intent = new Intent(mActivity, ChooseUserActivity.class);
|
||||
intent.putExtra("isSingle", true);
|
||||
mEmceeLauncher.launch(intent);
|
||||
});//主持人
|
||||
mTvStartTime.setOnClickListener(v -> onShowDate(1));
|
||||
mTvEndTime.setOnClickListener(v -> {
|
||||
String trim = mTvStartTime.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(trim)) {
|
||||
ToastUtils.show("请选择开始时间");
|
||||
} else {
|
||||
onShowDate(2);
|
||||
}
|
||||
});
|
||||
mTvRoom.setOnClickListener(v -> {
|
||||
Intent intent = new Intent(mActivity, ChooseMeetingRoomActivity.class);
|
||||
mRoomLauncher.launch(intent);
|
||||
});//选择会议室
|
||||
mAddFileAdapter = new AddFileAdapter(mActivity, mFileBeans);
|
||||
mAddFileAdapter.addOnItemClickListener(addFileBean -> {
|
||||
//TODO 预览文件
|
||||
});
|
||||
//删除上传的文件
|
||||
mAddFileAdapter.addOnDeleteListener((bean, i) -> {
|
||||
//删除list中的某个数据
|
||||
mFileBeans.remove(i);
|
||||
mAddFileAdapter.notifyDataSetChanged();
|
||||
++mFileMax;
|
||||
if (mFileBeans.size() > 0) {
|
||||
mTvFileHint.setVisibility(View.GONE);
|
||||
} else {
|
||||
mTvFileHint.setVisibility(View.VISIBLE);
|
||||
}
|
||||
});
|
||||
mRlvFiles.setLayoutManager(new LinearLayoutManager(mActivity));
|
||||
mRlvFiles.setAdapter(mAddFileAdapter);
|
||||
|
||||
|
||||
mJoinPerson = new ArrayList<>();
|
||||
mJoinPerson.add(new MeetingAttachListBean());
|
||||
mPersonShowAdapter = new BasePersonShowAdapter(mActivity, mJoinPerson, 1);
|
||||
mRlvJoin.setLayoutManager(new GridLayoutManager(mActivity, 5));
|
||||
mRlvJoin.setAdapter(mPersonShowAdapter);
|
||||
mPersonShowAdapter.addOnDelListener(this::showConfirmDialog);
|
||||
mPersonShowAdapter.addOnItemClickListener(bean -> {
|
||||
if (TextUtils.isEmpty(bean.getUserId())) {
|
||||
Intent intent = new Intent(mActivity, ChooseUserActivity.class);
|
||||
intent.putExtra("isSingle", false);
|
||||
mJoinUserLauncher.launch(intent);
|
||||
}
|
||||
});
|
||||
mIvAddFile.setOnClickListener(v -> checkManagePermission());
|
||||
mBtnConfirm.setOnClickListener(v -> doConfirm());
|
||||
mActivity.setTouchDelegate(mIvAddFile, 30);
|
||||
}
|
||||
|
||||
|
||||
protected void hasManageFileManage() {
|
||||
if (mFileMax == 0) {
|
||||
ToastUtils.show("超过最大上传数量限制");
|
||||
} else {
|
||||
new LFilePicker()
|
||||
.withFragment(MeetingAddFragment.this)
|
||||
.withFragmentLauncher(mFileLauncher)
|
||||
.withRequestCode(LionActions.REQUEST_CODE_AC)
|
||||
.withTitle("文件选择")
|
||||
.withMaxNum(mFileMax)
|
||||
.withFileFilter(fileFilter)
|
||||
.start();
|
||||
}
|
||||
}
|
||||
|
||||
private void showConfirmDialog(MeetingAttachListBean bean, int i) {
|
||||
new AlertDialog.Builder(mActivity)
|
||||
.setTitle("提示")
|
||||
.setMessage("确定要删除该参会人员吗?")
|
||||
.setPositiveButton("确定", (dialog, which) -> {
|
||||
mJoinPerson.remove(i);
|
||||
mPersonShowAdapter.notifyDataSetChanged();
|
||||
})
|
||||
.setNegativeButton("取消", (dialog, which) -> dialog.dismiss())
|
||||
.create()
|
||||
.show();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAttach(@androidx.annotation.NonNull @NotNull Context context) {
|
||||
super.onAttach(context);
|
||||
mMainActivity = (PadMainActivity) getActivity();
|
||||
//主持人
|
||||
mEmceeLauncher = registerForActivityResult(new ActivityResultContracts.StartActivityForResult(), result -> {
|
||||
Intent data = result.getData();
|
||||
if (data != null) {
|
||||
mSelEmcee = (ChoosePersonListBean) data.getSerializableExtra("bean");
|
||||
mTvEmcee.setText(mSelEmcee.getUserName());
|
||||
}
|
||||
});
|
||||
//参会人员
|
||||
mJoinUserLauncher = registerForActivityResult(new ActivityResultContracts.StartActivityForResult(), result -> {
|
||||
//参会人员
|
||||
Intent data = result.getData();
|
||||
if (data != null) {
|
||||
String name = data.getStringExtra("name");
|
||||
String id = data.getStringExtra("id");
|
||||
String[] names = name.split(",");
|
||||
String[] ids = id.split(",");
|
||||
for (int i = 0; i < names.length; i++) {
|
||||
boolean isExist = false;
|
||||
for (MeetingAttachListBean person : mJoinPerson) {
|
||||
if (TextUtils.isEmpty(person.getUserId())) continue;
|
||||
if (person.getUserId().equals(ids[i])) {
|
||||
isExist = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!isExist) {
|
||||
MeetingAttachListBean bean = new MeetingAttachListBean();
|
||||
bean.setUserName(names[i]);
|
||||
bean.setUserId(ids[i]);
|
||||
mJoinPerson.add(0, bean);
|
||||
}
|
||||
}
|
||||
mPersonShowAdapter.notifyDataSetChanged();
|
||||
}
|
||||
});
|
||||
//会议室
|
||||
mRoomLauncher = registerForActivityResult(new ActivityResultContracts.StartActivityForResult(), result -> {
|
||||
Intent data = result.getData();
|
||||
if (data != null) {
|
||||
mSelRoom = (MeetingRoomBean) data.getSerializableExtra("bean");
|
||||
mTvRoom.setText(mSelRoom.getRoomName());
|
||||
}
|
||||
});
|
||||
//附件
|
||||
mFileLauncher = registerForActivityResult(new ActivityResultContracts.StartActivityForResult(), result -> {
|
||||
Intent data = result.getData();
|
||||
//文件
|
||||
if (data != null) {
|
||||
ArrayList<String> paths = data.getStringArrayListExtra(Constant.RESULT_INFO);
|
||||
if (paths != null && paths.size() > 0) {
|
||||
doUploadFiles(paths);
|
||||
} else {
|
||||
ToastUtils.show("未选择文件");
|
||||
}
|
||||
} else {
|
||||
ToastUtils.show("路径有误,请稍后重试");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 时间选择
|
||||
*/
|
||||
private void onShowDate(int i) {
|
||||
TimePickerView mTimePickerView = new TimePickerBuilder(mActivity, (date, v) -> {
|
||||
switch (i) {
|
||||
case 1:
|
||||
mTvStartTime.setText(TimeUtils.date2String(date));
|
||||
break;
|
||||
case 2:
|
||||
//判断时间大小
|
||||
String start = mTvStartTime.getText().toString().trim();
|
||||
int span = TimeUtils.compareDate(date, TimeUtils.string2Date(start));
|
||||
if (span >= 0) {
|
||||
mTvEndTime.setText(TimeUtils.date2String(date));
|
||||
} else {
|
||||
ToastUtils.show("结束时间须大于开始时间");
|
||||
}
|
||||
break;
|
||||
}
|
||||
})
|
||||
.setTitleText("请选时间")
|
||||
.setCancelColor(Color.parseColor("#1189FF"))
|
||||
.setSubmitColor(Color.parseColor("#1189FF"))
|
||||
.isDialog(false)
|
||||
.setType(new boolean[]{true, true, true, true, true, true})
|
||||
.setTitleColor(Color.parseColor("#1189FF"))
|
||||
.build();
|
||||
mTimePickerView.show();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 上传文件
|
||||
*
|
||||
* @param paths
|
||||
*/
|
||||
private int mUploadCount = 0;
|
||||
|
||||
private void doUploadFiles(ArrayList<String> paths) {
|
||||
LogUtils.e(paths);
|
||||
|
||||
ProgressDialog progressDialog = UIUtil.initDialog(mActivity, "上传中...");
|
||||
progressDialog.show();
|
||||
List<Observable<BaseSuccessBean>> requests = new ArrayList<>();
|
||||
List<String> fileNames = new ArrayList<>();
|
||||
for (int i = 0; i < paths.size(); i++) {
|
||||
File file = new File(paths.get(i));
|
||||
Observable<BaseSuccessBean> observable = createObservable(file);
|
||||
fileNames.add(file.getName());
|
||||
if (observable == null) return;
|
||||
requests.add(observable);
|
||||
}
|
||||
Observable<BaseSuccessBean>[] observables1 = requests.toArray(new Observable[requests.size()]);
|
||||
|
||||
Observable.mergeArrayDelayError(observables1)
|
||||
.compose(RxTransformer.getTransformer())
|
||||
.subscribe(new Observer() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NotNull Object o) {
|
||||
++mUploadCount;
|
||||
mTvFileHint.setVisibility(View.GONE);
|
||||
if (o instanceof BaseSuccessBean) {
|
||||
--mFileMax;
|
||||
//刷新文件
|
||||
BaseSuccessBean bean = (BaseSuccessBean) o;
|
||||
AddFileBean fileBean = new AddFileBean();
|
||||
fileBean.setId(bean.getData());
|
||||
fileBean.setPath(BaseUrlApi.BASE_IMG_URL + bean.getData());
|
||||
fileBean.setFileType(1);
|
||||
fileBean.setFileName(fileNames.get(mUploadCount - 1));
|
||||
mFileBeans.add(0, fileBean);
|
||||
}
|
||||
mAddFileAdapter.notifyDataSetChanged();
|
||||
if (mUploadCount == paths.size()) {
|
||||
mUploadCount = 0;
|
||||
if (progressDialog.isShowing()) {
|
||||
progressDialog.dismiss();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
e.printStackTrace();
|
||||
mUploadCount = 0;
|
||||
if (progressDialog.isShowing()) {
|
||||
progressDialog.dismiss();
|
||||
}
|
||||
ToastUtils.show("上传失败,请稍后重试.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private Observable createObservable(File file) {
|
||||
LogUtils.e(file.exists());
|
||||
RequestBody requestFile = RequestBody.create(file, MediaType.parse("multipart/form-data"));
|
||||
MultipartBody.Part body;
|
||||
body = MultipartBody.Part.createFormData("file", file.getName(), requestFile);
|
||||
return RetrofitManager.getInstance()
|
||||
.create(BaseApiService.class)
|
||||
.uploadFile(body)
|
||||
.compose(RxTransformer.getTransformer());
|
||||
}
|
||||
|
||||
/**
|
||||
* 会议类型
|
||||
*/
|
||||
private void onShowType() {
|
||||
mActivity.hideSoftKeyboard();
|
||||
if (mTyps != null && mTyps.size() > 0) {
|
||||
if (mTypePicker == null) {
|
||||
mTypePicker = new OptionsPickerBuilder(mActivity, (o1, o2, o3, v) -> {
|
||||
mSelType = mTyps.get(o1);
|
||||
mTvType.setText(mSelType.getDataName());
|
||||
})
|
||||
.setTitleText("请选择")
|
||||
.setCancelColor(Color.parseColor("#1189FF"))
|
||||
.setSubmitColor(Color.parseColor("#1189FF"))
|
||||
.setTitleColor(Color.parseColor("#1189FF"))
|
||||
.build();
|
||||
mTypePicker.setPicker(mTyps);
|
||||
}
|
||||
mTypePicker.show();
|
||||
} else {
|
||||
getDicListByType(DicIds.DIC_MEETING_TYPE, 1);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 字典
|
||||
*/
|
||||
private void getDicListByType(String pId, int i) {
|
||||
ProgressDialog dialog = UIUtil.initDialog(mActivity, "获取中...");
|
||||
dialog.show();
|
||||
RetrofitManager.getInstance()
|
||||
.create(BaseApiService.class)
|
||||
.getDictListAllByPid(pId)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<List<DicBean>>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull List<DicBean> beans) {
|
||||
dialog.dismiss();
|
||||
if (beans.size() > 0) {
|
||||
switch (i) {
|
||||
case 1://会议室类型
|
||||
mTyps = beans;
|
||||
onShowType();
|
||||
break;
|
||||
|
||||
}
|
||||
} else {
|
||||
ToastUtils.show("暂无数据");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
dialog.dismiss();
|
||||
ExceptionHandler.handleException(e);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void doConfirm() {
|
||||
if (checkParams()) {
|
||||
ProgressDialog dialog = UIUtil.initDialog(mActivity, "提交中...");
|
||||
dialog.show();
|
||||
RequestBody body = buildParams();
|
||||
RetrofitManager.getInstance()
|
||||
.create(OAApi.class)
|
||||
.doSaveMeeting(body)
|
||||
.compose(RxTransformer.getTransformer())
|
||||
.subscribe(new Observer<BaseSuccessBean>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull BaseSuccessBean baseSuccessBean) {
|
||||
if (dialog.isShowing()) dialog.dismiss();
|
||||
ToastUtils.show("保存成功");
|
||||
BaseFragment preFragment = mMainActivity.getPreFragment();
|
||||
if (preFragment != null) {
|
||||
preFragment.mIsRefresh = true;
|
||||
}
|
||||
mMainActivity.backFragment(1, MeetingAddFragment.this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
if (dialog.isShowing()) dialog.dismiss();
|
||||
ExceptionHandler.handleException(e);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private RequestBody buildParams() {
|
||||
SaveMeetingBean bean = new SaveMeetingBean();
|
||||
String name = mEtName.getText().toString().trim();
|
||||
bean.setMeetingTitle(name);
|
||||
bean.setMeetingType(mSelType.getDataId());
|
||||
bean.setMeetingHostUserId(mSelEmcee.getUserId());
|
||||
bean.setMeetingHostUserName(mSelEmcee.getUserName());
|
||||
bean.setMeetingStartTime(mTvStartTime.getText().toString().trim());
|
||||
bean.setMeetingEndTime(mTvEndTime.getText().toString().trim());
|
||||
bean.setMeetingRoomId(mSelRoom.getRoomId());
|
||||
bean.setMeetingRoomName(mSelRoom.getRoomName());
|
||||
bean.setMeetingRoomType(mSelRoom.getRoomType());
|
||||
bean.setMeetingContent(mEtContent.getText().toString().trim());
|
||||
StringBuilder notice = new StringBuilder();
|
||||
if (mCbNoticeMsg.isChecked()) {
|
||||
notice.append("1").append(",");
|
||||
}
|
||||
if (mCbNoticeEmail.isChecked()) {
|
||||
notice.append("2");
|
||||
}
|
||||
if (!TextUtils.isEmpty(notice.toString().trim())) {
|
||||
bean.setMeetingNoticeType(notice.toString().trim());
|
||||
}
|
||||
StringBuilder ids = new StringBuilder();
|
||||
StringBuilder names = new StringBuilder();
|
||||
for (MeetingAttachListBean person : mJoinPerson) {
|
||||
if (TextUtils.isEmpty(person.getUserId())) continue;
|
||||
ids.append(person.getUserId()).append("_");
|
||||
names.append(person.getUserName()).append(",");
|
||||
}
|
||||
if (ids.toString().endsWith("_")) {
|
||||
String id = ids.substring(0, ids.toString().length() - 1);
|
||||
String jname = names.substring(0, names.toString().length() - 1);
|
||||
bean.setMeetingUserNames(jname);
|
||||
bean.setMeetingUserIds(id);
|
||||
}
|
||||
if (mFileBeans.size() > 0) {
|
||||
StringBuilder fileId = new StringBuilder();
|
||||
for (AddFileBean fileBean : mFileBeans) {
|
||||
if (!TextUtils.isEmpty(fileBean.getId())) {
|
||||
fileId.append(fileBean.getId()).append(",");
|
||||
}
|
||||
}
|
||||
if (fileId.toString().endsWith(",")) {
|
||||
fileId = new StringBuilder(fileId.substring(0, fileId.length() - 1));
|
||||
}
|
||||
bean.setMeetingFile(fileId.toString().trim());
|
||||
}
|
||||
LogUtils.e(bean);
|
||||
return RequestBody.create(new Gson().toJson(bean), MediaType.parse("application/json; charset=utf-8"));
|
||||
}
|
||||
|
||||
private boolean checkParams() {
|
||||
String name = mEtName.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(name)) {
|
||||
ToastUtils.show("请输入会议标题");
|
||||
return false;
|
||||
}
|
||||
if (mSelType == null) {
|
||||
ToastUtils.show("请选择会议类型");
|
||||
return false;
|
||||
}
|
||||
if (mSelEmcee == null) {
|
||||
ToastUtils.show("请选择主持人");
|
||||
return false;
|
||||
}
|
||||
String startTime = mTvStartTime.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(startTime)) {
|
||||
ToastUtils.show("请选择开始时间");
|
||||
return false;
|
||||
}
|
||||
String endTime = mTvEndTime.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(endTime)) {
|
||||
ToastUtils.show("请选择结束时间");
|
||||
return false;
|
||||
}
|
||||
if (mSelRoom == null) {
|
||||
ToastUtils.show("请选择要使用的会议室");
|
||||
return false;
|
||||
}
|
||||
if (mJoinPerson.size() <= 1) {
|
||||
ToastUtils.show("请选择参会人员");
|
||||
return false;
|
||||
}
|
||||
String contetn = mEtContent.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(contetn)) {
|
||||
ToastUtils.show("请输入会议内容");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void refreshView() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void loadMoreData() {
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,437 @@
|
||||
package com.tenlionsoft.oamodule.pad.fragments.home.meeting;
|
||||
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Bitmap;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.os.Environment;
|
||||
import android.provider.MediaStore;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.hjq.toast.ToastUtils;
|
||||
import com.tenlionsoft.baselib.constant.PathConfig;
|
||||
import com.tenlionsoft.baselib.core.beans.AddFileBean;
|
||||
import com.tenlionsoft.baselib.core.retrofit_net.BaseUrlApi;
|
||||
import com.tenlionsoft.baselib.core.retrofit_net.RetrofitManager;
|
||||
import com.tenlionsoft.baselib.core.retrofit_net.api.BaseApiService;
|
||||
import com.tenlionsoft.baselib.core.retrofit_net.bean.FileInfoBean;
|
||||
import com.tenlionsoft.baselib.core.retrofit_net.conver.RxTransformer;
|
||||
import com.tenlionsoft.baselib.core.widget.base.AddFileAdapter;
|
||||
import com.tenlionsoft.baselib.core.widget.base.BaseFragment;
|
||||
import com.tenlionsoft.baselib.core.widget.views.QrDialog;
|
||||
import com.tenlionsoft.baselib.utils.ExceptionHandler;
|
||||
import com.tenlionsoft.baselib.utils.FileUtils;
|
||||
import com.tenlionsoft.baselib.utils.UIUtil;
|
||||
import com.tenlionsoft.oamodule.R;
|
||||
import com.tenlionsoft.oamodule.R2;
|
||||
import com.tenlionsoft.oamodule.adapter.BasePersonShowAdapter;
|
||||
import com.tenlionsoft.oamodule.beans.MeetingAttachListBean;
|
||||
import com.tenlionsoft.oamodule.beans.MeetingQrBean;
|
||||
import com.tenlionsoft.oamodule.beans.MeetingRoomRecordBean;
|
||||
import com.tenlionsoft.oamodule.beans.PersonShowBean;
|
||||
import com.tenlionsoft.oamodule.net.OAApi;
|
||||
import com.tenlionsoft.oamodule.pad.activitys.home.PadMainActivity;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import io.reactivex.rxjava3.core.Observer;
|
||||
import io.reactivex.rxjava3.disposables.Disposable;
|
||||
|
||||
import static com.tenlionsoft.baselib.core.widget.PhotoActivity.TAG_IMGURL;
|
||||
|
||||
/**
|
||||
* 作者: adam
|
||||
* 日期: 2022/5/9 - 15:20
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述: 会议详情
|
||||
*/
|
||||
@Route(path = PathConfig.PATH_MODULE_PAD_OA_FRAGMENT_MEETING_DETAIL)
|
||||
public class MeetingDetailFragment extends BaseFragment {
|
||||
@BindView(R2.id.tv_name)
|
||||
TextView mTvName;
|
||||
@BindView(R2.id.tv_type)
|
||||
TextView mTvType;
|
||||
@BindView(R2.id.tv_emcee)
|
||||
TextView mTvEmcee;
|
||||
@BindView(R2.id.tv_start_time)
|
||||
TextView mTvStartTime;
|
||||
@BindView(R2.id.tv_end_time)
|
||||
TextView mTvEndTime;
|
||||
@BindView(R2.id.tv_room)
|
||||
TextView mTvRoom;
|
||||
@BindView(R2.id.cb_notice_msg)
|
||||
CheckBox mCbNoticeMsg;
|
||||
@BindView(R2.id.cb_notice_email)
|
||||
CheckBox mCbNoticeEmail;
|
||||
@BindView(R2.id.btn_qr)
|
||||
Button mBtnQr;
|
||||
@BindView(R2.id.rlv_join)
|
||||
RecyclerView mRlvJoin;
|
||||
@BindView(R2.id.tv_content)
|
||||
TextView mTvContent;
|
||||
@BindView(R2.id.rlv_files)
|
||||
RecyclerView mRlvFiles;
|
||||
@BindView(R2.id.tv_file_hint)
|
||||
TextView mTvFileHint;
|
||||
|
||||
private String mId;
|
||||
private List<PersonShowBean> mJoinPerson;
|
||||
private BasePersonShowAdapter mPersonShowAdapter;
|
||||
private String mQr;
|
||||
private String mQrName;
|
||||
private PadMainActivity mMainActivity;
|
||||
|
||||
@Override
|
||||
protected int getContentViewId() {
|
||||
return R.layout.fragment_meeting_detail;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setDataToView(View dataView) {
|
||||
ButterKnife.bind(this, dataView);
|
||||
setTitleView(true);
|
||||
mTvFragmentTitle.setText("会议详情");
|
||||
mIvFragmentBack.setOnClickListener(v -> mMainActivity.backFragment(1, this));
|
||||
Bundle bundle = getArguments();
|
||||
String type = "";
|
||||
if (bundle != null) {
|
||||
mId = bundle.getString("id");
|
||||
type = bundle.getString("type");
|
||||
}
|
||||
|
||||
if ("mine".equals(type)) {
|
||||
mBtnQr.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
mBtnQr.setVisibility(View.GONE);
|
||||
}
|
||||
if (TextUtils.isEmpty(mId)) {
|
||||
ToastUtils.show("数据有误");
|
||||
mMainActivity.backFragment(1, this);
|
||||
} else {
|
||||
getMeetingDetail();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onAttach(@NonNull @NotNull Context context) {
|
||||
super.onAttach(context);
|
||||
mMainActivity = (PadMainActivity) getActivity();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取会议详情
|
||||
*/
|
||||
private void getMeetingDetail() {
|
||||
RetrofitManager.getInstance()
|
||||
.create(OAApi.class)
|
||||
.getMeetingDetail(mId)
|
||||
.compose(RxTransformer.getTransformer())
|
||||
.subscribe(new Observer<MeetingRoomRecordBean>() {
|
||||
@Override
|
||||
public void onSubscribe(@io.reactivex.rxjava3.annotations.NonNull Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@io.reactivex.rxjava3.annotations.NonNull MeetingRoomRecordBean meetingRoomRecordBean) {
|
||||
setDataToView(meetingRoomRecordBean);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@io.reactivex.rxjava3.annotations.NonNull Throwable e) {
|
||||
setStateView(STATE_ERROR);
|
||||
ExceptionHandler.handleException(e);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 回显数据
|
||||
*/
|
||||
private void setDataToView(MeetingRoomRecordBean b) {
|
||||
setStateView(STATE_SUCCESS);
|
||||
mSrlView.setEnableLoadMore(false);
|
||||
mSrlView.setEnableRefresh(false);
|
||||
mTvName.setText(b.getMeetingTitle());
|
||||
mTvType.setText(b.getMeetingTypeName());
|
||||
mTvEmcee.setText(b.getMeetingHostUserName());
|
||||
mTvStartTime.setText(b.getMeetingStartTime());
|
||||
mTvEndTime.setText(b.getMeetingEndTime());
|
||||
mTvRoom.setText(b.getMeetingRoomName());
|
||||
if (!TextUtils.isEmpty(b.getMeetingNoticeType())) {
|
||||
if (b.getMeetingNoticeType().contains("1")) mCbNoticeMsg.setChecked(true);
|
||||
if (b.getMeetingNoticeType().contains("2")) mCbNoticeEmail.setChecked(true);
|
||||
}
|
||||
if (!TextUtils.isEmpty(b.getMeetingUserIds())) {
|
||||
//获取参会人员
|
||||
getMeetingAttachList();
|
||||
}
|
||||
mTvContent.setText(b.getMeetingContent());
|
||||
|
||||
//文件
|
||||
if (!TextUtils.isEmpty(b.getMeetingFile())) {
|
||||
mRlvFiles.setVisibility(View.VISIBLE);
|
||||
mTvFileHint.setVisibility(View.GONE);
|
||||
doGetFileInfo(b.getMeetingFile(), null);
|
||||
} else {
|
||||
mRlvFiles.setVisibility(View.GONE);
|
||||
mTvFileHint.setVisibility(View.VISIBLE);
|
||||
}
|
||||
mBtnQr.setOnClickListener(v -> onShowQr());
|
||||
}
|
||||
|
||||
private void onShowQr() {
|
||||
if (TextUtils.isEmpty(mQr)) {
|
||||
doGetQr();
|
||||
} else {
|
||||
QrDialog dialog = new QrDialog.DialogBuilder(mActivity)
|
||||
.setQr(mQr)
|
||||
.build();
|
||||
dialog.addOnChangeListener(b -> {
|
||||
if (null != b) {
|
||||
dialog.dismiss();
|
||||
doSaveBitMapToMedia(b);
|
||||
} else {
|
||||
ToastUtils.show("保存失败");
|
||||
}
|
||||
});
|
||||
dialog.show();
|
||||
}
|
||||
}
|
||||
|
||||
private void doGetFileInfo(String fileId, List<AddFileBean> files) {
|
||||
ProgressDialog dialog = UIUtil.initDialog(mActivity, "获取中...");
|
||||
dialog.show();
|
||||
RetrofitManager.getInstance()
|
||||
.create(BaseApiService.class)
|
||||
.getFileInfoList(fileId)
|
||||
.compose(RxTransformer.getTransformer())
|
||||
.subscribe(new Observer<List<FileInfoBean>>() {
|
||||
|
||||
|
||||
@Override
|
||||
public void onSubscribe(@io.reactivex.rxjava3.annotations.NonNull Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@io.reactivex.rxjava3.annotations.NonNull List<FileInfoBean> fileInfoBeans) {
|
||||
if (dialog.isShowing()) dialog.dismiss();
|
||||
if (fileInfoBeans.size() > 0) {
|
||||
List<AddFileBean> mFiles = new ArrayList<>();
|
||||
for (int i = 0; i < fileInfoBeans.size(); i++) {
|
||||
FileInfoBean infoBean = fileInfoBeans.get(i);
|
||||
AddFileBean bean = new AddFileBean();
|
||||
bean.setId(infoBean.getFileId());
|
||||
bean.setPath(BaseUrlApi.BASE_IMG_URL + infoBean.getFileId());
|
||||
bean.setFileType(FileUtils.getFileType(infoBean.getFileName()));
|
||||
bean.setFileName(infoBean.getFileName());
|
||||
mFiles.add(bean);
|
||||
}
|
||||
AddFileAdapter adapter = new AddFileAdapter(mActivity, mFiles);
|
||||
mRlvFiles.setLayoutManager(new LinearLayoutManager(mActivity));
|
||||
mRlvFiles.setAdapter(adapter);
|
||||
adapter.addOnItemClickListener(addFileBean -> previewFile(addFileBean, mFiles));
|
||||
} else {
|
||||
ToastUtils.show("未找到文档信息");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@io.reactivex.rxjava3.annotations.NonNull Throwable e) {
|
||||
if (dialog.isShowing()) dialog.dismiss();
|
||||
ExceptionHandler.handleException(e);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 预览文件
|
||||
*/
|
||||
private void previewFile(AddFileBean addFileBean, List<AddFileBean> mFiles) {
|
||||
if (addFileBean.getFileType() == 1) {
|
||||
//文档
|
||||
ARouter.getInstance()
|
||||
.build(PathConfig.PATH_MODULE_BASELIB_ACTIVITY_PREVIEW_FILE)
|
||||
.withString("fileName", addFileBean.getFileName())
|
||||
.withString("fileId", addFileBean.getId())
|
||||
.navigation();
|
||||
} else if (2 == addFileBean.getFileType()) {
|
||||
//图片预览
|
||||
//遍历文件获取所有图片文件
|
||||
ArrayList<String> imgUrls = new ArrayList<>();
|
||||
for (int i = 0; i < mFiles.size(); i++) {
|
||||
if (mFiles.get(i).getFileType() == 2) {
|
||||
AddFileBean fileBean = mFiles.get(i);
|
||||
String url = BaseUrlApi.BASE_IMG_URL + fileBean.getId();
|
||||
imgUrls.add(url);
|
||||
}
|
||||
}
|
||||
ARouter.getInstance()
|
||||
.build(PathConfig.PATH_MODULE_BASELIB_SHOW_IMG)
|
||||
.withStringArrayList(TAG_IMGURL, imgUrls)
|
||||
.navigation();
|
||||
} else if (3 == addFileBean.getFileType() || 4 == addFileBean.getFileType()) {
|
||||
//TODO 视频或音频预览
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存图片到相册
|
||||
*
|
||||
* @param b
|
||||
*/
|
||||
private void doSaveBitMapToMedia(Bitmap b) {
|
||||
ProgressDialog dialog = UIUtil.initDialog(mActivity, "保存中...");
|
||||
dialog.show();
|
||||
String imageName = mQrName + "code.png";
|
||||
File f = mActivity.getExternalFilesDir(Environment.DIRECTORY_PICTURES);
|
||||
File file = new File(f.getPath() + "/" + imageName);
|
||||
try {
|
||||
FileOutputStream fileOutputStream = new FileOutputStream(file);
|
||||
b.compress(Bitmap.CompressFormat.PNG, 100, fileOutputStream);
|
||||
fileOutputStream.flush();
|
||||
fileOutputStream.close();
|
||||
Log.e("写入成功!位置目录", f.getPath() + "/" + imageName);
|
||||
} catch (FileNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
if (dialog.isShowing()) dialog.dismiss();
|
||||
ToastUtils.show("保存失败");
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
if (dialog.isShowing()) dialog.dismiss();
|
||||
ToastUtils.show("保存失败");
|
||||
}
|
||||
try {
|
||||
MediaStore.Images.Media.insertImage(mActivity.getContentResolver(),
|
||||
file.getAbsolutePath(), imageName, null);
|
||||
if (dialog.isShowing()) dialog.dismiss();
|
||||
ToastUtils.show("保存成功");
|
||||
} catch (FileNotFoundException e) {
|
||||
if (dialog.isShowing()) dialog.dismiss();
|
||||
ToastUtils.show("保存失败");
|
||||
e.printStackTrace();
|
||||
}
|
||||
// 最后通知图库更新
|
||||
mActivity.sendBroadcast(new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE,
|
||||
Uri.fromFile(new File(file.getPath()))));
|
||||
}
|
||||
|
||||
private void doGetQr() {
|
||||
ProgressDialog dialog = UIUtil.initDialog(mActivity, "获取中...");
|
||||
dialog.show();
|
||||
RetrofitManager.getInstance()
|
||||
.create(OAApi.class)
|
||||
.getMeetingSignQr(mId)
|
||||
.compose(RxTransformer.getTransformer())
|
||||
.subscribe(new Observer<MeetingQrBean>() {
|
||||
@Override
|
||||
public void onSubscribe(@io.reactivex.rxjava3.annotations.NonNull Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@io.reactivex.rxjava3.annotations.NonNull MeetingQrBean meetingQrBean) {
|
||||
if (dialog.isShowing()) dialog.dismiss();
|
||||
if (TextUtils.isEmpty(meetingQrBean.getQrId())) {
|
||||
ToastUtils.show("未获取到签到码,请稍后重试");
|
||||
} else {
|
||||
mQr = meetingQrBean.getQrId();
|
||||
mQrName = meetingQrBean.getQrName();
|
||||
onShowQr();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@io.reactivex.rxjava3.annotations.NonNull Throwable e) {
|
||||
if (dialog.isShowing()) dialog.dismiss();
|
||||
ExceptionHandler.handleException(e);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void getMeetingAttachList() {
|
||||
ProgressDialog dialog = UIUtil.initDialog(mActivity, "获取中...");
|
||||
dialog.show();
|
||||
RetrofitManager.getInstance()
|
||||
.create(OAApi.class)
|
||||
.getMeetingAttachList(mId)
|
||||
.compose(RxTransformer.getTransformer())
|
||||
.subscribe(new Observer<List<MeetingAttachListBean>>() {
|
||||
@Override
|
||||
public void onSubscribe(@io.reactivex.rxjava3.annotations.NonNull Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@io.reactivex.rxjava3.annotations.NonNull List<MeetingAttachListBean> meetingAttachListBeans) {
|
||||
if (dialog.isShowing()) dialog.dismiss();
|
||||
mJoinPerson = new ArrayList<>();
|
||||
mPersonShowAdapter = new BasePersonShowAdapter(mActivity, meetingAttachListBeans, 2);
|
||||
mRlvJoin.setLayoutManager(new GridLayoutManager(mActivity, 5));
|
||||
mRlvJoin.setAdapter(mPersonShowAdapter);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@io.reactivex.rxjava3.annotations.NonNull Throwable e) {
|
||||
if (dialog.isShowing()) dialog.dismiss();
|
||||
ExceptionHandler.handleException(e);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void refreshView() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void loadMoreData() {
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,165 @@
|
||||
package com.tenlionsoft.oamodule.pad.fragments.home.meeting;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.View;
|
||||
import android.view.inputmethod.EditorInfo;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.RadioButton;
|
||||
import android.widget.RadioGroup;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.tenlionsoft.baselib.constant.PathConfig;
|
||||
import com.tenlionsoft.baselib.core.beans.OperateBean;
|
||||
import com.tenlionsoft.baselib.core.widget.base.BaseFragment;
|
||||
import com.tenlionsoft.baselib.core.widget.base.BaseViewPage2Adapter;
|
||||
import com.tenlionsoft.baselib.core.widget.base.FragmentUtils;
|
||||
import com.tenlionsoft.baselib.utils.LogUtils;
|
||||
import com.tenlionsoft.oamodule.R;
|
||||
import com.tenlionsoft.oamodule.R2;
|
||||
import com.tenlionsoft.oamodule.pad.activitys.home.PadMainActivity;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.viewpager2.widget.ViewPager2;
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
|
||||
/**
|
||||
* 作者: adam
|
||||
* 日期: 2022/5/9 - 14:03
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述:
|
||||
*/
|
||||
@Route(path = PathConfig.PATH_MODULE_PAD_OA_FRAGMENT_MEETING)
|
||||
public class MeetingFragment extends BaseFragment {
|
||||
@BindView(R2.id.iv_back)
|
||||
ImageView mIvBack;
|
||||
@BindView(R2.id.rb_join)
|
||||
RadioButton mRbJoin;
|
||||
@BindView(R2.id.rb_emcee)
|
||||
RadioButton mRbEmcee;
|
||||
@BindView(R2.id.rb_apply)
|
||||
RadioButton mRbApply;
|
||||
@BindView(R2.id.rg_type)
|
||||
RadioGroup mRgType;
|
||||
@BindView(R2.id.iv_control)
|
||||
ImageView mIvControl;
|
||||
@BindView(R2.id.rl_content_title)
|
||||
RelativeLayout mRlContentTitle;
|
||||
@BindView(R2.id.et_base_search_cancel)
|
||||
EditText mEtBaseSearchCancel;
|
||||
@BindView(R2.id.tv_base_search_cancel)
|
||||
TextView mTvBaseSearchCancel;
|
||||
@BindView(R2.id.ll_base_search_cancel)
|
||||
LinearLayout mLlBaseSearchCancel;
|
||||
@BindView(R2.id.vp_content)
|
||||
ViewPager2 mVpContent;
|
||||
private List<BaseFragment> mFragments;
|
||||
private List<OperateBean> mControls;
|
||||
private String mKeywords;
|
||||
private PadMainActivity mMainActivity;
|
||||
|
||||
@Override
|
||||
protected int getContentViewId() {
|
||||
return R.layout.fragment_meeting;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setDataToView(View dataView) {
|
||||
ButterKnife.bind(this, dataView);
|
||||
setStateView(STATE_SUCCESS);
|
||||
mSrlView.setEnableLoadMore(false);
|
||||
mSrlView.setEnableRefresh(false);
|
||||
initViews();
|
||||
}
|
||||
|
||||
private void initViews() {
|
||||
mIvBack.setOnClickListener(v -> mMainActivity.backFragment(1, this));
|
||||
mIvControl.setOnClickListener(v -> {
|
||||
BaseFragment fragment = FragmentUtils.getFragment(PathConfig.PATH_MODULE_PAD_OA_FRAGMENT_MEETING_ADD);
|
||||
mMainActivity.addFragment(1, fragment);
|
||||
});
|
||||
|
||||
mRgType.setOnCheckedChangeListener((group, checkedId) -> {
|
||||
if (checkedId == R.id.rb_join) {
|
||||
mVpContent.setCurrentItem(0, false);
|
||||
} else if (checkedId == R.id.rb_emcee) {
|
||||
mVpContent.setCurrentItem(1, false);
|
||||
} else if (checkedId == R.id.rb_apply) {
|
||||
mVpContent.setCurrentItem(2, false);
|
||||
}
|
||||
mEtBaseSearchCancel.setText("");
|
||||
mKeywords = "";
|
||||
});
|
||||
mFragments = new ArrayList<>();
|
||||
BaseFragment joinFragment = FragmentUtils.getFragment(PathConfig.PATH_MODULE_OA_FRAGMENT_JOIN_MEETING);
|
||||
BaseFragment emceeFragment = FragmentUtils.getFragment(PathConfig.PATH_MODULE_OA_FRAGMENT_EMCEE_MEETING);
|
||||
BaseFragment mineApplyFragment = FragmentUtils.getFragment(PathConfig.PATH_MODULE_OA_FRAGMENT_MINE_APPLY_MEETING);
|
||||
mFragments.add(joinFragment);//我参加的会议
|
||||
mFragments.add(emceeFragment);//我主持的会议
|
||||
mFragments.add(mineApplyFragment);//我发起的会议
|
||||
|
||||
mVpContent.setAdapter(new BaseViewPage2Adapter(mActivity, mFragments));
|
||||
mVpContent.setUserInputEnabled(false);
|
||||
|
||||
mEtBaseSearchCancel.setOnEditorActionListener((v, actionId, event) -> {
|
||||
LogUtils.e("搜索==" + actionId);
|
||||
if (actionId == EditorInfo.IME_ACTION_SEARCH) {
|
||||
mActivity.hideSoftKeyboard();
|
||||
mEtBaseSearchCancel.clearFocus();
|
||||
mKeywords = v.getText().toString();
|
||||
doRefresh();
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
mTvBaseSearchCancel.setOnClickListener(v -> {
|
||||
mEtBaseSearchCancel.setText("");
|
||||
mEtBaseSearchCancel.clearFocus();
|
||||
mKeywords = "";
|
||||
doRefresh();
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAttach(@NonNull @NotNull Context context) {
|
||||
super.onAttach(context);
|
||||
mMainActivity = (PadMainActivity) getActivity();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onHiddenChanged(boolean hidden) {
|
||||
super.onHiddenChanged(hidden);
|
||||
if (!hidden) {
|
||||
if (mIsRefresh) {
|
||||
mIsRefresh = false;
|
||||
doRefresh();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void doRefresh() {
|
||||
//刷新fragment
|
||||
mFragments.get(mVpContent.getCurrentItem()).refreshContentView(mKeywords);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void refreshView() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void loadMoreData() {
|
||||
|
||||
}
|
||||
}
|
126
oamodule/src/main/res/layout/fragment_meeting.xml
Normal file
126
oamodule/src/main/res/layout/fragment_meeting.xml
Normal file
@ -0,0 +1,126 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/gray_f0"
|
||||
android:orientation="vertical"
|
||||
tools:context=".activity.meeting.MeetingCenterActivity">
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_content_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:background="@color/white"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingRight="5dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_back"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:background="@drawable/ic_back_black"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:maxLength="8"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingBottom="5dp"
|
||||
android:scaleType="fitXY"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="13sp"
|
||||
android:visibility="visible"
|
||||
tools:text=""
|
||||
tools:visibility="visible" />
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_centerVertical="true">
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/rg_type"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:orientation="horizontal">
|
||||
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_join"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/switch_custom_gray_white"
|
||||
android:button="@null"
|
||||
android:checked="true"
|
||||
android:gravity="center"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingRight="10dp"
|
||||
android:paddingBottom="5dp"
|
||||
android:text="我参加的"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_emcee"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/switch_custom_gray_white"
|
||||
android:button="@null"
|
||||
android:gravity="center"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingRight="10dp"
|
||||
android:paddingBottom="5dp"
|
||||
android:text="我主持的"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_apply"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/switch_custom_gray_white"
|
||||
android:button="@null"
|
||||
android:gravity="center"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingRight="10dp"
|
||||
android:paddingBottom="5dp"
|
||||
android:text="我发起的"
|
||||
android:textStyle="bold" />
|
||||
</RadioGroup>
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_control"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:src="@drawable/ic_icon_add" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<include layout="@layout/layout_base_search_cancel" />
|
||||
|
||||
<androidx.viewpager2.widget.ViewPager2
|
||||
android:id="@+id/vp_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
</LinearLayout>
|
378
oamodule/src/main/res/layout/fragment_meeting_add.xml
Normal file
378
oamodule/src/main/res/layout/fragment_meeting_add.xml
Normal file
@ -0,0 +1,378 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/gray_f0"
|
||||
android:orientation="vertical"
|
||||
tools:context=".activity.car.ByCarAddActivity">
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginBottom="105dp"
|
||||
android:background="@color/white"
|
||||
android:scrollbars="none">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingBottom="10dp">
|
||||
|
||||
<LinearLayout style="@style/item_hor_content">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="会议标题"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:background="@null"
|
||||
android:gravity="right"
|
||||
android:hint="请输入会议标题"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_hor_content">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="会议类型"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_type"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:clickable="true"
|
||||
android:drawableRight="@drawable/ic_arrow_right"
|
||||
android:focusable="true"
|
||||
android:gravity="right"
|
||||
android:hint="请选择会议类型"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_hor_content">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="主持人"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_emcee"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:clickable="true"
|
||||
android:drawableRight="@drawable/ic_arrow_right"
|
||||
android:focusable="true"
|
||||
android:gravity="right"
|
||||
android:hint="请选择会议主持人"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_hor_content">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="开始时间"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_start_time"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:clickable="true"
|
||||
android:drawableRight="@drawable/ic_arrow_right"
|
||||
android:focusable="true"
|
||||
android:gravity="right"
|
||||
android:hint="请选择会议开始时间"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_hor_content">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="结束时间"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_end_time"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:clickable="true"
|
||||
android:drawableRight="@drawable/ic_arrow_right"
|
||||
android:focusable="true"
|
||||
android:gravity="right"
|
||||
android:hint="请选择会议结束时间"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_hor_content">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="会议室"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_room"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:clickable="true"
|
||||
android:drawableRight="@drawable/ic_arrow_right"
|
||||
android:focusable="true"
|
||||
android:gravity="right"
|
||||
android:hint="请选择会议室"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_hor_content">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="通知方式"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="right"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/cb_notice_msg"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="10dp"
|
||||
android:background="@drawable/shape_rectangle_white_gray_border"
|
||||
android:button="@null"
|
||||
android:drawableLeft="@drawable/sel_checkbox_blue_gray"
|
||||
android:drawablePadding="5dp"
|
||||
android:padding="5dp"
|
||||
android:text="短信" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/cb_notice_email"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/shape_rectangle_white_gray_border"
|
||||
android:button="@null"
|
||||
android:drawableLeft="@drawable/sel_checkbox_blue_gray"
|
||||
android:drawablePadding="5dp"
|
||||
android:padding="5dp"
|
||||
android:text="邮件" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingBottom="10dp">
|
||||
|
||||
<LinearLayout style="@style/item_ver">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="参会人员"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/shp_rectangle_gray">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rlv_join"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintHeight_default="wrap"
|
||||
app:layout_constraintHeight_max="200dp"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:itemCount="50"
|
||||
tools:layoutManager="GridLayoutManager"
|
||||
tools:listitem="@layout/item_person_base_show"
|
||||
tools:spanCount="5" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingBottom="10dp">
|
||||
|
||||
<LinearLayout style="@style/item_ver">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="会议内容"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@drawable/shp_rectangle_gray"
|
||||
android:orientation="vertical">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:background="@null"
|
||||
android:gravity="left"
|
||||
android:hint="请输入会议内容"
|
||||
android:minLines="3"
|
||||
android:padding="5dp"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingBottom="10dp">
|
||||
|
||||
<LinearLayout style="@style/item_ver">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="会议文件"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@drawable/shp_rectangle_gray"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rlv_files"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
tools:itemCount="3" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_file_hint"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:hint="会议文件"
|
||||
android:padding="20dp"
|
||||
android:textSize="@dimen/text_14" />
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:background="@color/white"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:padding="10dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_add_file"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:src="@drawable/ic_add_file_link" />
|
||||
</LinearLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_confirm"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginBottom="3dp"
|
||||
android:background="@drawable/sel_btn_submit_no_size"
|
||||
android:text="提交申请"
|
||||
android:textColor="@color/col_white_gray_press" />
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
365
oamodule/src/main/res/layout/fragment_meeting_detail.xml
Normal file
365
oamodule/src/main/res/layout/fragment_meeting_detail.xml
Normal file
@ -0,0 +1,365 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/gray_f0"
|
||||
android:orientation="vertical"
|
||||
tools:context=".activity.car.ByCarAddActivity">
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="10dp"
|
||||
android:background="@color/white"
|
||||
android:scrollbars="none">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingBottom="10dp">
|
||||
|
||||
<LinearLayout style="@style/item_hor_content">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="会议标题"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:background="@null"
|
||||
android:gravity="right"
|
||||
android:hint="未录入"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_hor_content">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="会议类型"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_type"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:gravity="right"
|
||||
android:hint="未录入"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_hor_content">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="主持人"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_emcee"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:gravity="right"
|
||||
android:hint="未录入"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_hor_content">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="开始时间"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_start_time"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:gravity="right"
|
||||
android:hint="未录入"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_hor_content">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="结束时间"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_end_time"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:gravity="right"
|
||||
android:hint="未录入"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_hor_content">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="会议室"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_room"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:gravity="right"
|
||||
android:hint="未录入"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_hor_content">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="通知方式"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="right"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/cb_notice_msg"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="10dp"
|
||||
android:background="@drawable/shape_rectangle_white_gray_border"
|
||||
android:button="@null"
|
||||
android:drawableLeft="@drawable/sel_checkbox_blue_gray"
|
||||
android:drawablePadding="5dp"
|
||||
android:enabled="false"
|
||||
android:padding="5dp"
|
||||
android:text="短信" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/cb_notice_email"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/shape_rectangle_white_gray_border"
|
||||
android:button="@null"
|
||||
android:drawableLeft="@drawable/sel_checkbox_blue_gray"
|
||||
android:drawablePadding="5dp"
|
||||
android:enabled="false"
|
||||
android:padding="5dp"
|
||||
android:text="邮件" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@color/white"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingBottom="10dp">
|
||||
|
||||
<LinearLayout style="@style/item_ver">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="参会人员"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_qr"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:background="@drawable/sel_btn_submit_no_size"
|
||||
android:minWidth="0dp"
|
||||
android:minHeight="0dp"
|
||||
android:padding="5dp"
|
||||
android:text="签到码"
|
||||
android:textColor="@color/col_white_gray_press"
|
||||
android:textSize="@dimen/text_14" />
|
||||
</RelativeLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@drawable/shp_rectangle_gray">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rlv_join"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="5dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintHeight_default="wrap"
|
||||
app:layout_constraintHeight_max="200dp"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:itemCount="50"
|
||||
tools:layoutManager="GridLayoutManager"
|
||||
tools:listitem="@layout/item_person_base_show"
|
||||
tools:spanCount="4" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@color/white"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingBottom="10dp">
|
||||
|
||||
<LinearLayout style="@style/item_ver">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="会议内容"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@drawable/shp_rectangle_gray"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:background="@null"
|
||||
android:gravity="left"
|
||||
android:hint="未录入"
|
||||
android:minLines="3"
|
||||
android:padding="5dp"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@color/white"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingBottom="10dp">
|
||||
|
||||
<LinearLayout style="@style/item_ver">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="会议文件"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@drawable/shp_rectangle_gray"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rlv_files"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
tools:itemCount="3"
|
||||
tools:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_file_hint"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:padding="20dp"
|
||||
android:text="未录入" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
</RelativeLayout>
|
@ -9,9 +9,9 @@
|
||||
android:id="@+id/srl_meeting"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginRight="10dp">
|
||||
android:layout_marginRight="5dp">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
@ -20,7 +20,8 @@
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rlv_meeting"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_hint"
|
||||
|
Loading…
Reference in New Issue
Block a user