我的相关页面,以及三方组件升级

This commit is contained in:
lijia 2024-02-01 15:49:33 +08:00
parent f17dde3f09
commit 0495f115ed
46 changed files with 2400 additions and 78 deletions

View File

@ -3,7 +3,7 @@
xmlns:tools="http://schemas.android.com/tools"
package="com.dahe.gldriver">
<!-- //地图SDK包含其搜索功能需要的基础权限-->
<!-- //地图SDK包含其搜索功能需要的基础权限-->
<!--允许程序打开网络套接字-->
<uses-permission android:name="android.permission.INTERNET" />
<!--允许程序设置内置sd卡的写权限-->
@ -15,6 +15,36 @@
<!--允许程序访问CellID或WiFi热点来获取粗略的位置-->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_MEDIA_STORAGE" />
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.VIBRATE" />
<!-- Android 13版本适配细化存储权限-->
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
<uses-permission android:name="android.permission.READ_MEDIA_AUDIO" />
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO" />
<!-- 安卓11使用相机 -->
<queries package="${applicationId}">
<intent>
<action android:name="android.media.action.IMAGE_CAPTURE">
</action>
</intent>
<intent>
<action android:name="android.media.action.ACTION_VIDEO_CAPTURE">
</action>
</intent>
</queries>
<application
android:name=".base.App"
android:allowBackup="true"
@ -42,8 +72,9 @@
android:name="android.notch_support"
android:value="true" />
<meta-data android:name="com.amap.api.v2.apikey"
android:value="e0c32c80b14f78b770b3671add9c4515"/>
<meta-data
android:name="com.amap.api.v2.apikey"
android:value="e0c32c80b14f78b770b3671add9c4515" />
<activity
@ -62,6 +93,12 @@
</activity>
<activity
android:name=".base.WebActivity"
android:configChanges="keyboardHidden|orientation|locale"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustPan|stateHidden" />
<activity
android:name=".ui.HomeActivity"
android:configChanges="keyboardHidden|orientation|locale"
@ -179,6 +216,30 @@
android:windowSoftInputMode="adjustPan|stateHidden" />
<!-- 运单相关end -->
<!-- 我的相关start -->
<activity
android:name=".ui.mine.activity.CarsManActivity"
android:configChanges="keyboardHidden|orientation|locale"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustPan|stateHidden" />
<activity
android:name=".ui.mine.activity.WalletActivity"
android:configChanges="keyboardHidden|orientation|locale"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustPan|stateHidden" />
<activity
android:name=".ui.mine.activity.RulesActivity"
android:configChanges="keyboardHidden|orientation|locale"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustPan|stateHidden" />
<activity
android:name=".ui.account.authperson.AuthPartyActivity"
android:configChanges="keyboardHidden|orientation|locale"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustPan|stateHidden" />
<!-- 我的相关end -->
</application>
</manifest>

View File

@ -0,0 +1,31 @@
package com.dahe.gldriver.adapter
import android.content.Context
import android.view.ViewGroup
import android.widget.Button
import com.chad.library.adapter4.BaseQuickAdapter
import com.chad.library.adapter4.viewholder.QuickViewHolder
import com.dahe.gldriver.R
import com.dahe.glex.bean.WayBillBean
/**
* @ClassName WaybillAdapter
* @Author 用户
* @Date 2024/1/23 16:27
* @Description TODO
*/
class CarsAdapter :
BaseQuickAdapter<WayBillBean, QuickViewHolder>() {
override fun onBindViewHolder(holder: QuickViewHolder, position: Int, item: WayBillBean?) {
}
override fun onCreateViewHolder(
context: Context,
parent: ViewGroup,
viewType: Int
): QuickViewHolder {
// 返回一个 ViewHolder
return QuickViewHolder(R.layout.item_cars, parent)
}
}

View File

@ -0,0 +1,27 @@
package com.dahe.gldriver.adapter
import android.content.Context
import android.view.ViewGroup
import com.chad.library.adapter4.BaseQuickAdapter
import com.chad.library.adapter4.viewholder.QuickViewHolder
import com.dahe.gldriver.R
import com.dahe.glex.bean.WayBillBean
/**
* @ClassName WalletAdapter
* @Author john
* @Date 2024/2/1 10:41
* @Description TODO
*/
class WalletAdapter : BaseQuickAdapter<WayBillBean, QuickViewHolder>() {
override fun onBindViewHolder(holder: QuickViewHolder, position: Int, item: WayBillBean?) {
}
override fun onCreateViewHolder(
context: Context,
parent: ViewGroup,
viewType: Int
): QuickViewHolder {
return QuickViewHolder(R.layout.item_wallet, parent)
}
}

View File

@ -0,0 +1,125 @@
package com.dahe.gldriver.base
import android.content.Context
import android.content.Intent
import android.graphics.Bitmap
import android.os.Bundle
import android.text.TextUtils
import android.view.View
import android.webkit.JavascriptInterface
import android.webkit.WebResourceRequest
import android.webkit.WebView
import android.widget.FrameLayout
import android.widget.TextView
import com.dahe.gldriver.databinding.ActivityWebBinding
import com.dahe.gldriver.ui.HomeActivity
import com.dahe.mylibrary.R
import com.dahe.mylibrary.base.BaseActivity
import com.just.agentweb.AgentWeb
import com.just.agentweb.AgentWebUIControllerImplBase
import com.just.agentweb.WebChromeClient
import com.just.agentweb.WebViewClient
/**
* @ClassName WebActivity
* @Author john
* @Date 2024/2/1 15:08
* @Description TODO
*/
class WebActivity : BaseActivity<ActivityWebBinding>() {
var mTextRight: TextView? = null
private var mAgentWeb: AgentWeb? = null
private var mTitle = ""
private var mUrl = ""
override fun initView(savedInstanceState: Bundle?) {
mTitle = intent.extras?.getString("title").toString()
mUrl = intent.extras?.getString("url").toString()
setStatusBarColor(R.color.colorWhite)
setTitleBar(mTitle) { v: View? -> if (!mAgentWeb!!.back()) finish() }
mAgentWeb = AgentWeb.with(this)
.setAgentWebParent(binding.WebViewLayout, FrameLayout.LayoutParams(-1, -1))
.useDefaultIndicator()
.setWebChromeClient(mWebChromeClient)
.setSecurityType(AgentWeb.SecurityType.DEFAULT_CHECK)
.setAgentWebUIController(AgentWebUIControllerImplBase())
.createAgentWeb()
.ready()
.go(mUrl)
// mAgentWeb?.jsInterfaceHolder?.addJavaObject("phone", AndroidInterfaceWeb())
}
override fun initDate() {
}
private val mWebChromeClient: WebChromeClient = object : WebChromeClient() {
override fun onProgressChanged(view: WebView, newProgress: Int) {
super.onProgressChanged(view, newProgress)
}
override fun onReceivedTitle(view: WebView, title: String) {
super.onReceivedTitle(view, title)
setTitleBar(
if (TextUtils.isEmpty(mTitle)) title else mTitle
) { if (!mAgentWeb!!.back()) finish() }
}
}
// private val mWebViewClient: WebViewClient = object : WebViewClient() {
// override fun onPageStarted(view: WebView, url: String, favicon: Bitmap) {
// super.onPageStarted(view, url, favicon)
// }
//
// override fun shouldOverrideUrlLoading(view: WebView, request: WebResourceRequest): Boolean {
// return super.shouldOverrideUrlLoading(view, request)
// } // @Override
// // public boolean shouldOverrideUrlLoading(WebView view, WebResourceRequest request) {
// // //该方法在Build.VERSION_CODES.LOLLIPOP以后有效
// // if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
// // String url = request.getUrl().toString();
// // Log.i(TAG, "shouldOverrideUrlLoading: " + url);
// // }
// // return false;
// // }
// }
// @OnClick({R.id.common_toolBar_text_right, R.id.common_toolBar_image_right})
// public void onClick(View view) {
// if (view.getId() == R.id.common_toolBar_text_right) {
// } else if (view.getId() == R.id.common_toolBar_image_right) {
// }
// }
override fun onPause() {
mAgentWeb?.webLifeCycle?.onPause()
super.onPause()
}
override fun onResume() {
mAgentWeb?.webLifeCycle?.onResume()
super.onResume()
}
override fun onDestroy() {
mAgentWeb?.webLifeCycle?.onDestroy()
super.onDestroy()
}
// internal class AndroidInterfaceWeb {
// @JavascriptInterface
// fun gohome() {
// val intent = Intent(mContext, HomeActivity::class.java)
// intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK or Intent.FLAG_ACTIVITY_NEW_TASK)
// mContext.startActivity(intent)
// }
// }
}

View File

@ -1,7 +1,7 @@
package com.dahe.gldriver.net
import com.dahe.gldriver.utils.BaseSingNoParam
import com.dahe.mylibrary.CommonBaseLibrary
import com.dahe.mylibrary.base.BaseSingNoParam
import com.dahe.mylibrary.net.JsonInterceptor
import okhttp3.OkHttpClient
import java.util.concurrent.TimeUnit

View File

@ -0,0 +1,25 @@
package com.dahe.gldriver.ui.account.authperson
import android.os.Bundle
import com.dahe.gldriver.R
import com.dahe.gldriver.base.WebActivity
import com.dahe.gldriver.databinding.ActivityAuthPersonBinding
import com.dahe.mylibrary.base.BaseActivity
import com.dahe.mylibrary.utils.ActivityUtils
/**
* @ClassName AuthPartyActivity
* @Author john
* @Date 2024/2/1 11:20
* @Description 党员认证
*/
class AuthPartyActivity : BaseActivity<ActivityAuthPersonBinding>() {
override fun initView(savedInstanceState: Bundle?) {
setStatusBarColor(R.color.white)
setTitleBar("党员认证",true)
}
override fun initDate() {
}
}

View File

