| | |
| | | import android.os.PersistableBundle |
| | | import android.view.View |
| | | import cn.sinata.xldutils.activitys.DialogActivity |
| | | import cn.sinata.xldutils.utils.* |
| | | import cn.sinata.xldutils.utils.Toast |
| | | import cn.sinata.xldutils.utils.clickDelay |
| | | import cn.sinata.xldutils.utils.doubleTwo |
| | | import cn.sinata.xldutils.utils.gone |
| | | import cn.sinata.xldutils.utils.sysErr |
| | | import cn.sinata.xldutils.utils.visible |
| | | import com.amap.api.maps.AMap |
| | | import com.amap.api.maps.model.LatLng |
| | | import com.google.gson.Gson |
| | | import com.ziang.driver.R |
| | | import com.ziang.driver.base.BaseEvent |
| | | import com.ziang.driver.base.MyApplication |
| | | import com.ziang.driver.base.gaode.AMapKit |
| | | import com.ziang.driver.bean.OrderBean |
| | | import com.ziang.driver.netUtls.* |
| | | import com.ziang.driver.netUtls.Api |
| | | import com.ziang.driver.netUtls.callNet |
| | | import com.ziang.driver.netUtls.createView |
| | | import com.ziang.driver.netUtls.getMapByAny |
| | | import com.ziang.driver.netUtls.timeOver |
| | | import com.ziang.driver.ui.UiUtil |
| | | import com.google.gson.Gson |
| | | import kotlinx.android.synthetic.main.item_get_order.* |
| | | import kotlinx.android.synthetic.main.item_map_market.view.* |
| | | import kotlinx.android.synthetic.main.item_get_order.map_view |
| | | import kotlinx.android.synthetic.main.item_get_order.tv_car_type |
| | | import kotlinx.android.synthetic.main.item_get_order.tv_cargo_money |
| | | import kotlinx.android.synthetic.main.item_get_order.tv_cargo_num |
| | | import kotlinx.android.synthetic.main.item_get_order.tv_close |
| | | import kotlinx.android.synthetic.main.item_get_order.tv_end |
| | | import kotlinx.android.synthetic.main.item_get_order.tv_money |
| | | import kotlinx.android.synthetic.main.item_get_order.tv_name |
| | | import kotlinx.android.synthetic.main.item_get_order.tv_reassign |
| | | import kotlinx.android.synthetic.main.item_get_order.tv_remark |
| | | import kotlinx.android.synthetic.main.item_get_order.tv_start |
| | | import kotlinx.android.synthetic.main.item_get_order.tv_sure |
| | | import kotlinx.android.synthetic.main.item_get_order.tv_tance |
| | | import kotlinx.android.synthetic.main.item_get_order.tv_time |
| | | import kotlinx.android.synthetic.main.item_get_order.tv_title |
| | | import kotlinx.android.synthetic.main.item_map_market.view.iv_img |
| | | import org.greenrobot.eventbus.EventBus |
| | | import org.greenrobot.eventbus.Subscribe |
| | | import org.greenrobot.eventbus.ThreadMode |
| | | import org.jetbrains.anko.startActivity |
| | | |
| | | class GetOrderFragment : DialogActivity() { |
| | |
| | | |
| | | override fun onCreate(savedInstanceState: Bundle?, persistentState: PersistableBundle?) { |
| | | super.onCreate(savedInstanceState, persistentState) |
| | | EventBus.getDefault().register(this) |
| | | map_view.onCreate(savedInstanceState) |
| | | } |
| | | |
| | |
| | | super.onDestroy() |
| | | time.cancel() |
| | | MyApplication.getTTsManager().stopSpeaking() |
| | | EventBus.getDefault().unregister(this) |
| | | map_view.onDestroy() |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | @Subscribe(threadMode = ThreadMode.MAIN) |
| | | open fun onEventMainThread(event: BaseEvent) { |
| | | when (event.code) { |
| | | BaseEvent.ORDER_GRAB_EVENT -> { |
| | | if (orderId == event.msg) |
| | | finish() |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | } |