package com.example.smart.util import android.app.Activity import android.app.ActivityOptions import android.content.Intent import android.net.Uri import android.os.Environment import com.example.basecore.util.SchemeUtils import com.example.smart.MyApp const val loginScheme = SchemeUtils.rootUrl + "/login" const val mainScheme = SchemeUtils.rootUrl + "/main" /** * feed */ const val feedScheme = SchemeUtils.rootUrl + "/home" /** * 查询页 */ const val queryScheme = SchemeUtils.rootUrl + "/query" /** * 签到页 */ const val signScheme = SchemeUtils.rootUrl + "/sign" /** * 项目详情页 */ const val projectScheme = SchemeUtils.rootUrl + "/project" /** * 计划详情页 */ const val planScheme = SchemeUtils.rootUrl + "/plan" /** * 图片查看页 */ const val viewerScheme = SchemeUtils.rootUrl + "/viewer" /** * 员工签到 */ const val sign_default_param = "?type=DEFAULT" /** * 项目签到 */ const val signProject = SchemeUtils.rootUrl + "/work_sign" /** * 新建任务 */ const val createItemScheme = SchemeUtils.rootUrl + "/create_item" /** * 新建计划 */ const val createPlanScheme = SchemeUtils.rootUrl + "/create_plan" /** * 新建施工 */ const val createWorkScheme = SchemeUtils.rootUrl + "/create_work" /** * 联系人 */ const val contactsScheme = SchemeUtils.rootUrl + "/contact" /** * 项目问题&正确做法 */ const val projectEventScheme = SchemeUtils.rootUrl + "/project_event" const val tab_select_size = 15 const val tab_unselect_size = 15 //手机自带扩展外存卡 //null 传入到file文件夹下,Picture为图片 val filePath = MyApp.app.getExternalFilesDir(null)?.absolutePath + "/download" val picPath = MyApp.app.getExternalFilesDir(Environment.DIRECTORY_PICTURES)?.absolutePath fun openImageViewerScheme(activity: Activity, paths: ArrayList, position: Int = 0) { val uri = Uri.parse(viewerScheme) val intent = Intent(Intent.ACTION_VIEW, uri) intent.putStringArrayListExtra("path", paths) intent.putExtra("position", position) val bundle = ActivityOptions.makeSceneTransitionAnimation(activity).toBundle() activity.startActivity(intent, bundle) }