@ -1,12 +1,19 @@
package com.dahe.gldriver.ui.mine
import android.os.Bundle
import android.view.View
import com.dahe.gldriver.R
import com.dahe.gldriver.adapter.GridItemAdapter
import com.dahe.gldriver.base.WebActivity
import com.dahe.gldriver.bean.GridBean
import com.dahe.gldriver.databinding.FragmentMineBinding
import com.dahe.gldriver.ui.account.authperson.AuthPartyActivity
import com.dahe.gldriver.ui.mine.activity.CarsManActivity
import com.dahe.gldriver.ui.mine.activity.RulesActivity
import com.dahe.gldriver.ui.mine.activity.WalletActivity
import com.dahe.gldriver.utils.SPUtils
import com.dahe.mylibrary.base.BaseFragment
import com.dahe.mylibrary.utils.ActivityUtils
import com.dahe.mylibrary.utils.ToastUtils
import com.tencent.bugly.crashreport.CrashReport
@ -42,21 +49,26 @@ class MineFragment : BaseFragment<FragmentMineBinding>(), View.OnClickListener {
// if (null==userInfo)
// return
binding.gvTools.run {
binding.run {
//初始化常用工具
gvTools.run {
adapter = GridItemAdapter(mContext, tools, R.layout.grid_mine_item)
setOnItemClickListener { _, _, i, _ ->
goTools(i)
}
}
//初始化平台规则
gvPlat.run {
adapter = GridItemAdapter(mContext, plats, R.layout.grid_mine_item)
setOnItemClickListener { _, _, i, _ ->
goPlats(i)
}
}
adapter = GridItemAdapter(mContext, tools, R.layout.grid_mine_item)
setOnItemClickListener { _, _, i, _ ->
goTools(i)
rlMoney.setOnClickListener {
ActivityUtils.startActivity(mContext, WalletActivity::class.java)
}
}
binding.gvPlat.run {
adapter = GridItemAdapter(mContext, plats, R.layout.grid_mine_item)
setOnItemClickListener { _, _, i, _ ->
goPlats(i)
}
}
}
override fun onClick(v: View) {
@ -76,18 +88,27 @@ class MineFragment : BaseFragment<FragmentMineBinding>(), View.OnClickListener {
// requireActivity().startActivity(intent)
}
/**
* 常用工具跳转逻辑
*/
private fun goTools(pos: Int) {
when (pos) {
0 -> {
ToastUtils.showToast(mContext, tools[pos].title)
ActivityUtils.startActivity(mContext, RulesActivity::class.java)
}
1 -> {
ToastUtils.showToast(mContext, tools[pos].title)
ActivityUtils.startActivity(mContext, CarsManActivity::class.java)
}
2 -> {
var bundle = Bundle()
bundle.putString("title","我的百度")
bundle.putString("url","www.baidu.com")
ActivityUtils.startActivity(mContext,WebActivity::class.java,bundle)
ToastUtils.showToast(mContext, tools[pos].title)
}
3 -> {
ToastUtils.showToast(mContext, tools[pos].title)
}
@ -95,8 +116,36 @@ class MineFragment : BaseFragment<FragmentMineBinding>(), View.OnClickListener {
}
}
/**
* 平台规则跳转逻辑
*/
private fun goPlats(pos: Int) {
ToastUtils.showToast(mContext, plats[pos].title)
when (pos) {
0 -> {
ActivityUtils.startActivity(mContext, RulesActivity::class.java)
}
1 -> {
ActivityUtils.startActivity(mContext, CarsManActivity::class.java)
}
2 -> {
ToastUtils.showToast(mContext, tools[pos].title)
}
3 -> {
ToastUtils.showToast(mContext, tools[pos].title)
}
4 -> {
ActivityUtils.startActivity(mContext, AuthPartyActivity::class.java)
}
5 -> {
ToastUtils.showToast(mContext, tools[pos].title)
}
}
}

View File

@ -0,0 +1,60 @@
package com.dahe.gldriver.ui.mine.activity
import android.graphics.Color
import android.os.Bundle
import android.widget.LinearLayout
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import androidx.recyclerview.widget.RecyclerView.LayoutManager
import com.dahe.gldriver.R
import com.dahe.gldriver.adapter.CarsAdapter
import com.dahe.gldriver.adapter.WaybillAdapter
import com.dahe.gldriver.databinding.ActivityCarsManBinding
import com.dahe.glex.bean.WayBillBean
import com.dahe.mylibrary.base.BaseActivity
import com.dahe.mylibrary.recycleviewswipe.RecycleViewDivider
import com.dahe.mylibrary.utils.ConvertUtils
/**
* @ClassName CarsManActivity
* @Author john
* @Date 2024/2/1 08:59
* @Description 车辆管理
*/
class CarsManActivity : BaseActivity<ActivityCarsManBinding>() {
override fun initView(savedInstanceState: Bundle?) {
setStatusBarColor(R.color.white)
setTitleBar("车辆管理",true)
var datas = mutableListOf<WayBillBean>(
WayBillBean(),
WayBillBean(),
WayBillBean(),
WayBillBean(),
WayBillBean(),
WayBillBean(),
WayBillBean(),
WayBillBean()
)
var adapter = binding.recycler.run {
layoutManager = LinearLayoutManager(mContext, RecyclerView.VERTICAL, false)
addItemDecoration(
RecycleViewDivider(
LinearLayout.VERTICAL,
ConvertUtils.dp2px(16.0f),
Color.TRANSPARENT
)
)
adapter = CarsAdapter()
adapter as CarsAdapter
}
adapter.submitList(datas)
}
override fun initDate() {
}
}

View File

@ -0,0 +1,22 @@
package com.dahe.gldriver.ui.mine.activity
import android.os.Bundle
import com.dahe.gldriver.R
import com.dahe.gldriver.databinding.ActivityRulesBinding
import com.dahe.mylibrary.base.BaseActivity
/**
* @ClassName RulesActivity
* @Author john
* @Date 2024/2/1 11:06
* @Description 平台规则
*/
class RulesActivity : BaseActivity<ActivityRulesBinding>() {
override fun initView(savedInstanceState: Bundle?) {
setStatusBarColor(R.color.white)
setTitleBar("平台规则",true)
}
override fun initDate() {
}
}

View File

@ -0,0 +1,54 @@
package com.dahe.gldriver.ui.mine.activity
import android.graphics.Color
import android.os.Bundle
import android.widget.LinearLayout
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.dahe.gldriver.adapter.CarsAdapter
import com.dahe.gldriver.adapter.WalletAdapter
import com.dahe.gldriver.databinding.ActivityWalletBinding
import com.dahe.glex.bean.WayBillBean
import com.dahe.mylibrary.base.BaseActivity
import com.dahe.mylibrary.recycleviewswipe.RecycleViewDivider
import com.dahe.mylibrary.utils.ConvertUtils
/**
* @ClassName WalletActivity
* @Author john
* @Date 2024/2/1 09:41
* @Description 钱包
*/
class WalletActivity : BaseActivity<ActivityWalletBinding>() {
override fun initView(savedInstanceState: Bundle?) {
}
override fun initDate() {
var datas = mutableListOf<WayBillBean>(
WayBillBean(),
WayBillBean(),
WayBillBean(),
WayBillBean(),
WayBillBean(),
WayBillBean(),
WayBillBean(),
WayBillBean()
)
var adapter = binding.recycler.run {
layoutManager = LinearLayoutManager(mContext, RecyclerView.VERTICAL, false)
addItemDecoration(
RecycleViewDivider(
LinearLayout.VERTICAL,
ConvertUtils.dp2px(16.0f),
Color.TRANSPARENT
)
)
adapter = WalletAdapter()
adapter as WalletAdapter
}
adapter.submitList(datas)
}
}

View File

@ -7,6 +7,7 @@ import com.dahe.gldriver.base.AppConfig
import com.dahe.gldriver.databinding.ActivityWaybillDetailBinding
import com.dahe.mylibrary.base.BaseActivity
import com.dahe.mylibrary.utils.ActivityUtils
import com.dahe.mylibrary.utils.SelectPicUtils
/**
* @ClassName WaybillDetailActivity
@ -22,5 +23,6 @@ class WaybillDetailActivity :BaseActivity<ActivityWaybillDetailBinding>(){
}
override fun initDate() {
// SelectPicUtils().getInstance(mContext)
}
}

View File

@ -1,10 +1,21 @@
package com.dahe.gldriver.ui.waybill.activity
import android.os.Bundle
import android.view.View
import androidx.recyclerview.widget.GridLayoutManager
import com.dahe.gldriver.base.AppConfig
import com.dahe.gldriver.databinding.ActivityWaybillUppicBinding
import com.dahe.mylibrary.adapter.GridImageAdapter
import com.dahe.mylibrary.adapter.GridImageAdapter.OnItemClickListener
import com.dahe.mylibrary.base.BaseActivity
import com.dahe.mylibrary.pop.PopBottomPic
import com.dahe.mylibrary.utils.ActivityUtils
import com.dahe.mylibrary.utils.ToastUtils
import com.dahe.mylibrary.weight.FullyGridLayoutManager
import com.luck.picture.lib.decoration.GridSpacingItemDecoration
import com.luck.picture.lib.entity.LocalMedia
import com.luck.picture.lib.utils.DensityUtil
import com.lxj.xpopup.XPopup
/**
* @ClassName WaybillUpPicActivity
@ -29,7 +40,7 @@ class WaybillUpPicActivity : BaseActivity<ActivityWaybillUppicBinding>() {
mContext,
WaybillSuccActivity::class.java,
Bundle().apply { putInt(AppConfig.SUCCESS_TYPE, 1) })
}else{
} else {
ActivityUtils.startActivity(
mContext,
WaybillSuccActivity::class.java,
@ -38,6 +49,48 @@ class WaybillUpPicActivity : BaseActivity<ActivityWaybillUppicBinding>() {
}
}
private val mData: List<LocalMedia> = ArrayList()
override fun initDate() {
binding.recyclerView.run {
layoutManager = FullyGridLayoutManager(mContext, 4, GridLayoutManager.VERTICAL, false)
addItemDecoration(
GridSpacingItemDecoration(
4,
DensityUtil.dip2px(mContext, 8f), false
)
)
var myAdapter = GridImageAdapter(mContext, mData)
myAdapter.setOnItemClickListener(object :OnItemClickListener{
override fun onItemClick(v: View?, position: Int) {
}
override fun openPicture() {
XPopup.Builder(mContext)
.hasShadowBg(true)
.dismissOnBackPressed(true)
.dismissOnTouchOutside(true)
.moveUpToKeyboard(false) //如果不加这个,评论弹窗会移动到软键盘上面
.isViewMode(true)
.isDestroyOnDismiss(true) //对于只使用一次的弹窗,推荐设置这个
.asCustom(PopBottomPic(mContext,myAdapter, onPicResultListener = {
ToastUtils.showToast(mContext,it.size.toString())
myAdapter.data.addAll(it)
myAdapter.notifyDataSetChanged()
}))
.show()
}
})
// setHasFixedSize(true)
adapter = myAdapter
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 612 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 232 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 338 KiB

View File

@ -0,0 +1,200 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<include layout="@layout/common_toolbar"></include>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#FFEFE8"
android:padding="@dimen/sp_18"
android:text="请详细认真填写党员认证信息,方便系统进行审核。审 核将在一般在1-3个工作日内完成。请耐心等待。"
android:textColor="#FF5F20"
android:textSize="@dimen/sp_14" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_28"
android:layout_marginTop="@dimen/dp_14"
android:text="党员信息"
android:textColor="@color/black"
android:textSize="@dimen/sp_15" />
<androidx.cardview.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_15"
android:layout_marginTop="@dimen/dp_15"
android:layout_marginRight="@dimen/dp_15"
android:background="@color/white"
app:cardCornerRadius="@dimen/dp_8">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/dp_58"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingLeft="@dimen/dp_13"
android:paddingRight="@dimen/dp_13">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="入党时间"
android:textColor="@color/black"
android:textSize="@dimen/sp_15" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableRight="@drawable/right_gray"
android:drawablePadding="@dimen/dp_6"
android:hint="请选择入党时间"
android:textColor="@color/black"
android:textSize="@dimen/sp_15" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/dp_58"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingLeft="@dimen/dp_13"
android:paddingRight="@dimen/dp_13">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="党组织关系所在省市"
android:textColor="@color/black"
android:textSize="@dimen/sp_15" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableRight="@drawable/right_gray"
android:drawablePadding="@dimen/dp_6"
android:hint="请选择有效期至"
android:textColor="@color/black"
android:textSize="@dimen/sp_15" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:minHeight="@dimen/dp_58"
android:orientation="horizontal"
android:paddingLeft="@dimen/dp_13"
android:paddingRight="@dimen/dp_13">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="党组织关系所在地区 (县)街道(乡)"
android:textColor="@color/black"
android:textSize="@dimen/sp_15" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableRight="@drawable/right_gray"
android:drawablePadding="@dimen/dp_6"
android:hint="请输入详细地址"
android:textColor="@color/black"
android:textSize="@dimen/sp_15" />
</LinearLayout>
</LinearLayout>
</androidx.cardview.widget.CardView>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_28"
android:layout_marginTop="@dimen/dp_14"
android:text="证明材料"
android:textColor="@color/black"
android:textSize="@dimen/sp_15" />
<androidx.cardview.widget.CardView
android:layout_width="match_parent"
android:layout_height="@dimen/dp_165"
android:layout_marginLeft="@dimen/dp_15"
android:layout_marginTop="@dimen/dp_15"
android:layout_marginRight="@dimen/dp_15"
android:background="@color/white"
app:cardCornerRadius="@dimen/dp_8">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:layout_width="@dimen/dp_100"
android:layout_height="@dimen/dp_100"
android:background="@drawable/icon_add_pic" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_10"
android:text="点击上传"
android:textColor="@color/black"
android:textSize="@dimen/sp_12" />
</LinearLayout>
</androidx.cardview.widget.CardView>
<View
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:background="@color/white"></View>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/dp_70"
android:background="@color/white"
android:gravity="center"
android:paddingLeft="@dimen/dp_15"
android:paddingRight="@dimen/dp_15">
<Button
android:id="@+id/btnOk"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/bg_btn"
android:text="立即提交"
android:textColor="@color/white"
android:textSize="@dimen/sp_17">
</Button>
</LinearLayout>
</LinearLayout>

View File

@ -0,0 +1,48 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<include layout="@layout/common_toolbar"></include>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#FFEFE8"
android:paddingLeft="@dimen/dp_20"
android:paddingTop="@dimen/dp_15"
android:paddingRight="@dimen/dp_20"
android:paddingBottom="@dimen/dp_15"
android:text="每个司机最多只能添加三辆车,如果还需添加车辆,请 先解绑不常用的车辆再添加新的车辆。新添加车辆需要 审核成功后,才能正常接单。"
android:textColor="@color/main_red"
android:textSize="@dimen/sp_14" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler"
android:paddingTop="@dimen/dp_15"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/dp_70"
android:background="@color/white"
android:gravity="center"
android:paddingLeft="@dimen/dp_15"
android:paddingRight="@dimen/dp_15">
<Button
android:id="@+id/btnOk"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/bg_btn"
android:text="添加车辆"
android:textColor="@color/white"
android:textSize="@dimen/sp_17">
</Button>
</LinearLayout>
</LinearLayout>

View File

@ -0,0 +1,131 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<include layout="@layout/common_toolbar"></include>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="@dimen/dp_15"
android:background="@color/white"
android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="@dimen/dp_80"
android:paddingLeft="@dimen/dp_15"
android:paddingTop="@dimen/dp_16"
android:paddingRight="@dimen/dp_15">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="大河好运用户服务协议"
android:textColor="@color/black"
android:textSize="@dimen/sp_16" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_30"
android:text="更新时间2023-12-22"
android:textColor="@color/color_9"
android:textSize="@dimen/sp_12" />
<ImageView
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_width="@dimen/dp_15"
android:layout_height="@dimen/dp_15"
android:background="@drawable/right_gray"
/>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/dp_1"
android:layout_alignParentBottom="true"
android:layout_marginTop="@dimen/dp_20"
android:background="@color/color_c" />
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="@dimen/dp_80"
android:paddingLeft="@dimen/dp_15"
android:paddingTop="@dimen/dp_16"
android:paddingRight="@dimen/dp_15">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="货物运输协议"
android:textColor="@color/black"
android:textSize="@dimen/sp_16" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_30"
android:text="更新时间2023-12-22"
android:textColor="@color/color_9"
android:textSize="@dimen/sp_12" />
<ImageView
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_width="@dimen/dp_15"
android:layout_height="@dimen/dp_15"
android:background="@drawable/right_gray"
/>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/dp_1"
android:layout_alignParentBottom="true"
android:layout_marginTop="@dimen/dp_20"
android:background="@color/color_c" />
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="@dimen/dp_80"
android:paddingLeft="@dimen/dp_15"
android:paddingTop="@dimen/dp_16"
android:paddingRight="@dimen/dp_15">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="货物运输协议(代开发票)"
android:textColor="@color/black"
android:textSize="@dimen/sp_16" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_30"
android:text="更新时间2023-12-22"
android:textColor="@color/color_9"
android:textSize="@dimen/sp_12" />
<ImageView
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_width="@dimen/dp_15"
android:layout_height="@dimen/dp_15"
android:background="@drawable/right_gray"
/>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/dp_1"
android:layout_alignParentBottom="true"
android:layout_marginTop="@dimen/dp_20"
android:background="@color/color_c" />
</RelativeLayout>
</LinearLayout>
</LinearLayout>

View File

@ -0,0 +1,137 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="@dimen/dp_237"
android:background="@drawable/wallet_bg"
android:paddingTop="@dimen/dp_50">
<TextView
android:id="@+id/tvTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:text="钱包"
android:textColor="@color/white"
android:textSize="@dimen/sp_17" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_16"
android:layout_marginTop="@dimen/dp_4"
android:background="@drawable/left"
android:baselineAlignBottom="@+id/tvTitle" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/rlMoney"
android:layout_width="@dimen/dp_345"
android:layout_height="@dimen/dp_185"
android:layout_centerHorizontal="true"
android:layout_marginTop="@dimen/dp_110"
android:background="@drawable/money_bg"
android:paddingLeft="@dimen/dp_13"
android:paddingTop="@dimen/dp_22">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="可提现金额(元)"
android:textColor="@color/white"
android:textSize="@dimen/sp_14" />
<TextView
android:id="@+id/tvCanCash"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_32"
android:text="8556.52"
android:textColor="@color/white"
android:textSize="@dimen/sp_24" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_88"
android:text="总余额(元)"
android:textColor="@color/white"
android:textSize="@dimen/sp_14" />
<TextView
android:id="@+id/tvAllCash"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_114"
android:text="10556.52"
android:textColor="@color/white"
android:textSize="@dimen/sp_24" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/tvInCome"
android:layout_alignParentRight="true"
android:layout_marginTop="@dimen/dp_88"
android:text="累计收益(元)"
android:textColor="@color/white"
android:textSize="@dimen/sp_14" />
<TextView
android:id="@+id/tvInCome"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginTop="@dimen/dp_114"
android:layout_marginRight="@dimen/dp_50"
android:text="10556.52"
android:textColor="@color/white"
android:textSize="@dimen/sp_24" />
</RelativeLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler"
android:layout_marginTop="@dimen/dp_12"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/rlMoney"
android:layout_marginBottom="@dimen/dp_56"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/dp_56"
android:layout_alignParentBottom="true"
android:background="@color/white"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:text="提现记录"
android:textColor="@color/color_3"
android:textSize="@dimen/sp_17" />
<View
android:layout_width="@dimen/dp_1"
android:layout_height="@dimen/dp_16"
android:background="#C99D54" />
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:text="立即提现"
android:textColor="#C99D54"
android:textSize="@dimen/sp_17" />
</LinearLayout>
</RelativeLayout>

View File

@ -12,7 +12,7 @@
android:layout_width="match_parent"
android:layout_height="@dimen/dp_240"
android:background="@drawable/home_top_bg"
android:paddingTop="@dimen/dp_48">
android:paddingTop="@dimen/dp_50">
<TextView
android:id="@+id/tvTitle"
@ -32,6 +32,7 @@
android:baselineAlignBottom="@+id/tvTitle" />
</RelativeLayout>
<androidx.core.widget.NestedScrollView
android:id="@+id/scrollView"
android:layout_width="match_parent"
@ -137,19 +138,21 @@
android:textColor="@color/black"
android:textSize="@dimen/sp_15" />
<ImageView
android:id="@+id/ivAdd"
android:layout_width="@dimen/dp_42"
android:layout_height="@dimen/dp_42"
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_40"
android:background="@drawable/head_defaut" />
android:overScrollMode="never" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_40"
android:layout_toRightOf="@+id/ivAdd"
android:layout_toRightOf="@+id/recyclerView"
android:text="上传卸货照片"
android:textColor="@color/black"
android:textSize="@dimen/sp_15" />
@ -157,9 +160,9 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/ivAdd"
android:layout_alignBottom="@+id/recyclerView"
android:layout_marginLeft="@dimen/dp_10"
android:layout_toRightOf="@+id/ivAdd"
android:layout_toRightOf="@+id/recyclerView"
android:text="请按照要求上传装货回单"
android:textColor="@color/color_9"
android:textSize="@dimen/sp_12" />
@ -230,6 +233,7 @@
</RelativeLayout>
</androidx.cardview.widget.CardView>
<View
android:layout_width="0dp"
android:layout_height="@dimen/dp_10"
@ -239,6 +243,7 @@
</androidx.core.widget.NestedScrollView>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="@dimen/dp_74"
@ -260,4 +265,6 @@
android:textColor="@color/white"
android:textSize="@dimen/sp_15" />
</RelativeLayout>
</LinearLayout>

View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
>
<include layout="@layout/common_toolbar" />
<FrameLayout
android:id="@+id/WebViewLayout"
android:layout_width="match_parent"
android:layout_height="match_parent">
</FrameLayout>
</LinearLayout>

View File

@ -87,6 +87,7 @@
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_20"
android:horizontalSpacing="@dimen/dp_30"
android:listSelector="@color/color_transparent"
android:numColumns="4"></GridView>

View File

@ -232,6 +232,7 @@
<GridView
android:listSelector="@color/color_transparent"
android:id="@+id/gvTools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -265,6 +266,7 @@
<GridView
android:listSelector="@color/color_transparent"
android:id="@+id/gvPlat"
android:layout_width="match_parent"
android:layout_height="wrap_content"

View File

@ -0,0 +1,84 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_90"
android:layout_marginLeft="@dimen/dp_15"
android:layout_marginRight="@dimen/dp_15"
android:background="@color/white"
app:cardCornerRadius="@dimen/dp_8"
app:contentPaddingLeft="@dimen/dp_12"
app:contentPaddingRight="@dimen/dp_12">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:orientation="horizontal">
<ImageView
android:layout_width="@dimen/dp_76"
android:layout_height="@dimen/dp_55"
android:background="@drawable/login_car"
/>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginLeft="@dimen/dp_16"
android:layout_weight="1">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="豫A4982S"
android:textColor="@color/black"
android:textSize="@dimen/sp_18" />
<TextView
android:id="@+id/tvCarType"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_marginTop="@dimen/dp_6"
android:text="重型半挂牵引车"
android:textColor="@color/color_9"
android:textSize="@dimen/sp_12" />
<TextView
android:id="@+id/tvCarLen"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_marginLeft="@dimen/dp_16"
android:layout_marginTop="@dimen/dp_6"
android:layout_toRightOf="@+id/tvCarType"
android:text="16米"
android:textColor="@color/color_9"
android:textSize="@dimen/sp_12" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_marginLeft="@dimen/dp_16"
android:layout_marginTop="@dimen/dp_6"
android:layout_toRightOf="@+id/tvCarLen"
android:text="30顿"
android:textColor="@color/color_9"
android:textSize="@dimen/sp_12" />
</RelativeLayout>
<TextView
android:id="@+id/tvUnbind"
android:layout_width="@dimen/dp_30"
android:layout_height="match_parent"
android:layout_marginTop="@dimen/dp_6"
android:gravity="right"
android:text="解绑"
android:textColor="@color/color_9"
android:textSize="@dimen/sp_12" />
</LinearLayout>
</androidx.cardview.widget.CardView>

View File

@ -0,0 +1,77 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_70"
android:layout_marginLeft="@dimen/dp_15"
android:layout_marginRight="@dimen/dp_15"
android:background="@color/white"
app:cardCornerRadius="@dimen/dp_8"
app:contentPaddingLeft="@dimen/dp_12"
app:contentPaddingRight="@dimen/dp_12">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center_vertical"
android:paddingTop="@dimen/dp_12"
android:orientation="horizontal">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_weight="1">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="运费结算204554127412"
android:textColor="@color/black"
android:textStyle="bold"
android:textSize="@dimen/sp_15" />
<TextView
android:id="@+id/tvCarType"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_marginTop="@dimen/dp_8"
android:text="2023-12-18 15:25"
android:textColor="@color/color_9"
android:textSize="@dimen/sp_12" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="vertical"
android:gravity="center_horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="+2000"
android:textColor="@color/black"
android:textStyle="bold"
android:textSize="@dimen/sp_15" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_marginTop="@dimen/dp_8"
android:text="余额8556.52"
android:textColor="@color/color_9"
android:textSize="@dimen/sp_12" />
</LinearLayout>
</LinearLayout>
</androidx.cardview.widget.CardView>

View File

@ -1,9 +1,9 @@
def CrashActivityVersion = '2.4.0'
def StatusBarVersion = '2.3.3'
def GsonVersion = '2.10.1'
def PhotoPickerVersion = 'v3.11.1'
def PhotoPickerVersion = 'v3.11.2'
def GlideVersion = '4.16.0'
def AgentWebVersion = 'v5.0.6-androidx'
def AgentWebVersion = 'v5.1.1-androidx'
def NiceDialogVersion = '1.1.9'
def AndPermissionVersion = '2.0.3'
def BannerVersion = '2.2.2'
@ -22,7 +22,7 @@ def PickerView = '4.1.9'
def Permissionx = '1.7.1'
def NiceSpinner = '1.4.4'
def Countdownview = '2.1.6'
def Xpopup = '2.9.19'
def Xpopup = '2.10.0'
def CheckVersionLib = '2.4.2'
def BuglyVersion = 'latest.release'
project.ext {
@ -41,7 +41,7 @@ project.ext {
"PhotoPicker" : "io.github.lucksiege:pictureselector:${PhotoPickerVersion}",
// "PhotoPicker" : "com.github.LuckSiege.PictureSelector:picture_library:${PhotoPickerVersion}",
// "PhotoPicker" : "io.github.lucksiege:pictureselector:${PhotoPickerVersion}",
"agentweb" : "com.github.Justson.AgentWeb:agentweb-core:${AgentWebVersion}",
"agentweb" : "io.github.justson:agentweb-core:${AgentWebVersion}",
"statusbaruitl" : "com.github.niorgai:StatusBarCompat:${StatusBarVersion}",
"glide" : "com.github.bumptech.glide:glide:${GlideVersion}",
"glide-compiler" : "com.github.bumptech.glide:compiler:${GlideVersion}",

View File

@ -30,6 +30,10 @@ android {
kotlinOptions {
jvmTarget = '11'
}
buildFeatures {
viewBinding = true
}
}
dependencies {
@ -77,6 +81,7 @@ dependencies {
api rootProject.ext.dependencies["glide-okhttps"]
api rootProject.ext.dependencies["Permissionx"]
api 'pub.devrel:easypermissions:3.0.0'
api 'io.github.lucksiege:compress:v3.11.2'
// api 'com.gyf.cactus:cactus:1.1.3-beta13'

View File

@ -23,6 +23,7 @@
<meta-data
android:name="com.dahe.mylibrary.glide.AppGlideModule"
android:value="AppGlideModule"/>
</application>
</manifest>

View File

@ -0,0 +1,206 @@
package com.dahe.mylibrary.adapter
import android.content.Context
import android.net.Uri
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.ImageView
import android.widget.TextView
import androidx.recyclerview.widget.RecyclerView
import com.bumptech.glide.Glide
import com.bumptech.glide.load.engine.DiskCacheStrategy
import com.dahe.mylibrary.R
import com.dahe.mylibrary.callback.OnItemLongClickListener
import com.luck.picture.lib.config.PictureMimeType
import com.luck.picture.lib.config.SelectMimeType
import com.luck.picture.lib.entity.LocalMedia
import com.luck.picture.lib.utils.DateUtils
/**
* @authorluck
* @date2016-7-27 23:02
* @describeGridImageAdapter
*/
class GridImageAdapter(context: Context?, result: List<LocalMedia>?) :
RecyclerView.Adapter<GridImageAdapter.ViewHolder?>() {
private val mInflater: LayoutInflater
val data = ArrayList<LocalMedia>()
var selectMax = 9
/**
* 删除
*/
fun delete(position: Int) {
try {
if (position != RecyclerView.NO_POSITION && data.size > position) {
data.removeAt(position)
notifyItemRemoved(position)
notifyItemRangeChanged(position, data.size)
}
} catch (e: Exception) {
e.printStackTrace()
}
}
fun remove(position: Int) {
if (position < data.size) {
data.removeAt(position)
}
}
class ViewHolder(view: View) : RecyclerView.ViewHolder(view) {
var mImg: ImageView
var mIvDel: ImageView
var tvDuration: TextView
init {
mImg = view.findViewById(R.id.fiv)
mIvDel = view.findViewById(R.id.iv_del)
tvDuration = view.findViewById(R.id.tv_duration)
}
}
override fun getItemCount(): Int {
return if (data.size < selectMax) {
data.size + 1
} else {
data.size
}
}
override fun getItemViewType(position: Int): Int {
return if (isShowAddItem(position)) {
TYPE_CAMERA
} else {
TYPE_PICTURE
}
}
/**
* 创建ViewHolder
*/
override fun onCreateViewHolder(viewGroup: ViewGroup, i: Int): ViewHolder {
val view = mInflater.inflate(R.layout.gv_filter_image, viewGroup, false)
return ViewHolder(view)
}
private fun isShowAddItem(position: Int): Boolean {
val size = data.size
return position == size
}
/**
* 设置值
*/
override fun onBindViewHolder(viewHolder: ViewHolder, position: Int) {
//少于MaxSize张显示继续添加的图标
if (getItemViewType(position) == TYPE_CAMERA) {
viewHolder.mImg.setImageResource(R.drawable.ic_add_image)
viewHolder.mImg.setOnClickListener {
if (mItemClickListener != null) {
mItemClickListener!!.openPicture()
}
}
viewHolder.mIvDel.visibility = View.INVISIBLE
} else {
viewHolder.mIvDel.visibility = View.VISIBLE
viewHolder.mIvDel.setOnClickListener { view: View? ->
val index = viewHolder.absoluteAdapterPosition
if (index != RecyclerView.NO_POSITION && data.size > index) {
data.removeAt(index)
notifyItemRemoved(index)
notifyItemRangeChanged(index, data.size)
}
}
val media = data[position]
val chooseModel = media.chooseModel
val path = media.availablePath
val duration = media.duration
viewHolder.tvDuration.visibility =
if (PictureMimeType.isHasVideo(media.mimeType)) View.VISIBLE else View.GONE
if (chooseModel == SelectMimeType.ofAudio()) {
viewHolder.tvDuration.visibility = View.VISIBLE
viewHolder.tvDuration.setCompoundDrawablesRelativeWithIntrinsicBounds(
R.drawable.ps_ic_audio,
0,
0,
0
)
} else {
viewHolder.tvDuration.setCompoundDrawablesRelativeWithIntrinsicBounds(
R.drawable.ps_ic_video,
0,
0,
0
)
}
viewHolder.tvDuration.text = DateUtils.formatDurationTime(duration)
if (chooseModel == SelectMimeType.ofAudio()) {
viewHolder.mImg.setImageResource(R.drawable.ps_audio_placeholder)
} else {
Glide.with(viewHolder.itemView.context)
.load(
if (PictureMimeType.isContent(path) && !media.isCut && !media.isCompressed) Uri.parse(
path
) else path
)
.centerCrop()
.placeholder(R.color.app_color_f6)
.diskCacheStrategy(DiskCacheStrategy.ALL)
.into(viewHolder.mImg)
}
//itemView 的点击事件
if (mItemClickListener != null) {
viewHolder.itemView.setOnClickListener { v: View? ->
val adapterPosition = viewHolder.absoluteAdapterPosition
mItemClickListener!!.onItemClick(v, adapterPosition)
}
}
if (mItemLongClickListener != null) {
viewHolder.itemView.setOnLongClickListener { v: View? ->
val adapterPosition = viewHolder.absoluteAdapterPosition
mItemLongClickListener!!.onItemLongClick(viewHolder, adapterPosition, v)
true
}
}
}
}
private var mItemClickListener: OnItemClickListener? = null
fun setOnItemClickListener(l: OnItemClickListener?) {
mItemClickListener = l
}
interface OnItemClickListener {
/**
* Item click event
*
* @param v
* @param position
*/
fun onItemClick(v: View?, position: Int)
/**
* Open PictureSelector
*/
fun openPicture()
}
private var mItemLongClickListener: OnItemLongClickListener? = null
init {
mInflater = LayoutInflater.from(context)
data.addAll(result!!)
}
fun setItemLongClickListener(l: OnItemLongClickListener?) {
mItemLongClickListener = l
}
companion object {
const val TAG = "PictureSelector"
const val TYPE_CAMERA = 1
const val TYPE_PICTURE = 2
}
}

View File

@ -46,13 +46,15 @@ public abstract class BaseActivity<VB extends ViewBinding> extends AppCompatActi
protected int mRefreshPage = 1;
protected int mRefreshCount = 15;
private int statusColor = -1;
public VB binding;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
binding = createBinding();
if (binding==null)
if (binding == null)
return;
setContentView(binding.getRoot());
mContext = this;
@ -95,6 +97,7 @@ public abstract class BaseActivity<VB extends ViewBinding> extends AppCompatActi
* 设置沉浸式标题栏 标题栏的颜色
*/
public void setStatusBarColor(int color) {
statusColor = color;
StatusBarCompat.setStatusBarColor(this, ContextCompat.getColor(mContext, color), DEFAULT_STATUS_BAR_ALPHA);
StatusBar.changeToLightStatusBar(this); //黑色 下边白色
// StatusBar.cancelLightStatusBar(this);
@ -155,13 +158,14 @@ public abstract class BaseActivity<VB extends ViewBinding> extends AppCompatActi
if (!TextUtils.isEmpty(title))
((TextView) findViewById(R.id.common_toolBar_title)).setText(title);
}
/**
* 设置标题
*/
protected void setTitleBar(String title,boolean isBack) {
protected void setTitleBar(String title, boolean isBack) {
mToolbar = (Toolbar) findViewById(R.id.common_toolbar);
mToolbar.setBackgroundColor(Color.TRANSPARENT);
if (isBack){
mToolbar.setBackgroundColor(statusColor == -1 ? Color.TRANSPARENT : ContextCompat.getColor(mContext, statusColor));
if (isBack) {
mToolbar.setNavigationIcon(R.drawable.left_black);
mToolbar.setNavigationOnClickListener(view -> finish());
}
@ -169,6 +173,7 @@ public abstract class BaseActivity<VB extends ViewBinding> extends AppCompatActi
((TextView) findViewById(R.id.common_toolBar_title)).setText(title);
}
/**
* 显示右边标题
*

View File

@ -1,4 +1,4 @@
package com.dahe.gldriver.utils
package com.dahe.mylibrary.base
/**
* @ClassName BaseSingleton

View File

@ -0,0 +1,122 @@
package com.dahe.mylibrary.pop
import android.content.Context
import android.widget.Button
import com.dahe.mylibrary.R
import com.dahe.mylibrary.adapter.GridImageAdapter
import com.dahe.mylibrary.utils.SelectPicUtils
import com.dahe.mylibrary.utils.ToastUtils
import com.dahe.mylibrary.weight.GlideEngine
import com.dahe.mylibrary.weight.ImageFileCompressEngine
import com.luck.picture.lib.basic.PictureSelectionCameraModel
import com.luck.picture.lib.basic.PictureSelectionModel
import com.luck.picture.lib.basic.PictureSelector
import com.luck.picture.lib.config.SelectMimeType
import com.luck.picture.lib.entity.LocalMedia
import com.luck.picture.lib.interfaces.OnResultCallbackListener
import com.lxj.xpopup.core.BottomPopupView
import kotlin.math.min
/**
* @ClassName PopBottomPic
* @Author john
* @Date 2024/1/31 11:11
* @Description TODO
*/
class PopBottomPic(
context: Context,
myAdapter: GridImageAdapter,
onPicResultListener: onPicResultListener
) : BottomPopupView(context) {
private var listener: onPicResultListener
var myAdapter: GridImageAdapter
init {
this.listener = onPicResultListener
this.myAdapter = myAdapter
}
override fun getImplLayoutId() = R.layout.choice_car_timg
override fun onCreate() {
super.onCreate()
var paizhao = findViewById<Button>(R.id.btn_paizhao)
var xiangce = findViewById<Button>(R.id.btnXiangce)
paizhao.setOnClickListener {
// 单独拍照
val cameraModel: PictureSelectionCameraModel = PictureSelector.create(context)
.openCamera(SelectMimeType.TYPE_IMAGE)
// .setCameraInterceptListener(getCustomCameraEvent())//自定义相机
// .setRecordAudioInterceptListener(MainActivity.MeOnRecordAudioInterceptListener())//录音回调事件
// .setCropEngine(ImageFileCropEngine())//裁剪
.setCompressEngine(ImageFileCompressEngine())//压缩
// .setSelectLimitTipsListener(MainActivity.MeOnSelectLimitTipsListener())//拦截自定义提示
// .setAddBitmapWatermarkListener(getAddBitmapWatermarkListener())//给图片添加水印
// .setVideoThumbnailListener(getVideoThumbnailEventListener())//处理视频缩略图
// .setCustomLoadingListener(getCustomLoadingListener())//自定义loading
// .setSandboxFileEngine(MainActivity.MeSandboxFileEngine())//自定义沙盒文件处理
// .isOriginalControl(cb_original.isChecked())//是否开启原图功能
// .setPermissionDescriptionListener(getPermissionDescriptionListener())//权限说明
// .setOutputAudioDir(getSandboxAudioOutputPath())//创建音频自定义输出目录
.setSelectedData(myAdapter.data)
cameraModel.forResult(object : OnResultCallbackListener<LocalMedia> {
override fun onResult(result: ArrayList<LocalMedia>?) {
if (listener != null) {
result?.let { it1 -> listener.onResult(it1) }
}
dismiss()
}
override fun onCancel() {
dismiss()
}
})
}
xiangce.setOnClickListener {
// 进入相册
val selectionModel: PictureSelectionModel = PictureSelector.create(context)
.openGallery(SelectMimeType.TYPE_IMAGE)
.isDisplayCamera(false)//关闭拍照
.setImageEngine(GlideEngine.createGlideEngine())
.setCompressEngine(ImageFileCompressEngine())
.isPreviewImage(true)
.isMaxSelectEnabledMask(true)
.setMaxSelectNum(6)
.isGif(false)
.setSelectedData(myAdapter.data)
selectionModel.forResult(object : OnResultCallbackListener<LocalMedia> {
override fun onResult(result: ArrayList<LocalMedia>) {
if (listener != null) {
result?.let { it1 -> listener.onResult(it1) }
}
dismiss()
}
override fun onCancel() {
dismiss()
}
})
}
}
private fun openCam() {
PictureSelector.create(context)
.openCamera(SelectMimeType.TYPE_IMAGE)
}
// private listener : onPicResultListener
fun interface onPicResultListener {
fun onResult(result: java.util.ArrayList<LocalMedia>)
}
// fun setOnPicResultListener(listener: onPicResultListener){
// this.listener
// }
}

View File

@ -0,0 +1,73 @@
package com.dahe.mylibrary.utils
import android.content.Context
import com.dahe.mylibrary.base.BaseSingleton
import com.dahe.mylibrary.weight.GlideEngine
import com.dahe.mylibrary.weight.ImageFileCompressEngine
import com.luck.picture.lib.basic.PictureSelectionModel
import com.luck.picture.lib.basic.PictureSelector
import com.luck.picture.lib.config.SelectMimeType
import com.luck.picture.lib.entity.LocalMedia
/**
* @ClassName SelectPicUtils
* @Author john
* @Date 2024/1/31 10:20
* @Description TODO
*/
class SelectPicUtils private constructor(
private val maxNum: Int,
private val minNum: Int,
private val isDisplayCamera: Boolean
) {
private constructor(builder: Builder) : this(
builder.maxNum,
builder.minNum,
builder.isDisplayCamera
)
class Builder {
var maxNum: Int = 6
private set
var minNum: Int = 1
private set
var isDisplayCamera: Boolean = true
private set
var listener: onPicResultListener? = null
private set
fun setMaxNum(maxNum: Int) = apply {
this.maxNum = maxNum
}
fun setMinNum(setMinNum: Int) = apply {
this.minNum = setMinNum
}
fun setiIsDisplayCamera(isDisplayCamera: Boolean) = apply {
this.isDisplayCamera = isDisplayCamera
}
fun setOnPicResultListener(listener : onPicResultListener)= apply {
this.listener = listener
}
fun build() = SelectPicUtils(this)
}
fun openCam(){}
fun interface onPicResultListener {
fun onResult(result: java.util.ArrayList<LocalMedia>)
}
override fun toString(): String {
return "Computer(maxNum='$maxNum', minNum='$minNum', isDisplayCamera=$isDisplayCamera)"
}
}

View File

@ -4,18 +4,19 @@ import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
/**
* authorluck
* projectPictureSelector
* packagecom.luck.picture.ui
* email893855882@qq.com
* data16/12/31
* @authorluck
* @date2016/12/31 2:26 下午
* @describePictureOnlyCameraFragment
*/
public class FullyGridLayoutManager extends GridLayoutManager {
private final int[] mMeasuredDimension = new int[2];
public FullyGridLayoutManager(Context context, int spanCount) {
super(context, spanCount);
}
@ -24,10 +25,8 @@ public class FullyGridLayoutManager extends GridLayoutManager {
super(context, spanCount, orientation, reverseLayout);
}
private int[] mMeasuredDimension = new int[2];
@Override
public void onMeasure(RecyclerView.Recycler recycler, RecyclerView.State state, int widthSpec, int heightSpec) {
public void onMeasure(@NonNull RecyclerView.Recycler recycler, @NonNull RecyclerView.State state, int widthSpec, int heightSpec) {
final int widthMode = View.MeasureSpec.getMode(widthSpec);
final int heightMode = View.MeasureSpec.getMode(heightSpec);
final int widthSize = View.MeasureSpec.getSize(widthSpec);

View File

@ -0,0 +1,117 @@
package com.dahe.mylibrary.weight;
import android.content.Context;
import android.widget.ImageView;
import com.bumptech.glide.Glide;
import com.bumptech.glide.load.resource.bitmap.CenterCrop;
import com.bumptech.glide.load.resource.bitmap.RoundedCorners;
import com.dahe.mylibrary.R;
import com.luck.picture.lib.engine.ImageEngine;
import com.luck.picture.lib.utils.ActivityCompatHelper;
/**
* @authorluck
* @date2019-11-13 17:02
* @describeGlide加载引擎
*/
public class GlideEngine implements ImageEngine {
/**
* 加载图片
*
* @param context 上下文
* @param url 资源url
* @param imageView 图片承载控件
*/
@Override
public void loadImage(Context context, String url, ImageView imageView) {
if (!ActivityCompatHelper.assertValidRequest(context)) {
return;
}
Glide.with(context)
.load(url)
.into(imageView);
}
@Override
public void loadImage(Context context, ImageView imageView, String url, int maxWidth, int maxHeight) {
if (!ActivityCompatHelper.assertValidRequest(context)) {
return;
}
Glide.with(context)
.load(url)
.override(maxWidth, maxHeight)
.into(imageView);
}
/**
* 加载相册目录封面
*
* @param context 上下文
* @param url 图片路径
* @param imageView 承载图片ImageView
*/
@Override
public void loadAlbumCover(Context context, String url, ImageView imageView) {
if (!ActivityCompatHelper.assertValidRequest(context)) {
return;
}
Glide.with(context)
.asBitmap()
.load(url)
.override(180, 180)
.sizeMultiplier(0.5f)
.transform(new CenterCrop(), new RoundedCorners(8))
.placeholder(R.drawable.ps_image_placeholder)
.into(imageView);
}
/**
* 加载图片列表图片
*
* @param context 上下文
* @param url 图片路径
* @param imageView 承载图片ImageView
*/
@Override
public void loadGridImage(Context context, String url, ImageView imageView) {
if (!ActivityCompatHelper.assertValidRequest(context)) {
return;
}
Glide.with(context)
.load(url)
.override(200, 200)
.centerCrop()
.placeholder(R.drawable.ps_image_placeholder)
.into(imageView);
}
@Override
public void pauseRequests(Context context) {
if (!ActivityCompatHelper.assertValidRequest(context)) {
return;
}
Glide.with(context).pauseRequests();
}
@Override
public void resumeRequests(Context context) {
if (!ActivityCompatHelper.assertValidRequest(context)) {
return;
}
Glide.with(context).resumeRequests();
}
private GlideEngine() {
}
private static final class InstanceHolder {
static final GlideEngine instance = new GlideEngine();
}
public static GlideEngine createGlideEngine() {
return InstanceHolder.instance;
}
}

View File

@ -0,0 +1,44 @@
package com.dahe.mylibrary.weight
import android.content.Context
import android.net.Uri
import com.luck.picture.lib.config.PictureMimeType
import com.luck.picture.lib.engine.CompressFileEngine
import com.luck.picture.lib.interfaces.OnKeyValueResultCallbackListener
import com.luck.picture.lib.utils.DateUtils
import top.zibin.luban.Luban
import top.zibin.luban.OnNewCompressListener
import java.io.File
/**
* @ClassName ImageFileCompressEngine
* @Author john
* @Date 2024/1/31 14:50
* @Description TODO
*/
class ImageFileCompressEngine : CompressFileEngine {
override fun onStartCompress(
context: Context?,
source: ArrayList<Uri>?,
call: OnKeyValueResultCallbackListener?
) {
Luban.with(context).load(source).ignoreBy(100).setRenameListener { filePath ->
val indexOf = filePath.lastIndexOf(".")
val postfix = if (indexOf != -1) filePath.substring(indexOf) else ".jpg"
DateUtils.getCreateFileName("CMP_") + postfix
}.filter { path ->
if (PictureMimeType.isUrlHasImage(path) && !PictureMimeType.isHasHttp(path)) {
true
} else !PictureMimeType.isUrlHasGif(path)
}.setCompressListener(object : OnNewCompressListener {
override fun onStart() {}
override fun onSuccess(source: String, compressFile: File) {
call?.onCallback(source, compressFile.absolutePath)
}
override fun onError(source: String, e: Throwable) {
call?.onCallback(source, null)
}
}).launch()
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 877 KiB

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<corners android:topLeftRadius="@dimen/dp_8"
android:topRightRadius="@dimen/dp_8"
android:bottomLeftRadius="@dimen/dp_8"
android:bottomRightRadius="@dimen/dp_8"/>
<solid android:color="#fff"/>
</shape>

View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape>
<size
android:width="100dp"
android:height="100dp" />
<solid android:color="@color/ps_color_light_grey" />
</shape>
</item>
<item>
<bitmap
android:gravity="center"
android:src="@drawable/ps_ic_placeholder" />
</item>
</layer-list>

View File

@ -0,0 +1,103 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:id="@+id/pop_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_marginLeft="@dimen/dp_12"
android:layout_marginRight="@dimen/dp_12"
android:layout_marginBottom="@dimen/dp_43"
android:background="@drawable/bg_bai"
android:orientation="vertical"
android:paddingTop="@dimen/dp_10">
<ImageView
android:id="@+id/img"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_200"
android:src="@drawable/car" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_12"
android:layout_marginTop="@dimen/dp_10"
android:layout_marginRight="@dimen/dp_12"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="*"
android:textColor="@color/red"
android:textSize="@dimen/sp_12" />
<TextView
android:id="@+id/tv_ts"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="请按照如图所示拍摄或选择装卸货照片,装卸货照片包含车牌号、三分之二车身或者装卸货场景。"
android:textSize="@dimen/sp_12" />
</LinearLayout>
<LinearLayout
android:id="@+id/llXc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<Button
android:id="@+id/btnXiangce"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
android:text="相册"
android:textColor="#000"
android:textSize="@dimen/sp_15"
/>
<View
android:id="@+id/v_1"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_1"
android:layout_marginLeft="@dimen/dp_18"
android:layout_marginRight="@dimen/dp_18"
android:background="#EEEEEE" />
</LinearLayout>
<Button
android:id="@+id/btn_paizhao"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
android:text="拍照"
android:textColor="#000"
android:textSize="@dimen/sp_15" />
<View
android:layout_width="match_parent"
android:layout_height="@dimen/dp_1"
android:layout_marginLeft="@dimen/dp_18"
android:layout_marginRight="@dimen/dp_18"
android:background="#EEEEEE" />
<Button
android:id="@+id/btn_quxiao"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
android:text="取消"
android:textColor="#ff999999"
android:textSize="@dimen/sp_15"
android:textStyle="normal" />
</LinearLayout>
</RelativeLayout>

View File

@ -18,7 +18,7 @@
android:maxLength="12"
android:maxLines="1"
android:textColor="@color/black"
android:textSize="@dimen/text_17sp"
android:textSize="@dimen/sp_17"
/>
<TextView
@ -30,7 +30,7 @@
android:layout_marginRight="10dp"
android:gravity="center"
android:textColor="@color/black"
android:textSize="@dimen/text_14sp"
android:textSize="@dimen/sp_14"
android:visibility="gone" />
<RelativeLayout

View File

@ -25,7 +25,7 @@
android:scrollbars="vertical"
android:text="SL会计法士大夫撒离开尽量快点撒发了喀什角SL会计法士大夫撒离开尽量快点撒发了喀什角SL会计法士大夫撒离开尽量快点撒发了喀什角SL会计法士大夫撒离开尽量快点撒发了喀什角动量反馈阿斯利康大家分厘卡士大夫刻录机阿斯利康的飞机流口水克拉斯JFK垃圾啊收到了开发"
android:textColor="@color/colorBlack0"
android:textSize="@dimen/text_14sp" />
android:textSize="@dimen/sp_14" />
<Button
android:id="@id/versionchecklib_version_dialog_commit"

View File

@ -57,7 +57,7 @@
android:maxHeight="220dp"
android:text=""
android:textColor="@color/colorBlack6"
android:textSize="@dimen/text_14sp"
android:textSize="@dimen/sp_14"
></TextView>
<Button
android:id="@id/versionchecklib_version_dialog_commit"

View File

@ -18,7 +18,7 @@
android:gravity="center"
android:text="@string/take_Photo"
android:textColor="@color/colorBlack0"
android:textSize="@dimen/text_15sp" />
android:textSize="@dimen/sp_15" />
<View
android:layout_width="match_parent"
@ -32,7 +32,7 @@
android:gravity="center"
android:text="@string/do_select_xiangce"
android:textColor="@color/colorBlack0"
android:textSize="@dimen/text_15sp" />
android:textSize="@dimen/dp_15" />
</LinearLayout>
<View
@ -48,6 +48,6 @@
android:gravity="center"
android:text="@string/do_cancel"
android:textColor="@color/colorBlack0"
android:textSize="@dimen/text_15sp" />
android:textSize="@dimen/sp_15" />
</LinearLayout>

View File

@ -12,6 +12,7 @@
<color name="text_bg_blue">#3C6FC6</color>
<color name="mask_color">#88888888</color>
<color name="black">#000000</color>
<color name="red">#ff0000</color>

View File

@ -1,26 +1,436 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources>
<!--字体大小-->
<dimen name="text_8sp">8sp</dimen>
<dimen name="text_9sp">9sp</dimen>
<dimen name="text_10sp">10sp</dimen>
<dimen name="text_11sp">11sp</dimen>
<dimen name="text_12sp">12sp</dimen>
<dimen name="text_13sp">13sp</dimen>
<dimen name="text_14sp">14sp</dimen>
<dimen name="text_15sp">15sp</dimen>
<dimen name="text_16sp">16sp</dimen>
<dimen name="text_17sp">17sp</dimen>
<dimen name="text_18sp">18sp</dimen>
<dimen name="text_19sp">19sp</dimen>
<dimen name="text_20sp">20sp</dimen>
<dimen name="text_21sp">21sp</dimen>
<dimen name="text_22sp">22sp</dimen>
<dimen name="text_23sp">23sp</dimen>
<dimen name="text_24sp">24sp</dimen>
<dimen name="text_26sp">26sp</dimen>
<dimen name="text_28sp">28sp</dimen>
<dimen name="text_30sp">30sp</dimen>
<dimen name="text_40sp">40sp</dimen>
<dimen name="fab_size_normal">56dp</dimen>
<dimen name="fab_size_mini">40dp</dimen>
<!-- Your custom size defind by references, can be writted in anywhere, any module, any values/*.xml, for example: -->
<dimen name="card_common_margin_left">@dimen/dp_15</dimen>
<!-- dp and sp values, must be defind in this file! -->
<!-- view size,you can add if there is no one -->
<dimen name="dp_m_140">-140dp</dimen>
<dimen name="dp_m_60">-60dp</dimen>
<dimen name="dp_m_36">-36dp</dimen>
<dimen name="dp_m_30">-30dp</dimen>
<dimen name="dp_m_20">-20dp</dimen>
<dimen name="dp_m_12">-12dp</dimen>
<dimen name="dp_m_10">-10dp</dimen>
<dimen name="dp_m_8">-8dp</dimen>
<dimen name="dp_m_5">-5dp</dimen>
<dimen name="dp_m_2">-2dp</dimen>
<dimen name="dp_m_1">-1dp</dimen>
<dimen name="dp_0">0dp</dimen>
<dimen name="dp_0_1">0.1dp</dimen>
<dimen name="dp_0_5">0.5dp</dimen>
<dimen name="dp_1">1dp</dimen>
<dimen name="dp_1_5">1.5dp</dimen>
<dimen name="dp_2">2dp</dimen>
<dimen name="dp_2_5">2.5dp</dimen>
<dimen name="dp_3">3dp</dimen>
<dimen name="dp_3_5">3.5dp</dimen>
<dimen name="dp_4">4dp</dimen>
<dimen name="dp_4_5">4.5dp</dimen>
<dimen name="dp_5">5dp</dimen>
<dimen name="dp_6">6dp</dimen>
<dimen name="dp_7">7dp</dimen>
<dimen name="dp_7_5">7.5dp</dimen>
<dimen name="dp_8">8dp</dimen>
<dimen name="dp_9">9dp</dimen>
<dimen name="dp_10">10dp</dimen>
<dimen name="dp_11">11dp</dimen>
<dimen name="dp_12">12dp</dimen>
<dimen name="dp_13">13dp</dimen>
<dimen name="dp_14">14dp</dimen>
<dimen name="dp_15">15dp</dimen>
<dimen name="dp_16">16dp</dimen>
<dimen name="dp_17">17dp</dimen>
<dimen name="dp_18">18dp</dimen>
<dimen name="dp_19">19dp</dimen>
<dimen name="dp_20">20dp</dimen>
<dimen name="dp_21">21dp</dimen>
<dimen name="dp_22">22dp</dimen>
<dimen name="dp_23">23dp</dimen>
<dimen name="dp_24">24dp</dimen>
<dimen name="dp_25">25dp</dimen>
<dimen name="dp_26">26dp</dimen>
<dimen name="dp_27">27dp</dimen>
<dimen name="dp_28">28dp</dimen>
<dimen name="dp_29">29dp</dimen>
<dimen name="dp_30">30dp</dimen>
<dimen name="dp_31">31dp</dimen>
<dimen name="dp_32">32dp</dimen>
<dimen name="dp_33">33dp</dimen>
<dimen name="dp_34">34dp</dimen>
<dimen name="dp_35">35dp</dimen>
<dimen name="dp_36">36dp</dimen>
<dimen name="dp_37">37dp</dimen>
<dimen name="dp_38">38dp</dimen>
<dimen name="dp_39">39dp</dimen>
<dimen name="dp_40">40dp</dimen>
<dimen name="dp_41">41dp</dimen>
<dimen name="dp_42">42dp</dimen>
<dimen name="dp_43">43dp</dimen>
<dimen name="dp_44">44dp</dimen>
<dimen name="dp_45">45dp</dimen>
<dimen name="dp_46">46dp</dimen>
<dimen name="dp_47">47dp</dimen>
<dimen name="dp_48">48dp</dimen>
<dimen name="dp_49">49dp</dimen>
<dimen name="dp_50">50dp</dimen>
<dimen name="dp_51">51dp</dimen>
<dimen name="dp_52">52dp</dimen>
<dimen name="dp_53">53dp</dimen>
<dimen name="dp_54">54dp</dimen>
<dimen name="dp_55">55dp</dimen>
<dimen name="dp_56">56dp</dimen>
<dimen name="dp_57">57dp</dimen>
<dimen name="dp_58">58dp</dimen>
<dimen name="dp_59">59dp</dimen>
<dimen name="dp_60">60dp</dimen>
<dimen name="dp_61">61dp</dimen>
<dimen name="dp_62">62dp</dimen>
<dimen name="dp_63">63dp</dimen>
<dimen name="dp_64">64dp</dimen>
<dimen name="dp_65">65dp</dimen>
<dimen name="dp_66">66dp</dimen>
<dimen name="dp_67">67dp</dimen>
<dimen name="dp_68">68dp</dimen>
<dimen name="dp_69">69dp</dimen>
<dimen name="dp_70">70dp</dimen>
<dimen name="dp_71">71dp</dimen>
<dimen name="dp_72">72dp</dimen>
<dimen name="dp_73">73dp</dimen>
<dimen name="dp_74">74dp</dimen>
<dimen name="dp_75">75dp</dimen>
<dimen name="dp_76">76dp</dimen>
<dimen name="dp_77">77dp</dimen>
<dimen name="dp_78">78dp</dimen>
<dimen name="dp_79">79dp</dimen>
<dimen name="dp_80">80dp</dimen>
<dimen name="dp_81">81dp</dimen>
<dimen name="dp_82">82dp</dimen>
<dimen name="dp_83">83dp</dimen>
<dimen name="dp_84">84dp</dimen>
<dimen name="dp_85">85dp</dimen>
<dimen name="dp_86">86dp</dimen>
<dimen name="dp_87">87dp</dimen>
<dimen name="dp_88">88dp</dimen>
<dimen name="dp_89">89dp</dimen>
<dimen name="dp_90">90dp</dimen>
<dimen name="dp_91">91dp</dimen>
<dimen name="dp_92">92dp</dimen>
<dimen name="dp_93">93dp</dimen>
<dimen name="dp_94">94dp</dimen>
<dimen name="dp_95">95dp</dimen>
<dimen name="dp_96">96dp</dimen>
<dimen name="dp_97">97dp</dimen>
<dimen name="dp_98">98dp</dimen>
<dimen name="dp_99">99dp</dimen>
<dimen name="dp_100">100dp</dimen>
<dimen name="dp_101">101dp</dimen>
<dimen name="dp_102">102dp</dimen>
<dimen name="dp_103">103dp</dimen>
<dimen name="dp_104">104dp</dimen>
<dimen name="dp_104_5">104.5dp</dimen>
<dimen name="dp_105">105dp</dimen>
<dimen name="dp_106">106dp</dimen>
<dimen name="dp_107">107dp</dimen>
<dimen name="dp_108">108dp</dimen>
<dimen name="dp_109">109dp</dimen>
<dimen name="dp_110">110dp</dimen>
<dimen name="dp_111">111dp</dimen>
<dimen name="dp_112">112dp</dimen>
<dimen name="dp_113">113dp</dimen>
<dimen name="dp_114">114dp</dimen>
<dimen name="dp_115">115dp</dimen>
<dimen name="dp_116">116dp</dimen>
<dimen name="dp_117">117dp</dimen>
<dimen name="dp_118">118dp</dimen>
<dimen name="dp_119">119dp</dimen>
<dimen name="dp_120">120dp</dimen>
<dimen name="dp_121">121dp</dimen>
<dimen name="dp_122">122dp</dimen>
<dimen name="dp_123">123dp</dimen>
<dimen name="dp_124">124dp</dimen>
<dimen name="dp_125">125dp</dimen>
<dimen name="dp_126">126dp</dimen>
<dimen name="dp_127">127dp</dimen>
<dimen name="dp_128">128dp</dimen>
<dimen name="dp_129">129dp</dimen>
<dimen name="dp_130">130dp</dimen>
<dimen name="dp_131">131dp</dimen>
<dimen name="dp_132">132dp</dimen>
<dimen name="dp_133">133dp</dimen>
<dimen name="dp_134">134dp</dimen>
<dimen name="dp_134_5">134.5dp</dimen>
<dimen name="dp_135">135dp</dimen>
<dimen name="dp_136">136dp</dimen>
<dimen name="dp_137">137dp</dimen>
<dimen name="dp_138">138dp</dimen>
<dimen name="dp_139">139dp</dimen>
<dimen name="dp_140">140dp</dimen>
<dimen name="dp_141">141dp</dimen>
<dimen name="dp_142">142dp</dimen>
<dimen name="dp_143">143dp</dimen>
<dimen name="dp_144">144dp</dimen>
<dimen name="dp_145">145dp</dimen>
<dimen name="dp_146">146dp</dimen>
<dimen name="dp_147">147dp</dimen>
<dimen name="dp_148">148dp</dimen>
<dimen name="dp_149">149dp</dimen>
<dimen name="dp_150">150dp</dimen>
<dimen name="dp_151">151dp</dimen>
<dimen name="dp_152">152dp</dimen>
<dimen name="dp_153">153dp</dimen>
<dimen name="dp_154">154dp</dimen>
<dimen name="dp_155">155dp</dimen>
<dimen name="dp_156">156dp</dimen>
<dimen name="dp_157">157dp</dimen>
<dimen name="dp_158">158dp</dimen>
<dimen name="dp_159">159dp</dimen>
<dimen name="dp_160">160dp</dimen>
<dimen name="dp_161">161dp</dimen>
<dimen name="dp_162">162dp</dimen>
<dimen name="dp_163">163dp</dimen>
<dimen name="dp_164">164dp</dimen>
<dimen name="dp_165">165dp</dimen>
<dimen name="dp_166">166dp</dimen>
<dimen name="dp_167">167dp</dimen>
<dimen name="dp_168">168dp</dimen>
<dimen name="dp_169">169dp</dimen>
<dimen name="dp_170">170dp</dimen>
<dimen name="dp_171">171dp</dimen>
<dimen name="dp_172">172dp</dimen>
<dimen name="dp_173">173dp</dimen>
<dimen name="dp_174">174dp</dimen>
<dimen name="dp_175">175dp</dimen>
<dimen name="dp_176">176dp</dimen>
<dimen name="dp_177">177dp</dimen>
<dimen name="dp_178">178dp</dimen>
<dimen name="dp_179">179dp</dimen>
<dimen name="dp_180">180dp</dimen>
<dimen name="dp_181">181dp</dimen>
<dimen name="dp_182">182dp</dimen>
<dimen name="dp_183">183dp</dimen>
<dimen name="dp_184">184dp</dimen>
<dimen name="dp_185">185dp</dimen>
<dimen name="dp_186">186dp</dimen>
<dimen name="dp_187">187dp</dimen>
<dimen name="dp_188">188dp</dimen>
<dimen name="dp_189">189dp</dimen>
<dimen name="dp_190">190dp</dimen>
<dimen name="dp_191">191dp</dimen>
<dimen name="dp_191_25">191.25dp</dimen>
<dimen name="dp_192">192dp</dimen>
<dimen name="dp_193">193dp</dimen>
<dimen name="dp_194">194dp</dimen>
<dimen name="dp_195">195dp</dimen>
<dimen name="dp_196">196dp</dimen>
<dimen name="dp_197">197dp</dimen>
<dimen name="dp_198">198dp</dimen>
<dimen name="dp_199">199dp</dimen>
<dimen name="dp_200">200dp</dimen>
<dimen name="dp_201">201dp</dimen>
<dimen name="dp_202">202dp</dimen>
<dimen name="dp_203">203dp</dimen>
<dimen name="dp_204">204dp</dimen>
<dimen name="dp_205">205dp</dimen>
<dimen name="dp_206">206dp</dimen>
<dimen name="dp_207">207dp</dimen>
<dimen name="dp_208">208dp</dimen>
<dimen name="dp_209">209dp</dimen>
<dimen name="dp_210">210dp</dimen>
<dimen name="dp_211">211dp</dimen>
<dimen name="dp_212">212dp</dimen>
<dimen name="dp_213">213dp</dimen>
<dimen name="dp_214">214dp</dimen>
<dimen name="dp_215">215dp</dimen>
<dimen name="dp_216">216dp</dimen>
<dimen name="dp_217">217dp</dimen>
<dimen name="dp_218">218dp</dimen>
<dimen name="dp_219">219dp</dimen>
<dimen name="dp_220">220dp</dimen>
<dimen name="dp_221">221dp</dimen>
<dimen name="dp_222">222dp</dimen>
<dimen name="dp_223">223dp</dimen>
<dimen name="dp_224">224dp</dimen>
<dimen name="dp_225">225dp</dimen>
<dimen name="dp_226">226dp</dimen>
<dimen name="dp_227">227dp</dimen>
<dimen name="dp_228">228dp</dimen>
<dimen name="dp_229">229dp</dimen>
<dimen name="dp_230">230dp</dimen>
<dimen name="dp_231">231dp</dimen>
<dimen name="dp_232">232dp</dimen>
<dimen name="dp_233">233dp</dimen>
<dimen name="dp_234">234dp</dimen>
<dimen name="dp_235">235dp</dimen>
<dimen name="dp_236">236dp</dimen>
<dimen name="dp_237">237dp</dimen>
<dimen name="dp_238">238dp</dimen>
<dimen name="dp_239">239dp</dimen>
<dimen name="dp_240">240dp</dimen>
<dimen name="dp_241">241dp</dimen>
<dimen name="dp_242">242dp</dimen>
<dimen name="dp_243">243dp</dimen>
<dimen name="dp_244">244dp</dimen>
<dimen name="dp_245">245dp</dimen>
<dimen name="dp_246">246dp</dimen>
<dimen name="dp_247">247dp</dimen>
<dimen name="dp_248">248dp</dimen>
<dimen name="dp_249">249dp</dimen>
<dimen name="dp_250">250dp</dimen>
<dimen name="dp_251">251dp</dimen>
<dimen name="dp_252">252dp</dimen>
<dimen name="dp_253">253dp</dimen>
<dimen name="dp_254">254dp</dimen>
<dimen name="dp_255">255dp</dimen>
<dimen name="dp_256">256dp</dimen>
<dimen name="dp_257">257dp</dimen>
<dimen name="dp_258">258dp</dimen>
<dimen name="dp_259">259dp</dimen>
<dimen name="dp_260">260dp</dimen>
<dimen name="dp_261">261dp</dimen>
<dimen name="dp_262">262dp</dimen>
<dimen name="dp_263">263dp</dimen>
<dimen name="dp_264">264dp</dimen>
<dimen name="dp_265">265dp</dimen>
<dimen name="dp_266">266dp</dimen>
<dimen name="dp_267">267dp</dimen>
<dimen name="dp_268">268dp</dimen>
<dimen name="dp_269">269dp</dimen>
<dimen name="dp_270">270dp</dimen>
<dimen name="dp_271">271dp</dimen>
<dimen name="dp_272">272dp</dimen>
<dimen name="dp_273">273dp</dimen>
<dimen name="dp_274">274dp</dimen>
<dimen name="dp_275">275dp</dimen>
<dimen name="dp_276">276dp</dimen>
<dimen name="dp_277">277dp</dimen>
<dimen name="dp_278">278dp</dimen>
<dimen name="dp_279">279dp</dimen>
<dimen name="dp_280">280dp</dimen>
<dimen name="dp_281">281dp</dimen>
<dimen name="dp_282">282dp</dimen>
<dimen name="dp_283">283dp</dimen>
<dimen name="dp_284">284dp</dimen>
<dimen name="dp_285">285dp</dimen>
<dimen name="dp_286">286dp</dimen>
<dimen name="dp_287">287dp</dimen>
<dimen name="dp_288">288dp</dimen>
<dimen name="dp_289">289dp</dimen>
<dimen name="dp_290">290dp</dimen>
<dimen name="dp_291">291dp</dimen>
<dimen name="dp_292">292dp</dimen>
<dimen name="dp_293">293dp</dimen>
<dimen name="dp_294">294dp</dimen>
<dimen name="dp_295">295dp</dimen>
<dimen name="dp_296">296dp</dimen>
<dimen name="dp_297">297dp</dimen>
<dimen name="dp_298">298dp</dimen>
<dimen name="dp_299">299dp</dimen>
<dimen name="dp_300">300dp</dimen>
<dimen name="dp_301">301dp</dimen>
<dimen name="dp_302">302dp</dimen>
<dimen name="dp_303">303dp</dimen>
<dimen name="dp_304">304dp</dimen>
<dimen name="dp_305">305dp</dimen>
<dimen name="dp_306">306dp</dimen>
<dimen name="dp_307">307dp</dimen>
<dimen name="dp_308">308dp</dimen>
<dimen name="dp_309">309dp</dimen>
<dimen name="dp_310">310dp</dimen>
<dimen name="dp_311">311dp</dimen>
<dimen name="dp_312">312dp</dimen>
<dimen name="dp_313">313dp</dimen>
<dimen name="dp_314">314dp</dimen>
<dimen name="dp_315">315dp</dimen>
<dimen name="dp_316">316dp</dimen>
<dimen name="dp_317">317dp</dimen>
<dimen name="dp_318">318dp</dimen>
<dimen name="dp_319">319dp</dimen>
<dimen name="dp_320">320dp</dimen>
<dimen name="dp_321">321dp</dimen>
<dimen name="dp_322">322dp</dimen>
<dimen name="dp_323">323dp</dimen>
<dimen name="dp_324">324dp</dimen>
<dimen name="dp_325">325dp</dimen>
<dimen name="dp_326">326dp</dimen>
<dimen name="dp_327">327dp</dimen>
<dimen name="dp_328">328dp</dimen>
<dimen name="dp_329">329dp</dimen>
<dimen name="dp_330">330dp</dimen>
<dimen name="dp_331">331dp</dimen>
<dimen name="dp_332">332dp</dimen>
<dimen name="dp_333">333dp</dimen>
<dimen name="dp_334">334dp</dimen>
<dimen name="dp_335">335dp</dimen>
<dimen name="dp_336">336dp</dimen>
<dimen name="dp_337">337dp</dimen>
<dimen name="dp_338">338dp</dimen>
<dimen name="dp_339">339dp</dimen>
<dimen name="dp_340">340dp</dimen>
<dimen name="dp_341">341dp</dimen>
<dimen name="dp_342">342dp</dimen>
<dimen name="dp_343">343dp</dimen>
<dimen name="dp_344">344dp</dimen>
<dimen name="dp_345">345dp</dimen>
<dimen name="dp_346">346dp</dimen>
<dimen name="dp_347">347dp</dimen>
<dimen name="dp_348">348dp</dimen>
<dimen name="dp_349">349dp</dimen>
<dimen name="dp_350">350dp</dimen>
<dimen name="dp_351">351dp</dimen>
<dimen name="dp_352">352dp</dimen>
<dimen name="dp_353">353dp</dimen>
<dimen name="dp_354">354dp</dimen>
<dimen name="dp_355">355dp</dimen>
<dimen name="dp_356">356dp</dimen>
<dimen name="dp_357">357dp</dimen>
<dimen name="dp_358">358dp</dimen>
<dimen name="dp_359">359dp</dimen>
<dimen name="dp_360">360dp</dimen>
<dimen name="dp_365">365dp</dimen>
<dimen name="dp_370">370dp</dimen>
<dimen name="dp_400">400dp</dimen>
<dimen name="dp_410">410dp</dimen>
<dimen name="dp_422">422dp</dimen>
<dimen name="dp_472">472dp</dimen>
<dimen name="dp_500">500dp</dimen>
<dimen name="dp_600">600dp</dimen>
<dimen name="dp_640">640dp</dimen>
<dimen name="dp_720">720dp</dimen>
<!-- font size,you can add if there is no one -->
<dimen name="sp_6">6sp</dimen>
<dimen name="sp_7">7sp</dimen>
<dimen name="sp_8">8sp</dimen>
<dimen name="sp_9">9sp</dimen>
<dimen name="sp_10">10sp</dimen>
<dimen name="sp_11">11sp</dimen>
<dimen name="sp_12">12sp</dimen>
<dimen name="sp_13">13sp</dimen>
<dimen name="sp_14">14sp</dimen>
<dimen name="sp_15">15sp</dimen>
<dimen name="sp_16">16sp</dimen>
<dimen name="sp_17">17sp</dimen>
<dimen name="sp_18">18sp</dimen>
<dimen name="sp_19">19sp</dimen>
<dimen name="sp_20">20sp</dimen>
<dimen name="sp_21">21sp</dimen>
<dimen name="sp_22">22sp</dimen>
<dimen name="sp_23">23sp</dimen>
<dimen name="sp_24">24sp</dimen>
<dimen name="sp_25">25sp</dimen>
<dimen name="sp_28">28sp</dimen>
<dimen name="sp_30">30sp</dimen>
<dimen name="sp_32">32sp</dimen>
<dimen name="sp_34">34sp</dimen>
<dimen name="sp_36">36sp</dimen>
<dimen name="sp_38">38sp</dimen>
<dimen name="sp_40">40sp</dimen>
<dimen name="sp_42">42sp</dimen>
<dimen name="sp_48">48sp</dimen>
<!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="activity_horizontal_margin">16dp</dimen>
<dimen name="activity_vertical_margin">16dp</dimen>
</resources>