@@ -8,6 +8,8 @@ | |||
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" /> | |||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> | |||
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> | |||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> | |||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <!-- 拍照权限 --> | |||
<uses-permission android:name="android.permission.INTERNET" /> <!-- 外部存储 --> | |||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> <!-- 安卓11还需要另外添加下面这条权限 --> | |||
<uses-permission | |||
@@ -16,9 +18,6 @@ | |||
<uses-permission | |||
android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" | |||
tools:ignore="ProtectedPermissions" /> | |||
<uses-permission | |||
android:name="android.permission.WRITE_EXTERNAL_STORAGE" | |||
tools:ignore="ScopedStorage" /> <!-- 拍照权限 --> | |||
<uses-permission android:name="android.permission.CAMERA" /> <!-- 安装权限 --> | |||
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" /> <!-- 定位权限(用于 WebView 定位) --> | |||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> |
@@ -40,9 +40,9 @@ import retrofit2.converter.scalars.ScalarsConverterFactory; | |||
public class MyRetrofit { | |||
//是否设置缓存 | |||
private static final boolean Cache = false; | |||
private final String BaseUrl = "http://192.168.100.63:8087/ifzt/api/"; | |||
// private final String BaseUrl = "http://192.168.100.63:8087/ifzt/api/"; | |||
// private final String BaseUrl = "http://58.16.58.161:19002/ifzt/api/"; | |||
// private final String BaseUrl = "http://222.85.144.89:19002/ifzt/api/"; | |||
private final String BaseUrl = "http://222.85.144.89:19002/ifzt/api/"; | |||
private final String appId = "admin001"; | |||
private final String IFCODE = ""; | |||
private final String bizContent = ""; | |||
@@ -149,9 +149,9 @@ public class MyRetrofit { | |||
client = new OkHttpClient.Builder() | |||
.addInterceptor(headerInterceptor) /*添加请求头*/ | |||
.addInterceptor(logging) //添加拦截器 | |||
.connectTimeout(200, TimeUnit.SECONDS) //链接超时 | |||
.readTimeout(200, TimeUnit.SECONDS) //设置读取超时 | |||
.writeTimeout(200, TimeUnit.SECONDS) //写超时 | |||
.connectTimeout(60, TimeUnit.SECONDS) //链接超时 | |||
.readTimeout(60, TimeUnit.SECONDS) //设置读取超时 | |||
.writeTimeout(60, TimeUnit.SECONDS) //写超时 | |||
.retryOnConnectionFailure(true) //链接失败时重试 | |||
.build(); | |||
return client; |
@@ -2,6 +2,9 @@ package com.huntersun.vkyes.etcopencard.project.api; | |||
import com.huntersun.vkyes.etcopencard.project.tool.MyShared; | |||
/** | |||
* @author admin | |||
*/ | |||
public class Parameters { | |||
private String openId = (String) MyShared.getInstance().get(MyShared.OPENID,""); | |||
private String opId = (String) MyShared.getInstance().get(MyShared.OPENID,""); | |||
@@ -11,6 +14,15 @@ public class Parameters { | |||
private String pageNo; | |||
private String pageSize; | |||
private String orderStep; | |||
private String vehiclePlate; | |||
public String getVehiclePlate() { | |||
return vehiclePlate; | |||
} | |||
public void setVehiclePlate(String vehiclePlate) { | |||
this.vehiclePlate = vehiclePlate; | |||
} | |||
public String getOpId() { | |||
return opId; |
@@ -92,6 +92,7 @@ public class IFCode { | |||
public static final String IFCODE56 = "56"; //订单支付下单接口 | |||
public static final String IFCODE57 = "57"; //订单支付结果查询接口 | |||
public static final String IFCODE146 = "146"; //卡签注销 | |||
public static final String IFCODE148 = "148"; //apk 版本查询接口 | |||
public static final String IFCODE149 = "149"; //根据订单ID获取部分订单信息(车辆信息、用户信息) | |||
public static final String IFCODE150 = "150"; //查询全部待发货订单 | |||
public static final String IFCODE155 = "155"; //查询全部待发货订单 |
@@ -191,6 +191,9 @@ public class ResultBean<T> { | |||
private List<Products> products; | |||
private List<BizContent> data; | |||
private String address; | |||
private String tabIndex; | |||
private String pageNo; | |||
private String pageSize; | |||
private String rechargeId; | |||
private Long rechargeMoney; | |||
private List<BizContent> orderDTOs; | |||
@@ -340,6 +343,30 @@ public class ResultBean<T> { | |||
private ObuDetailInfoBean.UserPromiseCBBean userPromiseCBBean; | |||
private ObuDetailInfoBean.QueryCarInfoCBBean queryCarInfoCBBean; | |||
public String getTabIndex() { | |||
return tabIndex; | |||
} | |||
public void setTabIndex(String tabIndex) { | |||
this.tabIndex = tabIndex; | |||
} | |||
public String getPageNo() { | |||
return pageNo; | |||
} | |||
public void setPageNo(String pageNo) { | |||
this.pageNo = pageNo; | |||
} | |||
public String getPageSize() { | |||
return pageSize; | |||
} | |||
public void setPageSize(String pageSize) { | |||
this.pageSize = pageSize; | |||
} | |||
public String getUserType() { | |||
return userType; | |||
} |
@@ -64,8 +64,7 @@ public class ContractActivity extends AppActivity { | |||
@Override | |||
@SingleClick | |||
public void onClick(View view) { | |||
LiveEventBus.get("homeUpdateData").post("更新首页信息内容"); | |||
LiveEventBus.get("homeOneUpdateData").post("更新首页列表信息内容"); | |||
LiveEventBus.get("homeOneUpdateData").post(""); | |||
Intent intent = new Intent(); | |||
intent.putExtra("orderId", getIntent().getStringExtra("orderId")); | |||
intent.setClass(ContractActivity.this, ETCHandleActivity.class); |
@@ -119,8 +119,7 @@ public class DefrayActivity extends AppActivity implements StatusAction { | |||
String msg = ""; | |||
switch (bizContent1.getTradeState()) { | |||
case "SUCCESS": //支付成功 | |||
LiveEventBus.get("homeUpdateData").post("更新首页信息内容"); | |||
LiveEventBus.get("homeOneUpdateData").post("更新首页列表信息内容"); | |||
LiveEventBus.get("homeOneUpdateData").post(""); | |||
startActivity(ETCHandleCompleteActivity.class); | |||
finish(); | |||
break; |
@@ -159,7 +159,7 @@ public class HomeListInfo extends AppActivity implements StatusAction { | |||
.enqueue(new Converter<Result>() { | |||
@Override | |||
protected void onSuccess(ResultBean resultBean1, ResultBean.BizContent bizContent) { | |||
LiveEventBus.get("homeOneUpdateData").post("更新首页列表信息内容"); | |||
LiveEventBus.get("homeOneUpdateData").post(""); | |||
toast(resultBean1.getRmsg()); | |||
post(() -> finish()); | |||
} |
@@ -206,8 +206,7 @@ public class IdentityInformationUploadActivity extends AppActivity { | |||
protected void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent1) { | |||
hideDialog(); | |||
binding.nextStep.setEnabled(true); | |||
LiveEventBus.get("homeUpdateData").post("更新首页信息内容"); | |||
LiveEventBus.get("homeOneUpdateData").post("更新首页列表信息内容"); | |||
LiveEventBus.get("homeOneUpdateData").post(""); | |||
if (getIntent().getBooleanExtra("start", false)) { | |||
LiveEventBus.get("credentialsUpdateData").post("更新首页信息内容"); | |||
} else { |
@@ -2,6 +2,8 @@ package com.huntersun.vkyes.etcopencard.project.ui.activity; | |||
import androidx.annotation.NonNull; | |||
import android.animation.AnimatorSet; | |||
import android.animation.ObjectAnimator; | |||
import android.annotation.SuppressLint; | |||
import android.app.Activity; | |||
import android.bluetooth.BluetoothAdapter; | |||
@@ -14,6 +16,10 @@ import android.provider.Settings; | |||
import android.util.Log; | |||
import android.view.MenuItem; | |||
import android.view.View; | |||
import android.view.animation.Animation; | |||
import android.view.animation.ScaleAnimation; | |||
import android.widget.LinearLayout; | |||
import android.widget.RelativeLayout; | |||
import android.widget.Toast; | |||
import com.google.android.material.bottomnavigation.BottomNavigationView; | |||
@@ -28,6 +34,7 @@ import com.huntersun.vkyes.etcopencard.project.api.Converter; | |||
import com.huntersun.vkyes.etcopencard.project.api.FatherBean; | |||
import com.huntersun.vkyes.etcopencard.project.api.MyRetrofit; | |||
import com.huntersun.vkyes.etcopencard.project.api.Result; | |||
import com.huntersun.vkyes.etcopencard.project.api.bean.IFCode; | |||
import com.huntersun.vkyes.etcopencard.project.api.bean.ResultBean; | |||
import com.huntersun.vkyes.etcopencard.project.api.bean.SendTheVerificationCodeBean; | |||
import com.huntersun.vkyes.etcopencard.project.bluetooth.BluetoothDialog; | |||
@@ -123,76 +130,72 @@ public class MainActivity extends AppActivity implements | |||
@Override | |||
protected void initData() { | |||
init(); | |||
Log.e("log", "打印标题:" + "app更新"); | |||
//updateApp(); | |||
updateApp(); | |||
} | |||
private void updateApp() { | |||
// FatherBean<SendTheVerificationCodeBean> fatherBean = new FatherBean<>(); | |||
// fatherBean.bizContent = new SendTheVerificationCodeBean(); | |||
// fatherBean.setFilename("CSMSN_QUERY_VERSIONQUERY_REQ_"); | |||
// Log.e("log", "打印标题:" + "app准备更新"); | |||
// new MyRetrofit().getRetrofit("IF01001202208190810") | |||
// .create(Api.class) | |||
// .message(new Gson().toJson(fatherBean)) | |||
// .enqueue(new Converter<Result>() { | |||
// @Override | |||
// protected void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { | |||
// // 本地的版本码和服务器的进行比较 | |||
// Log.e("okhttp", "==========:" + FileImageTool.compareVersion(bizContent.getVersion(), AppConfig.getVersionName())); | |||
// if (FileImageTool.compareVersion(bizContent.getVersion(), AppConfig.getVersionName()) == 1) { | |||
// new UpdateDialog.Builder(getActivity()) | |||
// // 版本名 | |||
// .setVersionName(bizContent.getVersion()) | |||
// // 是否强制更新 | |||
// .setForceUpdate(bizContent.getIsUpLevel()) | |||
// // 更新日志 | |||
// .setUpdateLog(bizContent.getMessage()) | |||
// // 下载 url Url.http_img + result.data.getUrl() | |||
// .setDownloadUrl(bizContent.getUrl()) | |||
// .show(); | |||
// | |||
// } | |||
// } | |||
// | |||
// @Override | |||
// public void onError(String err, Response<Result> resp) { | |||
// super.onError(err, resp); | |||
// } | |||
// }); | |||
MyRetrofit.newInstance(IFCode.IFCODE148, new ResultBean.BizContent<>(), new MyRetrofit.ReturnResult() { | |||
@Override | |||
public void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { | |||
if (FileImageTool.compareVersion(bizContent.getVersion(), AppConfig.getVersionName()) == 1) { | |||
new UpdateDialog.Builder(getActivity()) | |||
// 版本名 | |||
.setVersionName(bizContent.getVersion()) | |||
// 是否强制更新 | |||
.setForceUpdate(bizContent.getIsUpLevel()) | |||
// 更新日志 | |||
.setUpdateLog(bizContent.getMessage()) | |||
// 下载 url Url.http_img + result.data.getUrl() | |||
.setDownloadUrl(bizContent.getUrl()) | |||
.show(); | |||
} | |||
} | |||
}); | |||
} | |||
@Permissions({Permission.ACCESS_COARSE_LOCATION, Permission.READ_EXTERNAL_STORAGE, | |||
Permission.WRITE_EXTERNAL_STORAGE, Permission.CAMERA, Permission.ACCESS_FINE_LOCATION}) | |||
public void init() { | |||
} | |||
@Override | |||
public void onClick(View view) { | |||
if (view.getId() == R.id.add) { | |||
Intent intent = new Intent(); | |||
new PersonalCompanyDialog.Builder(this).onClick(new PersonalCompanyDialog.Result() { | |||
@Override | |||
public void success() { | |||
intent.putExtra("type", "1"); //货车 | |||
intent.setClass(MainActivity.this, FillOutMessage.class); | |||
startActivity(intent); | |||
} | |||
@Override | |||
public void fail() { | |||
intent.putExtra("type", "0"); //客车 | |||
intent.setClass(MainActivity.this, FillOutMessage.class); | |||
startActivity(intent); | |||
} | |||
}).show(); | |||
binding.bnve.setSelectedItemId(R.id.i_empty); | |||
} | |||
} | |||
public void handle() { | |||
// 放大效果 | |||
binding.add.setScaleX(1.2f); | |||
binding.add.setScaleY(1.2f); | |||
Intent intent = new Intent(); | |||
new PersonalCompanyDialog.Builder(this) | |||
.onClick(new PersonalCompanyDialog.Result() { | |||
@Override | |||
public void success() { | |||
intent.putExtra("type", "1"); //货车 | |||
intent.setClass(MainActivity.this, FillOutMessage.class); | |||
startActivity(intent); | |||
} | |||
@Override | |||
public void fail() { | |||
intent.putExtra("type", "0"); //客车 | |||
intent.setClass(MainActivity.this, FillOutMessage.class); | |||
startActivity(intent); | |||
} | |||
}).show(); | |||
} | |||
@Override | |||
public boolean onNavigationItemSelected(@NonNull MenuItem item) { | |||
int position; | |||
int itemId = item.getItemId(); | |||
// 放大效果 | |||
binding.add.setScaleX(1f); | |||
binding.add.setScaleY(1f); | |||
if (itemId == R.id.i_firm) { | |||
position = 3; | |||
} else if (itemId == R.id.i_workbench) { | |||
@@ -201,6 +204,9 @@ public class MainActivity extends AppActivity implements | |||
position = 2; | |||
} else if (itemId == R.id.i_music) { | |||
position = 0; | |||
} else if (itemId == R.id.i_empty) { | |||
handle(); | |||
return true; | |||
} else { | |||
return true; | |||
} |
@@ -148,8 +148,7 @@ public class VehicleInformationActivity extends AppActivity { | |||
@Override | |||
protected void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent1) { | |||
binding.nextStep.setEnabled(true); | |||
LiveEventBus.get("homeUpdateData").post("更新首页信息内容"); | |||
LiveEventBus.get("homeOneUpdateData").post("更新首页列表信息内容"); | |||
LiveEventBus.get("homeOneUpdateData").post(""); | |||
if (getIntent().getBooleanExtra("start", false)) { | |||
LiveEventBus.get("credentialsUpdateData").post("更新首页信息内容"); | |||
} else { |
@@ -74,7 +74,7 @@ public class FormDeliveryActivity extends AppActivity { | |||
new MyRetrofit().getRetrofit().create(Api.class).message2(parameters).enqueue(new Converter<Result>(FormDeliveryActivity.this) { | |||
@Override | |||
protected void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { | |||
LiveEventBus.get("homeOneUpdateData").post("更新首页列表信息内容"); | |||
LiveEventBus.get("homeOneUpdateData").post(""); | |||
LiveEventBus.get("ListDeliveryActivityData").post("刷新"); | |||
toast(resultBean.getErrorMsg()); | |||
finish(); |
@@ -35,14 +35,12 @@ public class FragmentHomeFour extends TitleBarFragment<MainActivity> { | |||
@Override | |||
protected View getLayoutView(LayoutInflater inflater, ViewGroup container) { | |||
// binding = FragmentHomeFourBinding.inflate(getLayoutInflater()); | |||
binding = FragmentHomeFourBinding.inflate(inflater, container, false); | |||
return binding.getRoot(); | |||
} | |||
@Override | |||
protected void initView() { | |||
//sb_person_data_address | |||
binding.sbPersonDataAddress.setOnClickListener(this); | |||
binding.sbPersonDataPassword.setOnClickListener(this); | |||
} |
@@ -1,11 +1,16 @@ | |||
package com.huntersun.vkyes.etcopencard.project.ui.fragment; | |||
import android.annotation.SuppressLint; | |||
import android.content.Context; | |||
import android.content.Intent; | |||
import android.util.Log; | |||
import android.view.KeyEvent; | |||
import android.view.LayoutInflater; | |||
import android.view.MotionEvent; | |||
import android.view.View; | |||
import android.view.ViewGroup; | |||
import android.view.inputmethod.EditorInfo; | |||
import android.view.inputmethod.InputMethodManager; | |||
import android.widget.TextView; | |||
import androidx.annotation.NonNull; | |||
@@ -24,9 +29,11 @@ import com.huntersun.vkyes.etcopencard.project.api.Converter; | |||
import com.huntersun.vkyes.etcopencard.project.api.FatherBean; | |||
import com.huntersun.vkyes.etcopencard.project.api.MyRetrofit; | |||
import com.huntersun.vkyes.etcopencard.project.api.Result; | |||
import com.huntersun.vkyes.etcopencard.project.api.bean.EnumBean; | |||
import com.huntersun.vkyes.etcopencard.project.api.bean.ResultBean; | |||
import com.huntersun.vkyes.etcopencard.project.api.bean.SendTheVerificationCodeBean; | |||
import com.huntersun.vkyes.etcopencard.project.tool.MyShared; | |||
import com.huntersun.vkyes.etcopencard.project.ui.activity.HomeListInfo; | |||
import com.huntersun.vkyes.etcopencard.project.ui.activity.MainActivity; | |||
import com.huntersun.vkyes.etcopencard.src.aop.SingleClick; | |||
import com.huntersun.vkyes.etcopencard.src.app.AppFragment; | |||
@@ -63,12 +70,6 @@ public class FragmentHomeOne extends TitleBarFragment<MainActivity> implements V | |||
@SuppressLint("LogNotTimber") | |||
@Override | |||
protected void initView() { | |||
//生命周期中注册方法 | |||
LiveEventBus.get("homeUpdateData", String.class) | |||
.observe(this, s -> { | |||
Log.e("okhttp", "homeUpdateData:" + s); | |||
initData(); | |||
}); | |||
mPagerAdapter = new FragmentPagerAdapter<>(this); | |||
mPagerAdapter.addFragment(FragmentSonOne.newInstance(0), "全部"); | |||
mPagerAdapter.addFragment(FragmentSonOne.newInstance(1), "申办中"); | |||
@@ -83,6 +84,27 @@ public class FragmentHomeOne extends TitleBarFragment<MainActivity> implements V | |||
binding.textThree.setOnClickListener(this); | |||
binding.textFour.setOnClickListener(this); | |||
binding.textFive.setOnClickListener(this); | |||
binding.editQuery.setOnEditorActionListener(new TextView.OnEditorActionListener() { | |||
@Override | |||
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) { | |||
if (actionId == EditorInfo.IME_ACTION_SEARCH) { | |||
// 在这里执行搜索操作 | |||
LiveEventBus.get("homeOneUpdateData").post(binding.editQuery.getText() + ""); | |||
getSystemService(InputMethodManager.class).hideSoftInputFromWindow(binding.editQuery.getWindowToken(), 0); | |||
return true; | |||
} | |||
return false; | |||
} | |||
}); | |||
binding.search.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
@SingleClick | |||
public void onClick(View v) { | |||
LiveEventBus.get("homeOneUpdateData").post(binding.editQuery.getText() + ""); | |||
} | |||
}); | |||
} | |||
@Override | |||
@@ -90,6 +112,15 @@ public class FragmentHomeOne extends TitleBarFragment<MainActivity> implements V | |||
} | |||
BaseQuickAdapter<ResultBean.BizContent, BaseViewHolder> adapter | |||
= new BaseQuickAdapter<ResultBean.BizContent, BaseViewHolder>(R.layout.item_list_content) { | |||
@SuppressLint("LogNotTimber") | |||
@Override | |||
protected void convert(BaseViewHolder helper, ResultBean.BizContent item) { | |||
} | |||
}; | |||
@Override | |||
@SingleClick | |||
public void onClick(View view) { |
@@ -10,6 +10,7 @@ import com.huntersun.vkyes.etcopencard.R; | |||
import com.huntersun.vkyes.etcopencard.databinding.FragmentHomeThreeBinding; | |||
import com.huntersun.vkyes.etcopencard.databinding.FragmentHomeTwoBinding; | |||
import com.huntersun.vkyes.etcopencard.project.ui.activity.MainActivity; | |||
import com.huntersun.vkyes.etcopencard.src.aop.SingleClick; | |||
import com.huntersun.vkyes.etcopencard.src.app.AppFragment; | |||
import com.huntersun.vkyes.etcopencard.src.app.TitleBarFragment; | |||
@@ -31,7 +32,6 @@ public class FragmentHomeThree extends TitleBarFragment<MainActivity> { | |||
@Override | |||
protected View getLayoutView(LayoutInflater inflater, ViewGroup container) { | |||
binding = FragmentHomeThreeBinding.inflate(inflater, container, false); | |||
// binding = FragmentHomeThreeBinding.inflate(getLayoutInflater()); | |||
return binding.getRoot(); | |||
} | |||
@@ -43,27 +43,40 @@ public class FragmentHomeThree extends TitleBarFragment<MainActivity> { | |||
@Override | |||
protected void initView() { | |||
binding.recycler.setAdapter(adapter); | |||
List list = new ArrayList(); | |||
list.add("1"); | |||
list.add("2"); | |||
list.add("3"); | |||
list.add("4"); | |||
list.add("5"); | |||
list.add("6"); | |||
list.add("7"); | |||
adapter.replaceData(list); | |||
binding.textOne.setOnClickListener(this); | |||
binding.textTwo.setOnClickListener(this); | |||
binding.textThree.setOnClickListener(this); | |||
binding.textFour.setOnClickListener(this); | |||
} | |||
BaseQuickAdapter<String, BaseViewHolder> adapter = new BaseQuickAdapter<String, BaseViewHolder>(R.layout.item_three_list) { | |||
@Override | |||
protected void convert(BaseViewHolder helper, String item) { | |||
} | |||
}; | |||
@Override | |||
protected void initData() { | |||
} | |||
@Override | |||
@SingleClick | |||
public void onClick(View view) { | |||
binding.textOne.setTextColor(getColor(R.color.text_off)); | |||
binding.textOne.setBackgroundResource(R.drawable.state1_no); | |||
binding.textTwo.setTextColor(getColor(R.color.text_off)); | |||
binding.textTwo.setBackgroundResource(R.drawable.state2_no); | |||
binding.textThree.setTextColor(getColor(R.color.text_off)); | |||
binding.textThree.setBackgroundResource(R.drawable.state2_no); | |||
binding.textFour.setTextColor(getColor(R.color.text_off)); | |||
binding.textFour.setBackgroundResource(R.drawable.state2_no); | |||
if (view.getId() == R.id.textOne) { //全部 | |||
binding.textOne.setTextColor(getColor(R.color.white)); | |||
binding.textOne.setBackgroundResource(R.drawable.state1); | |||
} else if (view.getId() == R.id.textTwo) { //申办中 | |||
binding.textTwo.setTextColor(getColor(R.color.white)); | |||
binding.textTwo.setBackgroundResource(R.drawable.state2); | |||
} else if (view.getId() == R.id.textThree) { | |||
binding.textThree.setTextColor(getColor(R.color.white)); | |||
binding.textThree.setBackgroundResource(R.drawable.state2); | |||
} else if (view.getId() == R.id.textFour) { | |||
binding.textFour.setTextColor(getColor(R.color.white)); | |||
binding.textFour.setBackgroundResource(R.drawable.state2); | |||
} | |||
} | |||
} |
@@ -33,6 +33,15 @@ import java.util.List; | |||
*/ | |||
public class FragmentHomeTow extends TitleBarFragment<MainActivity> { | |||
private FragmentHomeFiveBinding binding; | |||
private final Object[][] menu = { | |||
{R.mipmap.card1, "卡签查询"}, | |||
{R.mipmap.card2, "发货管理"}, | |||
{R.mipmap.card3, "充值圈存"}, | |||
{R.mipmap.card4, "设备注销"}, | |||
{R.mipmap.card5, "设备挂失"}, | |||
{R.mipmap.card6, "设备挂起"}, | |||
{R.mipmap.card7, "发行检测"} | |||
}; | |||
public static AppFragment<MainActivity> newInstance() { | |||
return new FragmentHomeTow(); | |||
@@ -46,21 +55,19 @@ public class FragmentHomeTow extends TitleBarFragment<MainActivity> { | |||
@Override | |||
protected void initView() { | |||
binding.recycler1.setAdapter(adapter); | |||
binding.recycler2.setAdapter(adapter2); | |||
binding.recycler3.setAdapter(adapter3); | |||
binding.layout1.setVisibility(View.GONE); | |||
binding.layout2.setVisibility(View.GONE); | |||
binding.layout3.setVisibility(View.GONE); | |||
binding.recycler2.setAdapter(adapter); | |||
List<TestBean> list1 = new ArrayList<>(); | |||
for (Object[] objects : menu) { | |||
list1.add(new TestBean((Integer) objects[0], (String) objects[1])); | |||
} | |||
/** | |||
* 圈存(充钱)->注销(类似挂起,但不能回滚)->挂失(不允许通行,卡还能用,不释放车牌)->挂起(不允许通行,释放车牌) | |||
*/ | |||
list1.add(new TestBean(R.mipmap.car1, "卡签查询")); | |||
list1.add(new TestBean(R.mipmap.car2, "发货管理")); | |||
list1.add(new TestBean(R.mipmap.car3, "充值圈存")); | |||
list1.add(new TestBean(R.mipmap.car4, "设备注销")); | |||
list1.add(new TestBean(R.mipmap.car5, "设备挂失")); | |||
list1.add(new TestBean(R.mipmap.car6, "设备挂起")); | |||
list1.add(new TestBean(R.mipmap.car7, "车牌发行检测")); | |||
// list1.add(new TestBean(R.mipmap.car8, "卡签信息查询")); | |||
binding.text1.addTextChangedListener(new TextWatcher() { | |||
// 在文本内容发生改变之前调用 | |||
@Override | |||
@@ -83,14 +90,14 @@ public class FragmentHomeTow extends TitleBarFragment<MainActivity> { | |||
} | |||
//判断为空直接 | |||
if (TextUtils.isEmpty(s)) { | |||
adapter2.replaceData(list1); | |||
adapter.replaceData(list1); | |||
} else { | |||
adapter2.replaceData(list2); | |||
adapter.replaceData(list2); | |||
} | |||
} | |||
}); | |||
adapter2.replaceData(list1); | |||
adapter.replaceData(list1); | |||
} | |||
@Override | |||
@@ -99,14 +106,6 @@ public class FragmentHomeTow extends TitleBarFragment<MainActivity> { | |||
} | |||
BaseQuickAdapter<TestBean, BaseViewHolder> adapter = new BaseQuickAdapter<TestBean, BaseViewHolder>(R.layout.item_grad_list) { | |||
@Override | |||
protected void convert(BaseViewHolder helper, TestBean item) { | |||
helper.setImageResource(R.id.image, item.imgId); | |||
helper.setText(R.id.text, item.message); | |||
} | |||
}; | |||
BaseQuickAdapter<TestBean, BaseViewHolder> adapter2 = new BaseQuickAdapter<TestBean, BaseViewHolder>(R.layout.item_grad_list) { | |||
@Override | |||
protected void convert(BaseViewHolder helper, TestBean item) { | |||
helper.setImageResource(R.id.image, item.imgId); | |||
@@ -143,11 +142,4 @@ public class FragmentHomeTow extends TitleBarFragment<MainActivity> { | |||
} | |||
}; | |||
BaseQuickAdapter<TestBean, BaseViewHolder> adapter3 = new BaseQuickAdapter<TestBean, BaseViewHolder>(R.layout.item_grad_list) { | |||
@Override | |||
protected void convert(BaseViewHolder helper, TestBean item) { | |||
helper.setImageResource(R.id.image, item.imgId); | |||
helper.setText(R.id.text, item.message); | |||
} | |||
}; | |||
} |
@@ -55,6 +55,7 @@ public class FragmentSonOne extends TitleBarFragment<MainActivity> | |||
private FragmentSonOneBinding binding; | |||
private int page = 1; | |||
private int orderStep = 0; | |||
private String licensePlate; | |||
public static AppFragment<MainActivity> newInstance(int start) { | |||
return new FragmentSonOne(start); | |||
@@ -93,13 +94,11 @@ public class FragmentSonOne extends TitleBarFragment<MainActivity> | |||
} | |||
}); | |||
} | |||
}; | |||
@Override | |||
protected View getLayoutView(LayoutInflater inflater, ViewGroup container) { | |||
binding = FragmentSonOneBinding.inflate(inflater, container, false); | |||
// binding = FragmentSonOneBinding.inflate(getLayoutInflater()); | |||
return binding.getRoot(); | |||
} | |||
@@ -126,6 +125,7 @@ public class FragmentSonOne extends TitleBarFragment<MainActivity> | |||
.observe(this, s -> { | |||
Log.e("log", "列表刷新:" + s); | |||
onRefresh(binding.rlStatusRefresh); | |||
licensePlate = s; | |||
}); | |||
} | |||
@@ -145,8 +145,12 @@ public class FragmentSonOne extends TitleBarFragment<MainActivity> | |||
} | |||
parameters.setPageNo(page + ""); | |||
parameters.setPageSize("10"); | |||
parameters.setVehiclePlate(licensePlate); | |||
RequestParameters parameters1 = | |||
new RequestParameters(IFCode.IFCODE36, new Gson().toJson(parameters)); | |||
if (page == 1) { | |||
showLoading(); | |||
} | |||
//通过code换取appid | |||
new MyRetrofit().getRetrofit().create(Api.class).message2(parameters1) | |||
.enqueue(new Converter<Result>(getActivity()) { | |||
@@ -154,7 +158,7 @@ public class FragmentSonOne extends TitleBarFragment<MainActivity> | |||
@Override | |||
protected void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent1) { | |||
if (bizContent1.getData() == null) { | |||
showEmpty(); | |||
postDelayed(FragmentSonOne.this::showEmpty, 300); | |||
} | |||
if (page == 1) { | |||
adapter.replaceData(bizContent1.getData()); | |||
@@ -162,9 +166,9 @@ public class FragmentSonOne extends TitleBarFragment<MainActivity> | |||
adapter.addData(bizContent1.getData()); | |||
} | |||
if (bizContent1.getData().size() == 0 && page == 1) { | |||
showEmpty(); | |||
postDelayed(FragmentSonOne.this::showEmpty, 300); | |||
} else { | |||
showComplete(); | |||
postDelayed(FragmentSonOne.this::showComplete, 300); | |||
} | |||
} | |||
@@ -218,6 +222,7 @@ public class FragmentSonOne extends TitleBarFragment<MainActivity> | |||
@Override | |||
public void onRefresh(@NonNull RefreshLayout refreshLayout) { | |||
licensePlate = ""; | |||
postDelayed(() -> { | |||
page = 1; | |||
LoadData(); |
@@ -21,6 +21,7 @@ import com.hjq.widget.view.SlantedTextView; | |||
* github : https://github.com/getActivity/AndroidProject | |||
* time : 2018/10/18 | |||
* desc : 闪屏界面 | |||
* @author admin | |||
*/ | |||
public final class SplashActivity extends AppActivity { | |||
@@ -172,7 +172,8 @@ public final class ShareDialog { | |||
} else { | |||
if (mShareAction.getShareContent().getShareType() == ShareContent.WEB_STYLE) { | |||
// 复制到剪贴板 | |||
getSystemService(ClipboardManager.class).setPrimaryClip(ClipData.newPlainText("url", mShareAction.getShareContent().mMedia.toUrl())); | |||
getSystemService(ClipboardManager.class) | |||
.setPrimaryClip(ClipData.newPlainText("url", mShareAction.getShareContent().mMedia.toUrl())); | |||
ToastUtils.show(R.string.share_platform_copy_hint); | |||
} | |||
} |
@@ -0,0 +1,7 @@ | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<shape xmlns:android="http://schemas.android.com/apk/res/android"> | |||
<solid android:color="#ffffffff" /> | |||
<corners | |||
android:topLeftRadius="20dp" | |||
android:topRightRadius="20dp" /> | |||
</shape> |
@@ -0,0 +1,14 @@ | |||
<selector xmlns:android="http://schemas.android.com/apk/res/android"> | |||
<item android:shape="oval" android:state_pressed="true"> | |||
<shape android:shape="rectangle"> | |||
<solid android:color="#999999" /> | |||
<stroke android:width="1dp" android:color="#555555" /> | |||
</shape> | |||
</item> | |||
<item> | |||
<shape android:shape="oval"> | |||
<solid android:color="#16BD87" /> | |||
<stroke android:width="1dp" android:color="#16BD87" /> | |||
</shape> | |||
</item> | |||
</selector> |
@@ -1,12 +1,9 @@ | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<shape xmlns:android="http://schemas.android.com/apk/res/android"> | |||
<size | |||
android:width="10dp" | |||
android:height="10dp" /> | |||
<!--android:shape="oval"--> | |||
<shape xmlns:android="http://schemas.android.com/apk/res/android" | |||
> | |||
<!--<solid android:color="#5CBEFF" />--> | |||
<corners android:radius="8dp" /> | |||
<!--angle 倾斜角度--> | |||
<!-- <gradient--> | |||
<!-- android:angle="135"--> | |||
@@ -14,8 +11,7 @@ | |||
<!-- android:startColor="#2F8AFF"--> | |||
<!-- android:type="linear" />--> | |||
<gradient | |||
android:angle="90" | |||
android:endColor="#16BD87" | |||
android:startColor="#07B68A" | |||
android:endColor="#00B38B" | |||
android:startColor="#16BD87" | |||
android:type="linear" /> | |||
</shape> |
@@ -0,0 +1,21 @@ | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<shape xmlns:android="http://schemas.android.com/apk/res/android"> | |||
<size | |||
android:width="10dp" | |||
android:height="10dp" /> | |||
<!--android:shape="oval"--> | |||
<!--<solid android:color="#5CBEFF" />--> | |||
<corners android:radius="8dp" /> | |||
<!--angle 倾斜角度--> | |||
<!-- <gradient--> | |||
<!-- android:angle="135"--> | |||
<!-- android:endColor="#5CBEFF"--> | |||
<!-- android:startColor="#2F8AFF"--> | |||
<!-- android:type="linear" />--> | |||
<gradient | |||
android:angle="90" | |||
android:endColor="#16BD87" | |||
android:startColor="#07B68A" | |||
android:type="linear" /> | |||
</shape> |
@@ -34,25 +34,23 @@ | |||
app:labelVisibilityMode="labeled" | |||
app:menu="@menu/menu_main_button" /> | |||
<LinearLayout | |||
android:layout_width="@dimen/dp_70" | |||
android:layout_height="@dimen/dp_55" | |||
android:layout_alignParentBottom="true" | |||
android:layout_centerHorizontal="true" | |||
android:layout_marginBottom="@dimen/dp_10" | |||
android:background="@drawable/video_ball_bg11" | |||
android:elevation="@dimen/dp_2" /> | |||
<LinearLayout | |||
android:id="@+id/add" | |||
android:layout_width="@dimen/dp_40" | |||
android:layout_height="@dimen/dp_40" | |||
android:layout_width="@dimen/dp_35" | |||
android:layout_height="@dimen/dp_35" | |||
android:layout_alignParentBottom="true" | |||
android:layout_centerHorizontal="true" | |||
android:layout_marginBottom="@dimen/dp_20" | |||
android:background="@mipmap/adds" | |||
android:elevation="@dimen/dp_12" | |||
android:orientation="horizontal" /> | |||
android:layout_marginBottom="@dimen/dp_25" | |||
android:background="@drawable/selector_btn" | |||
android:elevation="@dimen/dp_7" | |||
android:gravity="center"> | |||
<ImageView | |||
android:layout_width="@dimen/dp_24" | |||
android:layout_height="@dimen/dp_24" | |||
android:src="@mipmap/adds" /> | |||
</LinearLayout> | |||
<com.hjq.widget.layout.NoScrollViewPager | |||
android:id="@+id/vp" |
@@ -56,84 +56,141 @@ | |||
</LinearLayout> | |||
<LinearLayout | |||
android:visibility="gone" | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:layout_marginTop="@dimen/dp_12" | |||
android:background="@color/white" | |||
android:minHeight="@dimen/dp_170" | |||
android:orientation="vertical" | |||
android:padding="@dimen/dp_15"> | |||
<TextView | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:text="业务管理" /> | |||
<androidx.recyclerview.widget.RecyclerView | |||
android:id="@+id/recycler1" | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:layout_marginTop="@dimen/dp_10" | |||
tools:listitem="@layout/item_grad_list" | |||
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager" | |||
app:spanCount="5" /> | |||
</LinearLayout> | |||
<LinearLayout | |||
<androidx.core.widget.NestedScrollView | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:layout_marginTop="@dimen/dp_12" | |||
android:background="@color/white" | |||
android:orientation="vertical" | |||
android:padding="@dimen/dp_15"> | |||
<TextView | |||
android:textColor="#333333" | |||
android:textSize="@dimen/sp_14" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:text="ETC售后" /> | |||
android:layout_height="wrap_content"> | |||
<androidx.recyclerview.widget.RecyclerView | |||
android:id="@+id/recycler2" | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:layout_marginTop="@dimen/dp_20" | |||
tools:listitem="@layout/item_grad_list" | |||
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager" | |||
app:spanCount="5" /> | |||
android:orientation="vertical" | |||
android:padding="@dimen/dp_15"> | |||
</LinearLayout> | |||
<LinearLayout | |||
android:visibility="gone" | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:layout_marginTop="@dimen/dp_12" | |||
android:background="@color/white" | |||
android:minHeight="@dimen/dp_170" | |||
android:orientation="vertical" | |||
android:padding="@dimen/dp_15"> | |||
<TextView | |||
android:textColor="#333333" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:text="投诉咨询" /> | |||
<TextView | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:layout_marginBottom="@dimen/dp_12" | |||
android:text="售后业务服务" /> | |||
<androidx.recyclerview.widget.RecyclerView | |||
android:id="@+id/recycler3" | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:layout_marginTop="@dimen/dp_10" | |||
tools:listitem="@layout/item_grad_list" | |||
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager" | |||
app:spanCount="5" /> | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:background="@drawable/home_unm_bg2" | |||
android:orientation="vertical" | |||
android:paddingHorizontal="@dimen/dp_10"> | |||
<androidx.recyclerview.widget.RecyclerView | |||
android:id="@+id/recycler2" | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:layout_marginTop="@dimen/dp_15" | |||
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager" | |||
app:spanCount="5" | |||
tools:listitem="@layout/item_grad_list" /> | |||
</LinearLayout> | |||
<LinearLayout | |||
android:id="@+id/layout1" | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:orientation="vertical"> | |||
<TextView | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:layout_marginVertical="@dimen/dp_12" | |||
android:text="资金管理服务" | |||
android:textColor="#333333" | |||
android:textSize="@dimen/sp_14" /> | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:background="@drawable/home_unm_bg2" | |||
android:orientation="vertical" | |||
android:paddingHorizontal="@dimen/dp_20"> | |||
<androidx.recyclerview.widget.RecyclerView | |||
android:id="@+id/recycler3" | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:layout_marginTop="@dimen/dp_15" | |||
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager" | |||
app:spanCount="5" | |||
tools:listitem="@layout/item_grad_list" /> | |||
</LinearLayout> | |||
</LinearLayout> | |||
<LinearLayout | |||
android:id="@+id/layout2" | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:orientation="vertical"> | |||
<TextView | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:layout_marginVertical="@dimen/dp_12" | |||
android:text="查询功能" | |||
android:textColor="#333333" /> | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:background="@drawable/home_unm_bg2" | |||
android:orientation="vertical" | |||
android:paddingHorizontal="@dimen/dp_20"> | |||
<androidx.recyclerview.widget.RecyclerView | |||
android:id="@+id/recycler4" | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:layout_marginTop="@dimen/dp_15" | |||
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager" | |||
app:spanCount="5" | |||
tools:listitem="@layout/item_grad_list" /> | |||
</LinearLayout> | |||
</LinearLayout> | |||
<LinearLayout | |||
android:id="@+id/layout3" | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:orientation="vertical"> | |||
<TextView | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:layout_marginVertical="@dimen/dp_12" | |||
android:text="其它服务" | |||
android:textColor="#333333" /> | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:background="@drawable/home_unm_bg2" | |||
android:orientation="vertical" | |||
android:paddingHorizontal="@dimen/dp_20"> | |||
<androidx.recyclerview.widget.RecyclerView | |||
android:id="@+id/recycler5" | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:layout_marginTop="@dimen/dp_15" | |||
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager" | |||
app:spanCount="5" | |||
tools:listitem="@layout/item_grad_list" /> | |||
</LinearLayout> | |||
</LinearLayout> | |||
</LinearLayout> | |||
</LinearLayout> | |||
</androidx.core.widget.NestedScrollView> | |||
</LinearLayout> |
@@ -10,7 +10,7 @@ | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="@dimen/dp_190" | |||
android:background="@drawable/home_unm_bg7" | |||
android:background="@mipmap/my_bg" | |||
android:orientation="vertical"> | |||
<TextView | |||
@@ -45,14 +45,14 @@ | |||
<TextView | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:text="姓名" | |||
android:text="业务员" | |||
android:textColor="#FFFFFF" /> | |||
<TextView | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:layout_marginTop="@dimen/dp_18" | |||
android:text="136XXXX6866" | |||
android:text="178****1236" | |||
android:textColor="#FFFFFF" /> | |||
</LinearLayout> | |||
@@ -61,23 +61,40 @@ | |||
</LinearLayout> | |||
<com.hjq.widget.layout.SettingBar | |||
android:id="@+id/sb_person_data_password" | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:layout_marginTop="@dimen/dp_12" | |||
android:visibility="gone" | |||
app:bar_leftDrawable="@mipmap/upassword" | |||
app:bar_leftText="修改密码" | |||
app:bar_rightDrawable="@drawable/arrows_right_ic" /> | |||
<com.hjq.widget.layout.SettingBar | |||
android:id="@+id/sb_person_data_address" | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:layout_marginTop="@dimen/dp_1" | |||
app:bar_leftDrawable="@mipmap/exit_login" | |||
app:bar_leftText="退出登录" | |||
app:bar_rightDrawable="@drawable/arrows_right_ic" /> | |||
<LinearLayout | |||
android:orientation="vertical" | |||
android:background="@drawable/my_bgs" | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content"> | |||
<com.hjq.widget.layout.SettingBar | |||
android:id="@+id/essential_information" | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:visibility="visible" | |||
app:bar_leftDrawable="@mipmap/my1" | |||
app:bar_leftText="基本信息" | |||
app:bar_rightDrawable="@drawable/arrows_right_ic" /> | |||
<com.hjq.widget.layout.SettingBar | |||
android:id="@+id/sb_person_data_password" | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:layout_marginTop="@dimen/dp_1" | |||
android:visibility="visible" | |||
app:bar_leftDrawable="@mipmap/my2" | |||
app:bar_leftText="修改密码" | |||
app:bar_rightDrawable="@drawable/arrows_right_ic" /> | |||
<com.hjq.widget.layout.SettingBar | |||
android:id="@+id/sb_person_data_address" | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:layout_marginTop="@dimen/dp_1" | |||
app:bar_leftDrawable="@mipmap/my3" | |||
app:bar_leftText="退出登录" | |||
app:bar_rightDrawable="@drawable/arrows_right_ic" /> | |||
</LinearLayout> | |||
</LinearLayout> |
@@ -6,320 +6,135 @@ | |||
android:layout_height="match_parent" | |||
android:orientation="vertical"> | |||
<com.hjq.bar.TitleBar | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:background="#FFFFFF" | |||
app:leftIcon="@null" | |||
app:leftTitleSize="@dimen/sp_18" | |||
app:title="我的业绩" | |||
app:titleColor="#333333" /> | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="@dimen/dp_250" | |||
android:background="@drawable/home_unm_bg7" | |||
android:orientation="vertical"> | |||
android:layout_height="wrap_content" | |||
android:background="@color/white" | |||
android:orientation="vertical" | |||
android:paddingBottom="@dimen/dp_15"> | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:layout_marginHorizontal="@dimen/dp_15" | |||
android:layout_marginTop="@dimen/dp_40"> | |||
android:layout_height="@dimen/dp_35" | |||
android:layout_marginTop="@dimen/dp_15" | |||
android:gravity="center" | |||
android:orientation="horizontal"> | |||
<TextView | |||
android:layout_width="0dp" | |||
android:id="@+id/textOne" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:layout_weight="1" | |||
android:text="我的业绩" | |||
android:background="@drawable/state1" | |||
android:gravity="center" | |||
android:minWidth="@dimen/dp_80" | |||
android:padding="@dimen/dp_10" | |||
android:text="新版订单" | |||
android:textColor="@color/white" | |||
android:textSize="@dimen/sp_18" /> | |||
android:textSize="@dimen/sp_14" /> | |||
<TextView | |||
android:id="@+id/textTwo" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:drawableRight="@mipmap/xia" | |||
android:drawablePadding="@dimen/dp_8" | |||
android:text="2021年" | |||
android:textColor="@color/white" /> | |||
</LinearLayout> | |||
<View | |||
android:layout_width="match_parent" | |||
android:layout_height="1dp" | |||
android:layout_marginTop="@dimen/dp_10" | |||
android:background="@color/white" /> | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="@dimen/dp_100" | |||
android:orientation="horizontal"> | |||
<LinearLayout | |||
android:layout_width="0dp" | |||
android:layout_height="match_parent" | |||
android:layout_weight="1" | |||
android:orientation="vertical" | |||
android:padding="@dimen/dp_15"> | |||
<TextView | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:text="昨日业绩(单)" | |||
android:textColor="#FFFFFF" /> | |||
<TextView | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:layout_marginTop="@dimen/dp_10" | |||
android:text="10" | |||
android:textColor="@color/white" | |||
android:textSize="29sp" /> | |||
</LinearLayout> | |||
<View | |||
android:layout_width="@dimen/dp_1" | |||
android:layout_height="match_parent" | |||
android:background="@color/white" /> | |||
<LinearLayout | |||
android:layout_width="0dp" | |||
android:layout_height="match_parent" | |||
android:layout_weight="1" | |||
android:orientation="vertical" | |||
android:padding="@dimen/dp_15"> | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:gravity="center_vertical"> | |||
<TextView | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:text="新增推广(户)" | |||
android:textColor="@color/white" | |||
android:textSize="11sp" /> | |||
<TextView | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:layout_marginLeft="@dimen/dp_25" | |||
android:text="8" | |||
android:textColor="@color/white" /> | |||
</LinearLayout> | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:layout_marginTop="@dimen/dp_10" | |||
android:gravity="center_vertical"> | |||
<TextView | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:text="新增售后(户)" | |||
android:textColor="@color/white" | |||
android:textSize="11sp" /> | |||
<TextView | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:layout_marginLeft="@dimen/dp_25" | |||
android:text="4" | |||
android:textColor="@color/white" /> | |||
</LinearLayout> | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:layout_marginTop="@dimen/dp_10" | |||
android:gravity="center_vertical"> | |||
<TextView | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:text="查询次数(次)" | |||
android:textColor="@color/white" | |||
android:textSize="11sp" /> | |||
<TextView | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:layout_marginLeft="@dimen/dp_25" | |||
android:text="15" | |||
android:textColor="@color/white" /> | |||
</LinearLayout> | |||
</LinearLayout> | |||
</LinearLayout> | |||
<View | |||
android:layout_width="match_parent" | |||
android:layout_height="1dp" | |||
android:background="@color/white" /> | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent" | |||
android:orientation="horizontal"> | |||
<LinearLayout | |||
android:layout_width="0dp" | |||
android:layout_height="match_parent" | |||
android:layout_weight="1" | |||
android:layout_marginLeft="@dimen/dp_5" | |||
android:background="#F5F5F5" | |||
android:gravity="center" | |||
android:orientation="vertical"> | |||
<TextView | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:text="50" | |||
android:textColor="@color/white" | |||
android:textSize="17sp" /> | |||
<TextView | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:layout_marginTop="@dimen/dp_15" | |||
android:text="累计业绩(单)" | |||
android:textColor="@color/white" | |||
android:textSize="@dimen/sp_12" /> | |||
</LinearLayout> | |||
<View | |||
android:layout_width="@dimen/dp_1" | |||
android:layout_height="match_parent" | |||
android:background="@color/white" /> | |||
android:minWidth="@dimen/dp_80" | |||
android:padding="@dimen/dp_10" | |||
android:text="更换卡签" | |||
android:textColor="#666666" | |||
android:textSize="@dimen/sp_14" /> | |||
<LinearLayout | |||
android:layout_width="0dp" | |||
android:layout_height="match_parent" | |||
android:layout_weight="1" | |||
<TextView | |||
android:id="@+id/textThree" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:layout_marginLeft="@dimen/dp_5" | |||
android:background="#F5F5F5" | |||
android:gravity="center" | |||
android:orientation="vertical"> | |||
<TextView | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:text="150" | |||
android:textColor="@color/white" | |||
android:textSize="17sp" /> | |||
<TextView | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:layout_marginTop="@dimen/dp_15" | |||
android:text="累计查询(次)" | |||
android:textColor="@color/white" | |||
android:textSize="@dimen/sp_12" /> | |||
</LinearLayout> | |||
<View | |||
android:layout_width="@dimen/dp_1" | |||
android:layout_height="match_parent" | |||
android:background="@color/white" /> | |||
android:minWidth="@dimen/dp_80" | |||
android:padding="@dimen/dp_10" | |||
android:text="增补设备" | |||
android:textColor="#666666" | |||
android:textSize="@dimen/sp_14" /> | |||
<LinearLayout | |||
android:layout_width="0dp" | |||
android:layout_height="match_parent" | |||
android:layout_weight="1" | |||
<TextView | |||
android:id="@+id/textFour" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:layout_marginLeft="@dimen/dp_5" | |||
android:background="@drawable/state3_no" | |||
android:gravity="center" | |||
android:orientation="vertical"> | |||
<TextView | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:text="40" | |||
android:textColor="@color/white" | |||
android:textSize="17sp" /> | |||
android:minWidth="@dimen/dp_80" | |||
android:padding="@dimen/dp_10" | |||
android:text="售后" | |||
android:textColor="@color/text_off" | |||
android:textSize="@dimen/sp_14" /> | |||
<TextView | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:layout_marginTop="@dimen/dp_15" | |||
android:text="可结算订单(户)" | |||
android:textColor="@color/white" | |||
android:textSize="@dimen/sp_12" /> | |||
</LinearLayout> | |||
</LinearLayout> | |||
</LinearLayout> | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:layout_marginTop="@dimen/dp_12" | |||
android:orientation="vertical"> | |||
android:layout_marginTop="@dimen/dp_15" | |||
android:orientation="horizontal" | |||
android:paddingHorizontal="@dimen/dp_15"> | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="@dimen/dp_35" | |||
android:gravity="center_vertical" | |||
android:orientation="horizontal"> | |||
<TextView | |||
android:layout_width="0dp" | |||
android:layout_height="wrap_content" | |||
android:layout_weight="1" | |||
android:text="金额合计:xxxx" /> | |||
<TextView | |||
android:layout_width="0dp" | |||
android:layout_height="match_parent" | |||
android:layout_weight="1" | |||
android:gravity="center" | |||
android:text="月份" | |||
android:textColor="#666666" | |||
android:textSize="12sp" | |||
tools:ignore="SmallSp" /> | |||
<androidx.appcompat.widget.AppCompatButton | |||
android:layout_width="@dimen/dp_60" | |||
android:layout_height="@dimen/dp_30" | |||
android:background="@drawable/button_status1" | |||
android:text="导出" | |||
android:textColor="#00B38B" /> | |||
<TextView | |||
android:layout_width="0dp" | |||
android:layout_height="match_parent" | |||
android:layout_weight="1" | |||
android:gravity="center" | |||
android:text="推广(户)" | |||
android:textColor="#666666" | |||
android:textSize="12sp" | |||
tools:ignore="SmallSp" /> | |||
</LinearLayout> | |||
<TextView | |||
android:layout_width="0dp" | |||
android:layout_height="match_parent" | |||
android:layout_weight="1" | |||
android:gravity="center" | |||
android:text="售后(户)" | |||
android:textColor="#666666" | |||
android:textSize="12sp" | |||
tools:ignore="SmallSp" /> | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content"> | |||
<TextView | |||
android:layout_width="0dp" | |||
android:layout_height="match_parent" | |||
android:layout_weight="1" | |||
android:gravity="center" | |||
android:text="可结算(户)" | |||
android:textColor="#666666" | |||
android:textSize="12sp" | |||
tools:ignore="SmallSp" /> | |||
<com.huntersun.vkyes.etcopencard.src.widget.StatusLayout | |||
android:id="@+id/hl_status_hint" | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent"> | |||
<TextView | |||
android:layout_width="0dp" | |||
<com.scwang.smart.refresh.layout.SmartRefreshLayout | |||
android:id="@+id/rl_status_refresh" | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent" | |||
android:layout_weight="1" | |||
android:gravity="center" | |||
android:text="查询(次)" | |||
android:textColor="#666666" | |||
android:textSize="12sp" | |||
tools:ignore="SmallSp" /> | |||
app:srlEnablePreviewInEditMode="false"> | |||
</LinearLayout> | |||
<com.hjq.widget.layout.WrapRecyclerView | |||
android:id="@+id/rv_status_list" | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent" | |||
android:layout_margin="@dimen/dp_15" | |||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" | |||
tools:listCount="10" | |||
tools:listitem="@layout/item_list_content" /> | |||
<androidx.recyclerview.widget.RecyclerView | |||
android:id="@+id/recycler" | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" | |||
tools:listitem="@layout/item_three_list" /> | |||
</com.scwang.smart.refresh.layout.SmartRefreshLayout> | |||
</LinearLayout> | |||
</com.huntersun.vkyes.etcopencard.src.widget.StatusLayout> | |||
</LinearLayout> | |||
</LinearLayout> |
@@ -126,15 +126,20 @@ | |||
<com.hjq.widget.view.ClearEditText | |||
android:id="@+id/edit_query" | |||
style="@style/EditTextStyle" | |||
android:imeOptions="actionSearch" | |||
android:inputType="text" | |||
android:imeActionLabel="Search" | |||
android:singleLine="true" | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent" | |||
android:hint="请输入关键词" | |||
android:hint="请输入订单编号/车牌号" | |||
android:paddingVertical="0dp" | |||
android:textSize="12sp" /> | |||
</LinearLayout> | |||
<Button | |||
android:id="@+id/search" | |||
android:layout_width="wrap_content" | |||
android:layout_height="match_parent" | |||
android:layout_marginLeft="@dimen/dp_10" | |||
@@ -224,6 +229,7 @@ | |||
android:id="@+id/vp_home_pager" | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent" | |||
android:layout_marginTop="@dimen/dp_10" | |||
app:layout_behavior="@string/appbar_scrolling_view_behavior" /> | |||
</LinearLayout> |
@@ -16,7 +16,6 @@ | |||
app:spanCount="5" | |||
tools:listitem="@layout/item_screen" /> | |||
<com.huntersun.vkyes.etcopencard.src.widget.StatusLayout | |||
android:id="@+id/hl_status_hint" | |||
android:layout_width="match_parent" | |||
@@ -41,5 +40,4 @@ | |||
</com.huntersun.vkyes.etcopencard.src.widget.StatusLayout> | |||
</LinearLayout> |
@@ -9,17 +9,18 @@ | |||
<ImageView | |||
android:id="@+id/image" | |||
android:layout_width="@dimen/dp_25" | |||
android:layout_height="25dp" | |||
android:layout_width="44dp" | |||
android:layout_height="44dp" | |||
android:src="@mipmap/ioc1" /> | |||
<TextView | |||
android:id="@+id/text" | |||
android:layout_width="wrap_content" | |||
android:gravity="center" | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:textSize="@dimen/sp_11" | |||
android:textSize="@dimen/sp_10" | |||
android:textColor="#333333" | |||
android:layout_marginTop="@dimen/dp_12" | |||
android:layout_marginTop="@dimen/dp_10" | |||
android:text="设备注销" /> | |||
</LinearLayout> |
@@ -23,9 +23,10 @@ | |||
<ImageView | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:layout_gravity="center" | |||
android:layout_marginBottom="@dimen/dp_5" | |||
android:src="@mipmap/car1" /> | |||
android:src="@mipmap/card1" /> | |||
<TextView | |||
android:layout_width="wrap_content" |
@@ -36,9 +36,9 @@ | |||
style="@style/EditTextStyle" | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:textSize="@dimen/sp_12" | |||
android:hint="请输入卡号(选填)" | |||
android:paddingHorizontal="@dimen/dp_8" /> | |||
android:paddingHorizontal="@dimen/dp_8" | |||
android:textSize="@dimen/sp_12" /> | |||
</LinearLayout> | |||
@@ -88,11 +88,11 @@ | |||
<com.hjq.widget.view.ClearEditText | |||
android:id="@+id/obuNumEdit" | |||
style="@style/EditTextStyle" | |||
android:textSize="@dimen/sp_12" | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:hint="请输入OBU号(选填)" | |||
android:paddingHorizontal="@dimen/dp_8" /> | |||
android:paddingHorizontal="@dimen/dp_8" | |||
android:textSize="@dimen/sp_12" /> | |||
</LinearLayout> | |||
@@ -5,6 +5,7 @@ | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent" | |||
android:orientation="vertical" | |||
android:background="@color/white" | |||
tools:context=".src.ui.activity.SplashActivity"> | |||
<ImageView |
@@ -31,8 +31,12 @@ public class KeyEntry { | |||
@Override | |||
public boolean equals(Object o) { | |||
if (this == o) return true; | |||
if (!(o instanceof KeyEntry)) return false; | |||
if (this == o) { | |||
return true; | |||
} | |||
if (!(o instanceof KeyEntry)) { | |||
return false; | |||
} | |||
KeyEntry keyEntry = (KeyEntry) o; | |||
return Utils.equals(text, keyEntry.text) && | |||
keyType == keyEntry.keyType; |
@@ -9,6 +9,8 @@ import static com.parkingwang.keyboard.engine.NumberType.PLA2012; | |||
import static com.parkingwang.keyboard.engine.NumberType.SHI2012; | |||
import static com.parkingwang.keyboard.engine.NumberType.WJ2012; | |||
import android.util.Log; | |||
/** | |||
* 禁用更多键的逻辑: | |||
* 1. 第1位,民用、新能源、新旧领事馆 | |||
@@ -26,6 +28,7 @@ public class MoreKeyTransformer extends LayoutMixer.AbstractTypedKeyTransformer | |||
@Override | |||
protected KeyEntry transform(Context ctx, KeyEntry key) { | |||
Log.e("log",ctx.selectIndex + "======" + key); | |||
if (0 == ctx.selectIndex && ctx.numberType.isAnyOf(CIVIL, NEW_ENERGY, LING2012, LING2018)) { | |||
return KeyEntry.newOfSetEnable(key, false); | |||
} else if (2 == ctx.selectIndex && WJ2012.equals(ctx.numberType)) { |
@@ -22,6 +22,7 @@ import com.parkingwang.vehiclekeyboard.R; | |||
/** | |||
* @author 黄浩杭 (huanghaohang@parkingwang.com) | |||
* @since 2017-09-26 0.1 | |||
* 关键点视图 | |||
*/ | |||
final class KeyView extends TextView { | |||
private final BubbleDrawable mBubbleDrawable; |
@@ -49,8 +49,8 @@ public class KeyboardView extends LinearLayout implements callback { | |||
private final List<OnKeyboardChangedListener> mKeyboardChangedListeners = new CopyOnWriteArrayList<>(); | |||
private final KeyboardEngine mKeyboardEngine = new KeyboardEngine(); | |||
private final KeyViewCacheHelper mKeyCacheHelper = new KeyViewCacheHelper(); | |||
private int mRowSpace; | |||
private int mDefaultKeyHeight; | |||
private final int mRowSpace; | |||
private final int mDefaultKeyHeight; | |||
private boolean mShowBubble = true; | |||
private float mCNTextSize; | |||
private float mENTextSize; | |||
@@ -169,9 +169,8 @@ public class KeyboardView extends LinearLayout implements callback { | |||
} | |||
} | |||
//// | |||
private void onKeyPressed(KeyEntry key) { | |||
Log.e("log", "打印标题:" + key.keyType); | |||
switch (key.keyType) { | |||
//功能正常 | |||
case FUNC_OK: | |||
@@ -185,8 +184,8 @@ public class KeyboardView extends LinearLayout implements callback { | |||
l.onDeleteKey(); | |||
} | |||
break; | |||
default: | |||
//输入功能 | |||
case GENERAL: | |||
for (OnKeyboardChangedListener l : mKeyboardChangedListeners) { | |||
l.onTextKey(key.text); | |||
@@ -194,6 +193,7 @@ public class KeyboardView extends LinearLayout implements callback { | |||
break; | |||
//更多功能 | |||
case FUNC_MORE: | |||
Log.e("log", "更多功能点击事件:" + "==========="); | |||
update(mStashedNumber, mStashedIndex, true, mStashedNumberType); | |||
break; | |||
//功能返回 | |||
@@ -299,7 +299,6 @@ public class KeyboardView extends LinearLayout implements callback { | |||
for (int i = 0, size = keyEntryRow.size(); i < size; i++) { | |||
KeyEntry key = keyEntryRow.get(i); | |||
KeyView keyView = (KeyView) rowLayout.getChildAt(i); | |||
Log.e("log", "文本内容:" + key); | |||
if (mBubbleTextColor != -1) { | |||
keyView.setBubbleTextColor(mBubbleTextColor); | |||
} | |||
@@ -319,7 +318,8 @@ public class KeyboardView extends LinearLayout implements callback { | |||
keyView.setTextSize(TypedValue.COMPLEX_UNIT_PX, mCNTextSize); | |||
} | |||
keyView.setShowBubble(mShowBubble); | |||
keyView.setEnabled(key.enabled); | |||
// keyView.setEnabled(key.enabled); | |||
keyView.setEnabled(true); | |||
} | |||
} | |||
Log.e("log", "打印标题:" + "=====哈哈哈"); | |||
@@ -342,7 +342,6 @@ public class KeyboardView extends LinearLayout implements callback { | |||
xnyView.setLayoutParams(layoutParams2); | |||
//清除车牌 | |||
TextView qcView = new TextView(oneLayout.getContext()); | |||
// qcView.setImageResource(R.drawable.qc_off); | |||
qcView.setLayoutParams(layoutParams); | |||
qcView.setText("清除车牌"); | |||
qcView.setOnClickListener(new OnClickListener() { | |||
@@ -353,7 +352,6 @@ public class KeyboardView extends LinearLayout implements callback { | |||
}); | |||
//显示确定 | |||
ImageView okView = new ImageView(oneLayout.getContext()); | |||
// okView.setImageResource(R.drawable.ok_off); | |||
okView.setLayoutParams(layoutParams); | |||
okView.setOnClickListener(new OnClickListener() { | |||
@Override | |||
@@ -363,7 +361,6 @@ public class KeyboardView extends LinearLayout implements callback { | |||
}); | |||
//显示键盘 | |||
TextView jpView = new TextView(oneLayout.getContext()); | |||
// jpView.setImageResource(R.drawable.jp_off); | |||
jpView.setGravity(Gravity.RIGHT); | |||
jpView.setText("隐藏键盘"); | |||
jpView.setLayoutParams(layoutParams); | |||
@@ -376,11 +373,9 @@ public class KeyboardView extends LinearLayout implements callback { | |||
//添加视图 | |||
oneLayout.addView(xnyView, 0); | |||
oneLayout.addView(qcView, 1); | |||
// oneLayout.addView(okView, 2); | |||
oneLayout.addView(jpView, 2); | |||
} | |||
@Override | |||
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { | |||
int heightMode = MeasureSpec.getMode(heightMeasureSpec); |