|
@@ -1,18 +1,27 @@
|
|
|
package jx.cn.escort.ui.fragment
|
|
|
|
|
|
+import android.Manifest.permission.*
|
|
|
+import android.R
|
|
|
import android.content.Context
|
|
|
+import android.content.DialogInterface
|
|
|
import android.content.SharedPreferences
|
|
|
import android.os.Bundle
|
|
|
import android.view.LayoutInflater
|
|
|
import android.view.View
|
|
|
import android.view.ViewGroup
|
|
|
+import android.widget.FrameLayout
|
|
|
import androidx.fragment.app.Fragment
|
|
|
+import androidx.fragment.app.FragmentContainerView
|
|
|
+import androidx.fragment.app.FragmentTransaction
|
|
|
+import androidx.fragment.app.findFragment
|
|
|
+import com.xuexiang.xqrcode.XQRCode
|
|
|
import com.xuexiang.xui.widget.actionbar.TitleBar
|
|
|
-import jx.cn.escort.R
|
|
|
+import com.xuexiang.xui.widget.button.roundbutton.RoundButton
|
|
|
+import com.xuexiang.xui.widget.dialog.materialdialog.MaterialDialog
|
|
|
import jx.cn.escort.R.layout
|
|
|
-import jx.cn.escort.ui.activity.ActionTaskHandActivity
|
|
|
import jx.cn.escort.ui.activity.EscortTaskHandActivity
|
|
|
import jx.cn.escort.ui.activity.MainActivity
|
|
|
+import jx.cn.escort.ui.activity.QrCodeScanActivity
|
|
|
import jx.cn.escort.utils.ActivityUtils
|
|
|
import org.koin.core.component.KoinComponent
|
|
|
import org.koin.core.component.inject
|
|
@@ -31,8 +40,9 @@ class NetConfirmFragment (context: Context): Fragment(), KoinComponent {
|
|
|
|
|
|
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
|
|
|
val netConfirmFragment:View=inflater.inflate(layout.fragment_net_confirm,container,false)
|
|
|
+ val btnScan=netConfirmFragment.findViewById<RoundButton>(jx.cn.escort.R.id.btn_scan)
|
|
|
val escortTaskHandActivity = context as EscortTaskHandActivity
|
|
|
- var taskHandleTitle = escortTaskHandActivity.findViewById<TitleBar>(R.id.task_handle_title)
|
|
|
+ var taskHandleTitle = escortTaskHandActivity.findViewById<TitleBar>(jx.cn.escort.R.id.task_handle_title)
|
|
|
taskHandleTitle.setTitle("网点交接")
|
|
|
taskHandleTitle.setLeftClickListener(object:View.OnClickListener{
|
|
|
override fun onClick(v: View?) {
|
|
@@ -40,6 +50,18 @@ class NetConfirmFragment (context: Context): Fragment(), KoinComponent {
|
|
|
}
|
|
|
})
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ btnScan.setOnClickListener(object:View.OnClickListener{
|
|
|
+ override fun onClick(v: View?) {
|
|
|
+ ActivityUtils.startActivity(context,QrCodeScanActivity::class.java)
|
|
|
+
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+
|
|
|
return netConfirmFragment
|
|
|
}
|
|
|
|