已知问题修复

This commit is contained in:
lijia 2024-04-28 16:24:08 +08:00
parent 80db6ec326
commit 42e901e39c
22 changed files with 370 additions and 39 deletions

View File

@ -126,6 +126,11 @@
android:configChanges="keyboardHidden|orientation|locale"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustPan|stateHidden" />
<activity
android:name=".base.WebRichTextActivity"
android:configChanges="keyboardHidden|orientation|locale"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustPan|stateHidden" />
<activity
android:name=".ui.HomeActivity"
@ -152,9 +157,10 @@
android:name=".ui.account.AuthSuccActivity"
android:configChanges="keyboardHidden|orientation|locale"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustPan|stateHidden" /><activity
android:name=".ui.account.AuthTeamSuccActivity"
android:configChanges="keyboardHidden|orientation|locale"
android:windowSoftInputMode="adjustPan|stateHidden" />
<activity
android:name=".ui.account.AuthTeamSuccActivity"
android:configChanges="keyboardHidden|orientation|locale"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustPan|stateHidden" />
@ -447,23 +453,19 @@
<service
android:name="com.baidu.location.f"
android:enabled="true"
android:process=":remote">
</service>
android:process=":remote"></service>
<service
android:name="com.alct.mdp.job.LocationUploadJobService"
android:permission="android.permission.BIND_JOB_SERVICE" >
</service>
android:permission="android.permission.BIND_JOB_SERVICE"></service>
<service
android:name="com.alct.mdp.job.LogUploadJobService"
android:permission="android.permission.BIND_JOB_SERVICE" >
</service>
android:permission="android.permission.BIND_JOB_SERVICE"></service>
<service
android:name="com.alct.mdp.job.AppRunningStatusUploadJobService"
android:permission="android.permission.BIND_JOB_SERVICE" >
</service>
android:permission="android.permission.BIND_JOB_SERVICE"></service>
<meta-data
android:name="com.baidu.lbsapi.API_KEY"
@ -483,8 +485,8 @@
<!-- 通知相关start -->
<service
android:name=".push.PushService"
android:process=":pushcore"
android:exported="false">
android:exported="false"
android:process=":pushcore">
<intent-filter>
<action android:name="cn.jiguang.user.service.action" />
</intent-filter>
@ -498,7 +500,7 @@
<service
android:name=".push.PushMessageService"
android:enabled="true"
android:exported="false" >
android:exported="false">
<intent-filter>
<action android:name="cn.jpush.android.intent.SERVICE_MESSAGE" />
<category android:name="com.arpa.hndahesudintocctmsdrive" />

View File

@ -32,7 +32,7 @@ class CarsAdapter() :
)
setGone(R.id.tvNotic,
!(item?.roadLicenseValidityOverdue=="1"||item?.licenseValidityOverdue=="1")
!(item?.roadLicenseValidityOverdue=="1")
)
ImageLoader.getInstance()

View File

@ -42,7 +42,9 @@ class WaybillAdapter :
R.id.tvRate,
"""交易 ${shipperTransactionVolume} 好评率 ${shipperPositiveReviewRate}"""
)
setText(R.id.tvProduct, """${vehicleLength}/${vehicleType}/""")
// setText(R.id.tvProduct, """${vehicleLength}/${vehicleType}/""")
setText(R.id.tvProduct, """${item.goodsList[0].goodItemGrossWeight}/${item.goodsList[0].goodName}""")
setText(R.id.tvProduct, """${if (item.goodsList.isNotEmpty()) item.goodsList[0].goodItemGrossWeight+"/"+ item.goodsList[0].goodName else ""}""")
setText(R.id.tvModel, """${if (orderType == "0") "一装一卸" else "一装多卸"}""")
setText(R.id.btnOk, OrderUtils.getInstance().getOrderStatu(orderStatus))

View File

@ -40,6 +40,9 @@ class WaybillListAdapter(var isCap: Boolean) :
} else if (it.driverEvaluationStatus != "1" && (it.orderStatus == "102060" || it.orderStatus == "102070" || it.orderStatus == "102090")) {
//三种状态下 并且未评论为 true显示
setGone(R.id.btnOk, false)
}else if (it.orderStatus == "103000"){
setGone(R.id.btnOk, true)
setTextColorRes(R.id.tvStatu,R.color.color_9)
}
}

View File

@ -0,0 +1,164 @@
package com.arpa.hndahesudintocctmsdriver.base
import android.os.Bundle
import android.text.TextUtils
import android.view.View
import android.webkit.WebView
import android.widget.FrameLayout
import android.widget.TextView
import com.arpa.hndahesudintocctmsdriver.databinding.ActivityWebBinding
import com.arpa.hndahesudintocctmsdriver.utils.SPUtils
import com.arpa.mylibrary.R
import com.arpa.mylibrary.base.BaseActivity
import com.just.agentweb.AgentWeb
import com.just.agentweb.AgentWebUIControllerImplBase
import com.just.agentweb.WebChromeClient
/**
* @ClassName WebActivity
* @Author john
* @Date 2024/2/1 15:08
* @Description TODO
*/
class WebRichTextActivity : 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)
if (mUrl == "https://support.qq.com/products/335639") {
val userInfo = SPUtils.instance.getUserInfo(mContext)
var postData =
"""nickname=${if (userInfo?.idcardName.isNullOrEmpty()) "游客" else userInfo?.idcardName}&avatar=${userInfo?.avatar}&openid=${userInfo?.contactPhone}"""
mAgentWeb?.webCreator?.webView?.postUrl(mUrl, postData.toByteArray())
}
// mAgentWeb?.jsInterfaceHolder?.addJavaObject("phone", AndroidInterfaceWeb())
}
override fun initDate() {
}
fun initOpinion() {
binding.run {
// val ub: UserBean? = SPUtils.instance.getUserInfo(mContext)
// wv.getSettings().setJavaScriptEnabled(true)
// wv.getSettings().setDomStorageEnabled(true) // 这个要加上
// val openid: String = ub.getData().getUname() // 用户的openid
// val nickname: String = StringUtil.isNull(ub.getData().getRname(), "游客") // 用户的nickname
// val headimgurl: String =
// StringUtil.isNull(ub.getData().getHeadportraitUrl(), "") // 用户的头像url
//
// /* 获得 webview url请注意url单词是product而不是productsproducts是旧版本的参数用错地址将不能成功提交 */
// val url = "https://support.qq.com/products/335639" // 把1221数字换成你的产品ID否则会不成功
// /* 准备post参数 */
// val postData =
// "nickname=$nickname&avatar=$headimgurl&openid=$openid"
// wv.postUrl(url, postData.toByteArray())
// wv.setWebChromeClient(chromeClient)
// wv.setWebViewClient(object : android.webkit.WebViewClient() {
// override fun shouldOverrideUrlLoading(
// view: WebView,
// request: WebResourceRequest
// ): Boolean {
// return super.shouldOverrideUrlLoading(view, request)
// }
//
// override fun shouldOverrideUrlLoading(view: WebView, url: String): Boolean {
// //返回值是true的时候控制去WebView打开为false调用系统浏览器或第三方浏览器
// view.loadUrl(url)
// return true
// }
// })
}
}
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()
}
override fun onBackPressed() {
// super.onBackPressed()
if (!mAgentWeb!!.back()) finish()
}
// 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

@ -334,7 +334,7 @@ class AuthDrivingActivity : BaseActivity<ActivityAuthDrivingBinding>() {
})
)
}else{
DataManager.getInstance().bindCar(CarBean(carId = upDrivingInfoBean.carId))
DataManager.getInstance().bindCar(CarBean(carId = t.data.carId))
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(BaseObserver(mContext, object : RxHttpCallBack<Any>() {

View File

@ -172,6 +172,9 @@ class AuthTrailerActivity : BaseActivity<ActivityAuthTrailerBinding>() {
approvedLoad =
if (it.permittedWeight.contains("kg")) it.permittedWeight.split("kg")[0] else ""
}
binding.run {
etHdzzz.setText(upDrivingInfoBean.approvedLoad)
}
//车长
if (it.overallDimension.contains("mm")) {
@ -206,6 +209,7 @@ class AuthTrailerActivity : BaseActivity<ActivityAuthTrailerBinding>() {
if (binding.tvCarType.text.isNullOrEmpty() ||
binding.etCarNum.text.isNullOrEmpty() ||
binding.tvCarColor.text.isNullOrEmpty() ||
binding.etHdzzz.text.isNullOrEmpty() ||
upDrivingInfoBean.licenseFaceUrl.isNullOrEmpty() ||
upDrivingInfoBean.licenseBackUrl.isNullOrEmpty()
) {

View File

@ -132,6 +132,7 @@ class EditTrailerActivity : BaseActivity<ActivityAuthTrailerBinding>() {
.loadRoundImage(mContext, data.licenseBackUrl, 12, ivBack)
ImageLoader.getInstance()
etHdzzz.setText(data.approvedLoad)
etCarNum.setText(data.vehicleNum)
tvCarType.text = data.vehicleType
@ -218,6 +219,9 @@ class EditTrailerActivity : BaseActivity<ActivityAuthTrailerBinding>() {
approvedLoad =
if (it.permittedWeight.contains("kg")) it.permittedWeight.split("kg")[0] else ""
}
binding.run {
etHdzzz.setText(upDrivingInfoBean.approvedLoad)
}
//车长
if (it.overallDimension.contains("mm")) {
@ -255,6 +259,7 @@ class EditTrailerActivity : BaseActivity<ActivityAuthTrailerBinding>() {
if (binding.tvCarType.text.isNullOrEmpty() ||
binding.etCarNum.text.isNullOrEmpty() ||
binding.tvCarColor.text.isNullOrEmpty() ||
binding.etHdzzz.text.isNullOrEmpty() ||
upDrivingInfoBean.licenseFaceUrl.isNullOrEmpty() ||
upDrivingInfoBean.licenseBackUrl.isNullOrEmpty()
) {

View File

@ -37,6 +37,7 @@ import com.arpa.mylibrary.base.BaseFragment
import com.arpa.mylibrary.callback.RefreshCallBack
import com.arpa.mylibrary.net.CommonResponseBean
import com.arpa.mylibrary.utils.ActivityUtils
import com.arpa.mylibrary.utils.BaseUtils
import com.arpa.mylibrary.utils.ImageLoader
import com.arpa.mylibrary.utils.PhoneFormatCheckUtils
import com.arpa.mylibrary.utils.ToastUtils
@ -204,7 +205,8 @@ class MineFragment : BaseFragment<FragmentMineBinding>(), View.OnClickListener,
}
2 -> {
ToastUtils.showToast(mContext, plats[pos].title)
BaseUtils.callPhone(activity as AppCompatActivity?,"拨打电话","13783631930")
// ToastUtils.showToast(mContext, plats[pos].title)
}
3 -> {

View File

@ -1,7 +1,12 @@
package com.arpa.hndahesudintocctmsdriver.ui.mine.activity
import android.graphics.Bitmap
import android.os.Bundle
import android.text.Html
import android.webkit.WebSettings
import android.webkit.WebView
import android.webkit.WebViewClient
import android.widget.FrameLayout
import com.arpa.hndahesudintocctmsdriver.R
import com.arpa.hndahesudintocctmsdriver.base.AppConfig.DATA
import com.arpa.hndahesudintocctmsdriver.bean.ProBean
@ -12,9 +17,13 @@ import com.arpa.hndahesudintocctmsdriver.net.RxHttpCallBack
import com.arpa.mylibrary.base.BaseActivity
import com.arpa.mylibrary.net.CommonResponseBean
import com.google.gson.Gson
import com.just.agentweb.AgentWeb
import com.just.agentweb.AgentWebUIControllerImplBase
import com.just.agentweb.WebChromeClient
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers
import io.reactivex.rxjava3.schedulers.Schedulers
/**
* @ClassName ComProActivity
* @Author john
@ -22,10 +31,22 @@ import io.reactivex.rxjava3.schedulers.Schedulers
* @Description 问题详情
*/
class ComProDetailActivity : BaseActivity<ActivityComProDetailBinding>() {
private var mAgentWeb: AgentWeb? = null
override fun initView(savedInstanceState: Bundle?) {
setStatusBarColor(R.color.white)
setTitleBar("常见问题", true)
mAgentWeb = AgentWeb.with(this)
.setAgentWebParent(binding.WebViewLayout, FrameLayout.LayoutParams(-1, -1))
.useDefaultIndicator()
.setWebChromeClient(mWebChromeClient)
.setSecurityType(AgentWeb.SecurityType.DEFAULT_CHECK)
.setAgentWebUIController(AgentWebUIControllerImplBase())
.createAgentWeb()
.ready()
.go("")
}
override fun initDate() {
@ -42,9 +63,24 @@ class ComProDetailActivity : BaseActivity<ActivityComProDetailBinding>() {
override fun onSuccess(t: CommonResponseBean<ProBean>) {
super.onSuccess(t)
binding.run {
tvContent.text = Html.fromHtml(t.data.contentData)
mAgentWeb?.webCreator?.webView?.loadDataWithBaseURL(null,t.data.contentData,"text/html" , "utf-8", null)
// mAgentWeb?.webCreator?.webView?.postUrl(mUrl, postData.toByteArray())
}
}
}))
}
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() }
}
}
}

View File

@ -2,6 +2,8 @@ package com.arpa.hndahesudintocctmsdriver.ui.mine.activity
import android.os.Bundle
import android.text.Html
import android.webkit.WebView
import android.widget.FrameLayout
import com.arpa.hndahesudintocctmsdriver.R
import com.arpa.hndahesudintocctmsdriver.base.AppConfig.DATA
import com.arpa.hndahesudintocctmsdriver.bean.QueDetail
@ -13,6 +15,9 @@ import com.arpa.hndahesudintocctmsdriver.net.RxHttpCallBack
import com.arpa.mylibrary.base.BaseActivity
import com.arpa.mylibrary.net.CommonResponseBean
import com.google.gson.Gson
import com.just.agentweb.AgentWeb
import com.just.agentweb.AgentWebUIControllerImplBase
import com.just.agentweb.WebChromeClient
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers
import io.reactivex.rxjava3.schedulers.Schedulers
@ -23,10 +28,19 @@ import io.reactivex.rxjava3.schedulers.Schedulers
* @Description 安全课堂详情
*/
class QueDetailActivity : BaseActivity<ActivityQueDetailBinding>() {
private var mAgentWeb: AgentWeb? = null
override fun initView(savedInstanceState: Bundle?) {
setStatusBarColor(R.color.white)
setTitleBar("安全课堂", true)
mAgentWeb = AgentWeb.with(this)
.setAgentWebParent(binding.WebViewLayout, FrameLayout.LayoutParams(-1, -1))
.useDefaultIndicator()
.setWebChromeClient(mWebChromeClient)
.setSecurityType(AgentWeb.SecurityType.DEFAULT_CHECK)
.setAgentWebUIController(AgentWebUIControllerImplBase())
.createAgentWeb()
.ready()
.go("")
}
override fun initDate() {
@ -40,9 +54,23 @@ class QueDetailActivity : BaseActivity<ActivityQueDetailBinding>() {
override fun onSuccess(t: CommonResponseBean<QueDetail>) {
super.onSuccess(t)
binding.run {
tvContent.text = Html.fromHtml(t.data.contentData)
// tvContent.text = Html.fromHtml(t.data.contentData)
mAgentWeb?.webCreator?.webView?.loadDataWithBaseURL(null,t.data.contentData,"text/html" , "utf-8", null)
}
}
}))
}
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() }
}
}
}

View File

@ -141,6 +141,7 @@ class WaybillAppraiseActivity : BaseActivity<ActivityWaybillUnloadBinding>() {
tvWaybillNum.text = """运单号:${orderBean.orderNum}"""
tvWaybillStatu.text =
OrderUtils.getInstance().getOrderStatu(orderBean.orderStatus)
btnRight.visibility = if (orderBean.orderStatus=="103000") View.GONE else View.VISIBLE
tvTime.text = orderBean.receiverDeadline
tvComName.text = orderBean.realCompanyName//货主

View File

@ -107,7 +107,7 @@ class WaybillDetailActivity : BaseActivity<ActivityWaybillDetailBinding>() {
)} 卸货"""
tvCom.text = t.data.receiverBusinessName
tvUnloadDis.text = t.data.distance + "km"
tvCarType.text = """${t.data.vehicleLength} ${t.data.vehicleType}"""
tvCarType.text = """${t.data.vehicleLength}/${t.data.vehicleType}"""
if (!t.data.requirement.isNullOrEmpty()) tvRemark.text = t.data.requirement
if (!distance.isNullOrEmpty()) tvLoadDis.text = distance
tvConsignor.text = t.data.realCompanyName

View File

@ -160,7 +160,7 @@ class WaybillUnlLoadActivity : BaseActivity<ActivityWaybillUnloadBinding>() {
tvCom.text = orderBean?.receiverBusinessName//收货方
tvFreight.text = orderBean?.driverFreight.toString()
tvCarInfo.text = """${t.data.vehicleLength} ${t.data.vehicleType}"""
tvCarInfo.text = """${t.data.vehicleLength}/${t.data.vehicleType}"""
tvGoods.text = goods
tvReceTime.text = orderBean.waybillInfo.receivingOrderTime

View File

@ -64,7 +64,7 @@ class CommonPopUtils private constructor() {
.dismissOnTouchOutside(false)
.asCustom(
AgreementAlert(
context, "https://agreement.dahehuoyun.com/huawei/#/private",
context, "http://agreement.dahehuoyun.com/huawei/#/private",
"http://agreement.dahehuoyun.com/#/user", listener
)
)

View File

@ -202,6 +202,36 @@
tools:text="王海生"></EditText>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_14"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxWidth="@dimen/dp_100"
android:text="核定载质量"
android:textColor="@color/black"
android:textSize="@dimen/sp_15"></TextView>
<EditText
android:id="@+id/etHdzzz"
android:layout_width="0dp"
android:layout_height="@dimen/dp_34"
android:layout_marginLeft="@dimen/dp_10"
android:layout_weight="1"
android:background="@null"
android:inputType="number"
android:gravity="right|center_vertical"
android:hint="请输入车辆核定载质量"
android:paddingRight="@dimen/dp_10"
android:textColor="@color/black"
android:textSize="@dimen/sp_15"
></EditText>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"

View File

@ -23,7 +23,7 @@
android:layout_weight="1" />
<LinearLayout
android:visibility="gone"
android:id="@+id/llBtn"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_70"

View File

@ -34,13 +34,19 @@
/>
</LinearLayout>
<TextView
android:id="@+id/tvContent"
<!-- <WebView-->
<!-- android:id="@+id/webview"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="match_parent"-->
<!-- />-->
<FrameLayout
android:id="@+id/WebViewLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="@dimen/dp_12"
android:padding="@dimen/dp_12"
android:background="@color/white" />
android:layout_marginTop="@dimen/dp_12">
</FrameLayout>
</LinearLayout>

View File

@ -7,13 +7,21 @@
<include layout="@layout/common_toolbar"></include>
<TextView
android:id="@+id/tvContent"
<!-- <TextView-->
<!-- android:id="@+id/tvContent"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="match_parent"-->
<!-- android:layout_marginTop="@dimen/dp_12"-->
<!-- android:padding="@dimen/dp_12"-->
<!-- />-->
<FrameLayout
android:id="@+id/WebViewLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="@dimen/dp_12"
android:padding="@dimen/dp_12"
/>
android:layout_marginTop="@dimen/dp_12">
</FrameLayout>
</LinearLayout>

View File

@ -159,11 +159,14 @@
android:layout_height="wrap_content"
android:gravity="center"
android:text="20吨/螺纹钢"
android:maxLines="1"
android:ellipsize="end"
android:maxWidth="@dimen/dp_200"
android:textColor="@color/color_6"
android:textSize="@dimen/sp_15" />
<LinearLayout
android:layout_width="match_parent"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="right"
@ -183,7 +186,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:text="元/趟"
android:text="元"
android:textColor="@color/main_red"
android:textSize="@dimen/sp_12" />
</LinearLayout>

View File

@ -14,6 +14,7 @@
<color name="colorBlackE">#EEEEEE</color>
<color name="color_3">#333333</color>
<color name="color_6">#666666</color>
<color name="color_9">#999999</color>
<color name="color_c">#cccccc</color>
<color name="theme_color">#ED4C19</color>

View File

@ -99,7 +99,43 @@ public class BaseUtils {
viewHolder.setOnClickListener(R.id.ok, new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(Intent.ACTION_CALL);
Intent intent = new Intent(Intent.ACTION_DIAL);
Uri data = Uri.parse("tel:" + phoneNum);
intent.setData(data);
context.startActivity(intent);
baseNiceDialog.dismiss();
}
});
viewHolder.setOnClickListener(R.id.cancel, new View.OnClickListener() {
@Override
public void onClick(View v) {
baseNiceDialog.dismiss();
}
});
}
})
.setWidth(260).show(context.getSupportFragmentManager());
}
/**
* 拨打电话直接拨打电话
* @param phoneNum 电话号码
*/
public static void callPhone(AppCompatActivity context ,String title, String phoneNum){
NiceDialog.init()
.setLayoutId(R.layout.dialog_phone)
.setConvertListener(new ViewConvertListener() {
@Override
protected void convertView(ViewHolder viewHolder, BaseNiceDialog baseNiceDialog) {
viewHolder.setText(R.id.message, phoneNum);
viewHolder.setText(R.id.title, title);
viewHolder.setOnClickListener(R.id.ok, new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(Intent.ACTION_DIAL);
Uri data = Uri.parse("tel:" + phoneNum);
intent.setData(data);
context.startActivity(intent);