Commit b61ecd3a by 罗翻

去除代码中的中文字

parent 668833fb
Showing with 453 additions and 112 deletions
...@@ -88,58 +88,58 @@ public class ServerException extends Exception { ...@@ -88,58 +88,58 @@ public class ServerException extends Exception {
/**全局错误*/ /**全局错误*/
case "GLOBAL0001": case "GLOBAL0001":
message = "未知错误GLOBAL0001"; //参数错误 message = BaseApplication.getContext().getString(R.string.global0001); //参数错误
break; break;
case "GLOBAL0002": case "GLOBAL0002":
message = "未知错误GLOBAL0002"; //格式化序列化错误 message = BaseApplication.getContext().getString(R.string.global0002); //格式化序列化错误
break; break;
case "GLOBAL0003": case "GLOBAL0003":
message = "未知错误GLOBAL0003"; //业务错误 message = BaseApplication.getContext().getString(R.string.global0003); //业务错误
break; break;
case "GLOBAL0004": case "GLOBAL0004":
message = "未知错误GLOBAL0004"; //全局错误 message = BaseApplication.getContext().getString(R.string.global0004); //全局错误
break; break;
case "GLOBAL0100": case "GLOBAL0100":
message = "未知错误GLOBAL0100"; //远程调用失败 message = BaseApplication.getContext().getString(R.string.global0100); //远程调用失败
break; break;
case "GLOBAL0101": case "GLOBAL0101":
message = "验证码错误"; //短信验证失败 message = BaseApplication.getContext().getString(R.string.global0101); //短信验证失败
break; break;
case "GLOBAL0102": case "GLOBAL0102":
message = "未知错误GLOBAL0102"; // unknowable error type message = BaseApplication.getContext().getString(R.string.global0102); // unknowable error type
break; break;
case "GLOBAL0103": case "GLOBAL0103":
message = "验证码错误"; message = BaseApplication.getContext().getString(R.string.global0103);
break; break;
case "GLOBAL0104": case "GLOBAL0104":
message = "用户名和密码错误"; message = BaseApplication.getContext().getString(R.string.global0104);
break; break;
case "GLOBAL0400": case "GLOBAL0400":
message = "未知错误GLOBAL0400"; //Bad Request! message = BaseApplication.getContext().getString(R.string.global0400); //Bad Request!
break; break;
case "GLOBAL0406": case "GLOBAL0406":
message = "未知错误GLOBAL0406"; //not Acceptable message = BaseApplication.getContext().getString(R.string.global0406); //not Acceptable
break; break;
case "GLOBAL0405": case "GLOBAL0405":
message = "未知错误GLOBAL0405"; //Method Not Allowed message = BaseApplication.getContext().getString(R.string.global0405); //Method Not Allowed
break; break;
case "GLOBAL0500": case "GLOBAL0500":
message = "未知错误GLOBAL0500"; //Method Not Allowed message = BaseApplication.getContext().getString(R.string.global0500); //Method Not Allowed
break; break;
case "GLOBAL1001": case "GLOBAL1001":
message = "未知错误GLOBAL1001"; //空指针异常 message = BaseApplication.getContext().getString(R.string.global1001); //空指针异常
break; break;
case "GLOBAL1002": case "GLOBAL1002":
message = "未知错误GLOBAL1002"; //类型转换异 message = BaseApplication.getContext().getString(R.string.global1002); //类型转换异
break; break;
case "GLOBAL1003": case "GLOBAL1003":
message = "未知错误GLOBAL1003"; //IO异常 message = BaseApplication.getContext().getString(R.string.global1003); //IO异常
break; break;
case "GLOBAL1004": case "GLOBAL1004":
message = "未知错误GLOBAL1004"; //未知方法异 message = BaseApplication.getContext().getString(R.string.global1004); //未知方法异
break; break;
case "GLOBAL1005": case "GLOBAL1005":
message = "未知错误GLOBAL1005"; //数据越界异 message = BaseApplication.getContext().getString(R.string.global1005); //数据越界异
break; break;
default: default:
message = BaseApplication.getContext().getString(R.string.get_info_failed); message = BaseApplication.getContext().getString(R.string.get_info_failed);
......
...@@ -4,6 +4,7 @@ import android.content.pm.PackageInfo; ...@@ -4,6 +4,7 @@ import android.content.pm.PackageInfo;
import android.content.pm.PackageManager; import android.content.pm.PackageManager;
import android.telephony.TelephonyManager; import android.telephony.TelephonyManager;
import com.dayu.baselibrary.R;
import com.dayu.common.BaseApplication; import com.dayu.common.BaseApplication;
...@@ -35,7 +36,7 @@ public class AppUtils { ...@@ -35,7 +36,7 @@ public class AppUtils {
return packageName; return packageName;
} catch (PackageManager.NameNotFoundException e) { } catch (PackageManager.NameNotFoundException e) {
e.printStackTrace(); e.printStackTrace();
return "解析版本号失败"; return BaseApplication.getContext().getString(R.string.error_verison_code);
} }
......
...@@ -34,26 +34,4 @@ public class GlideImageLoader { ...@@ -34,26 +34,4 @@ public class GlideImageLoader {
.apply(options) .apply(options)
.into(view); .into(view);
} }
// *//**
// * 下载图片转换圆角
// * @param mContext
// * @param imageRes
// * @param view
// * @param radius
// *//*
// public static void loadAdapterRadius(Context mContext, @DrawableRes int imageRes, ImageView view, int radius){
// DrawableRequestBuilder requestBuilder = Glide.with(mContext)
// .load(imageRes)
// .centerCrop()
// .crossFade()
// .transform(new GlideRoundTransform(mContext, radius))
// .diskCacheStrategy(DiskCacheStrategy.ALL);
// requestBuilder.into(view);
// }
//
// public static void clear(Context mContext) {
// Glide.get(mContext).clearMemory();
// }*/
} }
package com.dayu.utils; package com.dayu.utils; /**
* Created by yu
/** * on 2017/10/24.
* Created by yu on 2017/10/24.
*/ */
import android.content.BroadcastReceiver; import android.content.BroadcastReceiver;
...@@ -13,6 +12,9 @@ import android.net.wifi.WifiManager; ...@@ -13,6 +12,9 @@ import android.net.wifi.WifiManager;
import android.os.Parcelable; import android.os.Parcelable;
import android.util.Log; import android.util.Log;
import com.dayu.baselibrary.R;
import com.dayu.common.BaseApplication;
/** /**
* 网络改变监控广播 * 网络改变监控广播
* <p> * <p>
...@@ -25,9 +27,9 @@ public class NetworkConnectChangedReceiver extends BroadcastReceiver { ...@@ -25,9 +27,9 @@ public class NetworkConnectChangedReceiver extends BroadcastReceiver {
private String getConnectionType(int type) { private String getConnectionType(int type) {
String connType = ""; String connType = "";
if (type == ConnectivityManager.TYPE_MOBILE) { if (type == ConnectivityManager.TYPE_MOBILE) {
connType = "3G网络数据"; connType = BaseApplication.getContext().getString(R.string.net_3G);
} else if (type == ConnectivityManager.TYPE_WIFI) { } else if (type == ConnectivityManager.TYPE_WIFI) {
connType = "WIFI网络"; connType = BaseApplication.getContext().getString(R.string.net_wifi);
} }
return connType; return connType;
} }
...@@ -76,7 +78,7 @@ public class NetworkConnectChangedReceiver extends BroadcastReceiver { ...@@ -76,7 +78,7 @@ public class NetworkConnectChangedReceiver extends BroadcastReceiver {
} }
} else { } else {
ToastUtils.showShortToast("网络断开,请检查网络"); ToastUtils.showShortToast(BaseApplication.getContext().getString(R.string.net_not_connect));
} }
} }
} }
......
...@@ -16,6 +16,7 @@ import android.view.WindowManager; ...@@ -16,6 +16,7 @@ import android.view.WindowManager;
import android.widget.TextView; import android.widget.TextView;
import com.dayu.baselibrary.R; import com.dayu.baselibrary.R;
import com.dayu.common.BaseApplication;
import java.util.List; import java.util.List;
...@@ -162,7 +163,7 @@ public class ProgressUtil { ...@@ -162,7 +163,7 @@ public class ProgressUtil {
Message mssage = new Message(); Message mssage = new Message();
mssage.what = START_DIALOG; mssage.what = START_DIALOG;
mssage.obj = "加载中..."; mssage.obj = BaseApplication.getContext().getString(R.string.loading);
handler.sendMessage(mssage); handler.sendMessage(mssage);
} }
......
...@@ -7,6 +7,7 @@ import android.text.SpannableString; ...@@ -7,6 +7,7 @@ import android.text.SpannableString;
import android.widget.Button; import android.widget.Button;
import com.dayu.baselibrary.R; import com.dayu.baselibrary.R;
import com.dayu.common.BaseApplication;
/** /**
...@@ -42,7 +43,7 @@ public class TimeCountUtil extends CountDownTimer { ...@@ -42,7 +43,7 @@ public class TimeCountUtil extends CountDownTimer {
@Override @Override
public void onFinish() { public void onFinish() {
btn.setText("重新发送"); btn.setText(BaseApplication.getContext().getString(R.string.send_again));
btn.setClickable(true);//重新获得点击 btn.setClickable(true);//重新获得点击
btn.setBackgroundResource(R.drawable.btn_register_selector); btn.setBackgroundResource(R.drawable.btn_register_selector);
} }
......
...@@ -89,12 +89,12 @@ public class CustomDialog extends Dialog implements View.OnClickListener { ...@@ -89,12 +89,12 @@ public class CustomDialog extends Dialog implements View.OnClickListener {
} }
private void initView() { private void initView() {
contentTxt = (TextView) findViewById(R.id.content); contentTxt = findViewById(R.id.content);
titleTxt = (TextView) findViewById(R.id.title); titleTxt = findViewById(R.id.title);
line = findViewById(R.id.v_line); line = findViewById(R.id.v_line);
submitTxt = (TextView) findViewById(R.id.submit); submitTxt = findViewById(R.id.submit);
submitTxt.setOnClickListener(this); submitTxt.setOnClickListener(this);
cancelTxt = (TextView) findViewById(R.id.cancel); cancelTxt = findViewById(R.id.cancel);
cancelTxt.setOnClickListener(this); cancelTxt.setOnClickListener(this);
contentTxt.setText(content); contentTxt.setText(content);
......
...@@ -18,6 +18,7 @@ import com.dayu.base.ui.adapter.CoreAdapter; ...@@ -18,6 +18,7 @@ import com.dayu.base.ui.adapter.CoreAdapter;
import com.dayu.base.ui.adapter.TypeSelector; import com.dayu.base.ui.adapter.TypeSelector;
import com.dayu.base.ui.presenter.BaseListPresenter; import com.dayu.base.ui.presenter.BaseListPresenter;
import com.dayu.baselibrary.R; import com.dayu.baselibrary.R;
import com.dayu.common.BaseApplication;
import com.dayu.utils.ProgressUtil; import com.dayu.utils.ProgressUtil;
import com.dayu.widgets.listener.OnItemClickListener; import com.dayu.widgets.listener.OnItemClickListener;
import com.dayu.widgets.listener.OnRefreshListener; import com.dayu.widgets.listener.OnRefreshListener;
...@@ -97,10 +98,10 @@ public class LRecyclerView<M, B> extends FrameLayout { ...@@ -97,10 +98,10 @@ public class LRecyclerView<M, B> extends FrameLayout {
//初始化recycleview //初始化recycleview
View layout = inflate(context, R.layout.lrecycle_layout, this); View layout = inflate(context, R.layout.lrecycle_layout, this);
swipeRefresh = (SwipeRefreshLayout) layout.findViewById(R.id.swiperefresh); swipeRefresh = layout.findViewById(R.id.swiperefresh);
recyclerview = (RecyclerView) layout.findViewById(R.id.recyclerview); recyclerview = layout.findViewById(R.id.recyclerview);
ll_emptyView = (LinearLayout) layout.findViewById(R.id.ll_emptyview); ll_emptyView = layout.findViewById(R.id.ll_emptyview);
ll_faileView = (LinearLayout) layout.findViewById(R.id.ll_faileview); ll_faileView = layout.findViewById(R.id.ll_faileview);
swipeRefresh.setColorSchemeResources(R.color.cl_receiving_order_item_data); swipeRefresh.setColorSchemeResources(R.color.cl_receiving_order_item_data);
mLayoutManager = new LinearLayoutManager(context); mLayoutManager = new LinearLayoutManager(context);
...@@ -114,7 +115,7 @@ public class LRecyclerView<M, B> extends FrameLayout { ...@@ -114,7 +115,7 @@ public class LRecyclerView<M, B> extends FrameLayout {
setViewType(itemType); setViewType(itemType);
recyclerview.setAdapter(mCoreAdapter); recyclerview.setAdapter(mCoreAdapter);
} else { } else {
throw new RuntimeException("提示:需要先传入itemtype"); throw new RuntimeException(BaseApplication.getContext().getString(R.string.first_afferent_itemtype));
} }
} }
if (isReverse) { if (isReverse) {
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
android:layout_below="@id/iv_empty" android:layout_below="@id/iv_empty"
android:layout_centerHorizontal="true" android:layout_centerHorizontal="true"
android:layout_marginTop="@dimen/dp_13" android:layout_marginTop="@dimen/dp_13"
android:text="暂无数据(点击刷新)" android:text="@string/no_data_press_refresh"
android:textColor="@color/cl_selector_hui" android:textColor="@color/cl_selector_hui"
android:textSize="@dimen/sp_13.3" /> android:textSize="@dimen/sp_13.3" />
</LinearLayout> </LinearLayout>
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="23dp" android:layout_marginTop="23dp"
android:text="加载出错啦" android:text="@string/load_error"
android:textColor="#c9c9c9" android:textColor="#c9c9c9"
android:textSize="17.3sp" /> android:textSize="17.3sp" />
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
android:paddingLeft="6dp" android:paddingLeft="6dp"
android:paddingRight="6dp" android:paddingRight="6dp"
android:paddingTop="4dp" android:paddingTop="4dp"
android:text="重新加载" android:text="@string/load_again"
android:textSize="15.4sp" /> android:textSize="15.4sp" />
</LinearLayout> </LinearLayout>
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="10dp" android:layout_marginLeft="10dp"
android:clickable="@{item == null?true:false}" android:clickable="@{item == null?true:false}"
android:text='@{item !=null? (item?"正在加载" :"没有更多数据"):"加载失败(再次上拉试试~)"}' /> android:text='@{item !=null? (item?@string/is_loading :@string/have_no_data):@string/try_load_again}' />
</LinearLayout> </LinearLayout>
......
...@@ -96,6 +96,17 @@ ...@@ -96,6 +96,17 @@
<string name="get_account_list_error">获取账户列表失败!</string> <string name="get_account_list_error">获取账户列表失败!</string>
<string name="error_serve">服务器异常!</string> <string name="error_serve">服务器异常!</string>
<string name="error_loadmore">亲,已经到最底部了!</string> <string name="error_loadmore">亲,已经到最底部了!</string>
<string name="net_3G">3G网络数据</string>
<string name="net_wifi">WIFI网络</string>
<string name="net_not_connect">网络断开,请检查网络</string>
<string name="send_again">重新发送</string>
<string name="first_afferent_itemtype">提示:需要先传入itemtype</string>
<string name="no_data_press_refresh">暂无数据(点击刷新)</string>
<string name="load_error">加载出错了啦</string>
<string name="load_again">重新加载</string>
<string name="is_loading">正在加载</string>
<string name="have_no_data">没有更多数据</string>
<string name="try_load_again">加载失败(再次上拉试试~)</string>
<!--提现账户--> <!--提现账户-->
<string name="title_withdrawals">提现账户</string> <string name="title_withdrawals">提现账户</string>
<string name="alipay_account">支付宝账号</string> <string name="alipay_account">支付宝账号</string>
...@@ -212,7 +223,7 @@ ...@@ -212,7 +223,7 @@
<string name="submit_order">提交验收</string> <string name="submit_order">提交验收</string>
<string name="find_customer_mobile">搜索客户手机号</string> <string name="find_customer_mobile">搜索客户手机号</string>
<string name="pre_look">预览</string> <string name="pre_look">预览</string>
<string name="loading">加载中</string> <string name="loading">加载中...</string>
<string name="order_subsidy">工单补贴</string> <string name="order_subsidy">工单补贴</string>
<string name="order_save_success">数据保存成功</string> <string name="order_save_success">数据保存成功</string>
<string name="no_data">暂无数据</string> <string name="no_data">暂无数据</string>
...@@ -259,6 +270,32 @@ ...@@ -259,6 +270,32 @@
<string name="modify_part_info">修改信息</string> <string name="modify_part_info">修改信息</string>
<string name="customer_acceptance">客户验收</string> <string name="customer_acceptance">客户验收</string>
<string name="scan_code_for_appointment">请扫描二维码验收</string> <string name="scan_code_for_appointment">请扫描二维码验收</string>
<string name="order_record">工单记录</string>
<string name="order_num">工单编号</string>
<string name="order_state">工单状态</string>
<string name="server_name">服务名称</string>
<string name="prodcut">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;</string>
<string name="prodcut_type">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;</string>
<string name="door_time">上门时间</string>
<string name="order_remark">工单备注</string>
<string name="order_attachment">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;</string>
<string name="customer_info">客户信息</string>
<string name="customer_type">客户类型</string>
<string name="customer_name">客户姓名</string>
<string name="lookforword_time">期望时间</string>
<string name="prodcut_info">产品信息</string>
<string name="prodcut_brand">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;</string>
<string name="prodcut_num">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;</string>
<string name="quality_assurance_info">质保信息</string>
<string name="sn_num">SN&#160;&#160;&#160;&#160;&#160;&#160;</string>
<string name="charge_record">收费记录</string>
<string name="total_money">总金额数</string>
<string name="door_money">上门费用</string>
<string name="server_money">服务费用</string>
<string name="material_money">材料费用</string>
<string name="other_money">其他费用</string>
<string name="remark">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;</string>
<string name="no_charge_record">暂无收费记录</string>
<!--消息--> <!--消息-->
...@@ -336,6 +373,10 @@ ...@@ -336,6 +373,10 @@
<string name="identity_not_empty">身份证号不能为空</string> <string name="identity_not_empty">身份证号不能为空</string>
<string name="identity_error">请输入正确的身份证号码</string> <string name="identity_error">请输入正确的身份证号码</string>
<string name="identityurl_not_empty">身份证照片不能为空</string> <string name="identityurl_not_empty">身份证照片不能为空</string>
<string name="modify_header_failed">修改头像失败</string>
<string name="input_real_name">请输入真实姓名</string>
<string name="input_identity">请输入证件号</string>
<string name="no_header">暂无头像</string>
<!--error--> <!--error-->
...@@ -373,6 +414,27 @@ ...@@ -373,6 +414,27 @@
<string name="perameter_is_null">参数为空</string> <string name="perameter_is_null">参数为空</string>
<string name="identity_is_error">身份证号不合法</string> <string name="identity_is_error">身份证号不合法</string>
<string name="not_audite_aviliable">该工程师不处于审核拒绝状态</string> <string name="not_audite_aviliable">该工程师不处于审核拒绝状态</string>
<string name="error_verison_code">解析版本号失败</string>
<string name="global0001">未知错误GLOBAL0001</string>
<string name="global0002">未知错误GLOBAL0002</string>
<string name="global0003">未知错误GLOBAL0003</string>
<string name="global0004">未知错误GLOBAL0004</string>
<string name="global0100">未知错误GLOBAL0100</string>
<string name="global0101">验证码错误</string>
<string name="global0102">未知错误GLOBAL0102</string>
<string name="global0103">验证码错误</string>
<string name="global0104">用户名和密码错误</string>
<string name="global0400">未知错误GLOBAL0400</string>
<string name="global0406">未知错误GLOBAL0406</string>
<string name="global0405">未知错误GLOBAL0405</string>
<string name="global0500">未知错误GLOBAL0500</string>
<string name="global1001">未知错误GLOBAL1001</string>
<string name="global1002">未知错误GLOBAL1002</string>
<string name="global1003">未知错误GLOBAL1003</string>
<string name="global1004">未知错误GLOBAL1004</string>
<string name="global1005">未知错误GLOBAL1005</string>
<string name="agreement"> <string name="agreement">
......
...@@ -4,5 +4,9 @@ ...@@ -4,5 +4,9 @@
<application <application
android:allowBackup="true" android:allowBackup="true"
android:label="@string/app_name" android:label="@string/app_name"
android:supportsRtl="true"/> android:supportsRtl="true">
<activity
android:name=".base.BasicMapActivity"
android:screenOrientation="portrait" />
</application>
</manifest> </manifest>
package com.dayu.location.base;
import android.app.Activity;
import android.graphics.Color;
import android.os.Bundle;
import android.util.Log;
import com.amap.api.location.AMapLocation;
import com.amap.api.location.AMapLocationClient;
import com.amap.api.location.AMapLocationClientOption;
import com.amap.api.location.AMapLocationListener;
import com.amap.api.maps2d.AMap;
import com.amap.api.maps2d.CameraUpdateFactory;
import com.amap.api.maps2d.LocationSource;
import com.amap.api.maps2d.MapView;
import com.amap.api.maps2d.model.MyLocationStyle;
import com.dayu.location.R;
/**
* AMapV1地图中介绍如何显示世界图
*/
public class BasicMapActivity extends Activity implements LocationSource,AMapLocationListener{
private MapView mapView;
private AMap aMap;
private OnLocationChangedListener mListener;
private AMapLocationClient mlocationClient;
private AMapLocationClientOption mLocationOption;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.basicmap_activity);
mapView = findViewById(R.id.map);
mapView.onCreate(savedInstanceState);// 此方法必须重写
init();
}
/**
* 初始化AMap对象
*/
private void init() {
if (aMap == null) {
aMap = mapView.getMap();
setUpMap();
addMarkersToMap();// 往地图上添加marker
}
}
/**
* 设置一些amap的属性
*/
private void setUpMap() {
aMap.setLocationSource(this);// 设置定位监听
aMap.getUiSettings().setMyLocationButtonEnabled(true);// 设置默认定位按钮是否显示
aMap.setMyLocationEnabled(true);// 设置为true表示显示定位层并可触发定位,false表示隐藏定位层并不可触发定位,默认是false
setupLocationStyle();
}
private void setupLocationStyle(){
// 自定义系统定位蓝点
MyLocationStyle myLocationStyle = new MyLocationStyle();
// 自定义定位蓝点图标
// myLocationStyle.myLocationIcon(BitmapDescriptorFactory.
// fromResource(R.drawable.gps_point));
// 自定义精度范围的圆形边框颜色
// myLocationStyle.strokeColor(STROKE_COLOR);
//自定义精度范围的圆形边框宽度
myLocationStyle.strokeWidth(5);
// 设置圆形的填充颜色
myLocationStyle.radiusFillColor(Color.TRANSPARENT);
// 将自定义的 myLocatio、nStyle 对象添加到地图上
aMap.setMyLocationStyle(myLocationStyle);
}
/**
* 在地图上添加marker
*/
private void addMarkersToMap() {
// markerOption = new MarkerOptions().icon(BitmapDescriptorFactory
// .defaultMarker(BitmapDescriptorFactory.HUE_AZURE))
// .position(latlng)
// .draggable(true);
// aMap.addMarker(markerOption);
}
/**
* 方法必须重写
*/
@Override
protected void onResume() {
super.onResume();
mapView.onResume();
}
/**
* 方法必须重写
*/
@Override
protected void onPause() {
super.onPause();
mapView.onPause();
deactivate();
}
/**
* 方法必须重写
*/
@Override
protected void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
mapView.onSaveInstanceState(outState);
}
/**
* 方法必须重写
*/
@Override
protected void onDestroy() {
super.onDestroy();
mapView.onDestroy();
if(null != mlocationClient){
mlocationClient.onDestroy();
}
}
@Override
public void onLocationChanged(AMapLocation amapLocation) {
if (mListener != null && amapLocation != null) {
if (amapLocation != null
&& amapLocation.getErrorCode() == 0) {
mListener.onLocationChanged(amapLocation);// 显示系统小蓝点
aMap.moveCamera(CameraUpdateFactory.zoomTo(18));
} else {
String errText = "定位失败," + amapLocation.getErrorCode()+ ": " + amapLocation.getErrorInfo();
Log.e("AmapErr",errText);
}
}
}
@Override
public void activate(OnLocationChangedListener onLocationChangedListener) {
mListener = onLocationChangedListener;
if (mlocationClient == null) {
mlocationClient = new AMapLocationClient(this);
mLocationOption = new AMapLocationClientOption();
//设置定位监听
mlocationClient.setLocationListener(this);
//设置为高精度定位模式
mLocationOption.setLocationMode(AMapLocationClientOption.AMapLocationMode.Hight_Accuracy);
//设置定位参数
mlocationClient.setLocationOption(mLocationOption);
// 此方法为每隔固定时间会发起一次定位请求,为了减少电量消耗或网络流量消耗,
// 注意设置合适的定位时间的间隔(最小间隔支持为2000ms),并且在合适时间调用stopLocation()方法来取消定位请求
// 在定位结束后,在合适的生命周期调用onDestroy()方法
// 在单次定位情况下,定位无论成功与否,都无需调用stopLocation()方法移除请求,定位sdk内部会移除
mlocationClient.startLocation();
}
}
@Override
public void deactivate() {
mListener = null;
if (mlocationClient != null) {
mlocationClient.stopLocation();
mlocationClient.onDestroy();
}
mlocationClient = null;
}
}
package com.dayu.location.base;
import java.io.File;
/**
* Created by luofan
* on 2018/2/28.
*/
public class OpenLocalMapUtil {
/**
* 地图应用是否安装
* @return
*/
public static boolean isGdMapInstalled(){
return isInstallPackage("com.autonavi.minimap");
}
public static boolean isBaiduMapInstalled(){
return isInstallPackage("com.baidu.BaiduMap");
}
private static boolean isInstallPackage(String packageName) {
return new File("/data/data/" + packageName).exists();
}
/**
* 获取打开百度地图应用uri [http://lbsyun.baidu.com/index.php?title=uri/api/android]
* @param originLat
* @param originLon
* @param desLat
* @param desLon
* @return
*/
public static String getBaiduMapUri(String originLat, String originLon, String originName, String desLat, String desLon, String destination, String region, String src){
String uri = "intent://map/direction?origin=latlng:%1$s,%2$s|name:%3$s" +
"&destination=latlng:%4$s,%5$s|name:%6$s&mode=driving&region=%7$s&src=%8$s#Intent;" +
"scheme=bdapp;package=com.baidu.BaiduMap;end";
return String.format(uri, originLat, originLon, originName, desLat, desLon, destination, region, src);
}
/**
* 获取打开高德地图应用uri
*/
public static String getGdMapUri(String appName, String slat, String slon, String sname, String dlat, String dlon, String dname){
String uri = "androidamap://route?sourceApplication=%1$s&slat=%2$s&slon=%3$s&sname=%4$s&dlat=%5$s&dlon=%6$s&dname=%7$s&dev=0&m=0&t=2";
return String.format(uri, appName, slat, slon, sname, dlat, dlon, dname);
}
/**
* 网页版百度地图 有经纬度
* @param originLat
* @param originLon
* @param originName ->注:必填
* @param desLat
* @param desLon
* @param destination
* @param region : 当给定region时,认为起点和终点都在同一城市,除非单独给定起点或终点的城市。-->注:必填,不填不会显示导航路线
* @param appName
* @return
*/
public static String getWebBaiduMapUri(String originLat, String originLon, String originName, String desLat, String desLon, String destination, String region, String appName) {
String uri = "http://api.map.baidu.com/direction?origin=latlng:%1$s,%2$s|name:%3$s" +
"&destination=latlng:%4$s,%5$s|name:%6$s&mode=driving&region=%7$s&output=html" +
"&src=%8$s";
return String.format(uri, originLat, originLon, originName, desLat, desLon, destination, region, appName);
}
/**
* 百度地图定位经纬度转高德经纬度
* @param bd_lat
* @param bd_lon
* @return
*/
public static double[] bdToGaoDe(double bd_lat, double bd_lon) {
double[] gd_lat_lon = new double[2];
double PI = 3.14159265358979324 * 3000.0 / 180.0;
double x = bd_lon - 0.0065, y = bd_lat - 0.006;
double z = Math.sqrt(x * x + y * y) - 0.00002 * Math.sin(y * PI);
double theta = Math.atan2(y, x) - 0.000003 * Math.cos(x * PI);
gd_lat_lon[0] = z * Math.cos(theta);
gd_lat_lon[1] = z * Math.sin(theta);
return gd_lat_lon;
}
/**
* 高德地图定位经纬度转百度经纬度
* @param gd_lon
* @param gd_lat
* @return
*/
public static double[] gaoDeToBaidu(double gd_lon, double gd_lat) {
double[] bd_lat_lon = new double[2];
double PI = 3.14159265358979324 * 3000.0 / 180.0;
double x = gd_lon, y = gd_lat;
double z = Math.sqrt(x * x + y * y) + 0.00002 * Math.sin(y * PI);
double theta = Math.atan2(y, x) + 0.000003 * Math.cos(x * PI);
bd_lat_lon[0] = z * Math.cos(theta) + 0.0065;
bd_lat_lon[1] = z * Math.sin(theta) + 0.006;
return bd_lat_lon;
}
}
<?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">
<com.amap.api.maps2d.MapView
android:id="@+id/map"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</RelativeLayout>
...@@ -42,7 +42,6 @@ ...@@ -42,7 +42,6 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal" android:layout_gravity="center_horizontal"
android:layout_marginTop="@dimen/dp_7" android:layout_marginTop="@dimen/dp_7"
android:text="2017-08-12"
android:textColor="@color/text_color" android:textColor="@color/text_color"
android:textSize="10sp" android:textSize="10sp"
/> />
...@@ -55,7 +54,6 @@ ...@@ -55,7 +54,6 @@
android:layout_marginRight="@dimen/dp_30" android:layout_marginRight="@dimen/dp_30"
android:layout_marginTop="35.7dp" android:layout_marginTop="35.7dp"
android:layout_weight="1" android:layout_weight="1"
android:text="2017-08-12"
android:textColor="@color/cl_home_title_text_color" android:textColor="@color/cl_home_title_text_color"
android:textSize="13.3sp" android:textSize="13.3sp"
/> />
......
...@@ -89,7 +89,7 @@ ...@@ -89,7 +89,7 @@
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_marginRight="@dimen/dp_21.3" android:layout_marginRight="@dimen/dp_21.3"
android:layout_toRightOf="@id/message_text_content" android:layout_toRightOf="@id/message_text_content"
android:text="未读" android:text="@string/not_read"
android:textColor="@color/cl_tab_read" android:textColor="@color/cl_tab_read"
android:textSize="@dimen/sp_10" android:textSize="@dimen/sp_10"
android:visibility='@{item.read ==1?View.GONE:View.VISIBLE}' android:visibility='@{item.read ==1?View.GONE:View.VISIBLE}'
......
...@@ -124,11 +124,11 @@ public class ProcessOrderPresenter extends ProcessOrderContract.Presenter { ...@@ -124,11 +124,11 @@ public class ProcessOrderPresenter extends ProcessOrderContract.Presenter {
params.put("id", orderId); params.put("id", orderId);
params.put("isPay", isPay); params.put("isPay", isPay);
params.put("materialCost", materialCost); params.put("materialCost", materialCost);
params.put("materialCostComment", "暂无"); params.put("materialCostComment", "");
params.put("otherPrice", otherPrice); params.put("otherPrice", otherPrice);
params.put("otherPriceComment", "暂无"); params.put("otherPriceComment", "");
params.put("servicePrice", servicePrice); params.put("servicePrice", servicePrice);
params.put("servicePriceComment", "暂无"); params.put("servicePriceComment", "");
//照片上传 //照片上传
if (imageUrl != null) { if (imageUrl != null) {
StringBuilder str = new StringBuilder(); StringBuilder str = new StringBuilder();
......
...@@ -53,6 +53,7 @@ public class OrderDetaillsFragment extends DataBindingFragment<FragmentOrderData ...@@ -53,6 +53,7 @@ public class OrderDetaillsFragment extends DataBindingFragment<FragmentOrderData
public void initDataView(OrderDetail dataBean) { public void initDataView(OrderDetail dataBean) {
mBind.tvOrderState.setText(getStaus(dataBean.getStatus())); mBind.tvOrderState.setText(getStaus(dataBean.getStatus()));
mBind.tvLookMore.setOnClickListener(o -> lookMore()); mBind.tvLookMore.setOnClickListener(o -> lookMore());
mBind.tvCustomerAddress.setOnClickListener(o -> openMap());
mBind.llServerInstruction.setOnClickListener(v -> dumpToServerInstruction()); mBind.llServerInstruction.setOnClickListener(v -> dumpToServerInstruction());
if (dataBean.getStatus() == 4 && dataBean.getSubStatus() == 6) { if (dataBean.getStatus() == 4 && dataBean.getSubStatus() == 6) {
mBind.customerAcceptance.setVisibility(View.VISIBLE); mBind.customerAcceptance.setVisibility(View.VISIBLE);
...@@ -86,6 +87,10 @@ public class OrderDetaillsFragment extends DataBindingFragment<FragmentOrderData ...@@ -86,6 +87,10 @@ public class OrderDetaillsFragment extends DataBindingFragment<FragmentOrderData
} }
} }
private void openMap() {
}
public void lookMore() { public void lookMore() {
if (mFlag) { if (mFlag) {
mFlag = false; mFlag = false;
...@@ -132,7 +137,7 @@ public class OrderDetaillsFragment extends DataBindingFragment<FragmentOrderData ...@@ -132,7 +137,7 @@ public class OrderDetaillsFragment extends DataBindingFragment<FragmentOrderData
Bundle bundle = new Bundle(); Bundle bundle = new Bundle();
bundle.putInt(Constants.ID, mDetail.getSpuId()); bundle.putInt(Constants.ID, mDetail.getSpuId());
Intent intent = new Intent(mActivity, ServerInstructionActivity.class); Intent intent = new Intent(mActivity, ServerInstructionActivity.class);
intent.putExtra(Constants.BUNDLE,bundle); intent.putExtra(Constants.BUNDLE, bundle);
startActivity(intent); startActivity(intent);
} }
} }
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
<TextView <TextView
android:id="@+id/tv_title" android:id="@+id/tv_title"
style="@style/text_title" style="@style/text_title"
android:text="工单记录" /> android:text="@string/order_record" />
<ImageView <ImageView
android:id="@+id/title_back" android:id="@+id/title_back"
......
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="测试一下"
/> />
</FrameLayout> </FrameLayout>
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical"> android:orientation="vertical">
<ScrollView <android.support.v4.widget.NestedScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="0dp" android:layout_height="0dp"
android:layout_weight="1" android:layout_weight="1"
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
android:layout_below="@id/text_title_order" android:layout_below="@id/text_title_order"
android:layout_marginLeft="@dimen/dp_13" android:layout_marginLeft="@dimen/dp_13"
android:layout_marginTop="@dimen/dp_13" android:layout_marginTop="@dimen/dp_13"
android:text="工单编号" android:text="@string/order_num"
android:textColor="@color/cl_order_text_one" android:textColor="@color/cl_order_text_one"
android:textSize="@dimen/sp_13.3" /> android:textSize="@dimen/sp_13.3" />
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
android:layout_below="@id/text_one" android:layout_below="@id/text_one"
android:layout_marginLeft="@dimen/dp_13" android:layout_marginLeft="@dimen/dp_13"
android:layout_marginTop="@dimen/dp_13" android:layout_marginTop="@dimen/dp_13"
android:text="工单状态" android:text="@string/order_state"
android:textColor="@color/cl_order_text_one" android:textColor="@color/cl_order_text_one"
android:textSize="@dimen/sp_13.3" /> android:textSize="@dimen/sp_13.3" />
...@@ -100,7 +100,7 @@ ...@@ -100,7 +100,7 @@
android:layout_below="@id/text_two" android:layout_below="@id/text_two"
android:layout_marginLeft="@dimen/dp_13" android:layout_marginLeft="@dimen/dp_13"
android:layout_marginTop="@dimen/dp_13" android:layout_marginTop="@dimen/dp_13"
android:text="服务名称" android:text="@string/server_name"
android:textColor="@color/cl_order_text_one" android:textColor="@color/cl_order_text_one"
android:textSize="@dimen/sp_13.3" /> android:textSize="@dimen/sp_13.3" />
...@@ -123,7 +123,7 @@ ...@@ -123,7 +123,7 @@
android:layout_below="@id/tv_serve_name" android:layout_below="@id/tv_serve_name"
android:layout_marginLeft="@dimen/dp_13" android:layout_marginLeft="@dimen/dp_13"
android:layout_marginTop="@dimen/dp_13" android:layout_marginTop="@dimen/dp_13"
android:text="产 品" android:text="@string/prodcut"
android:textColor="@color/cl_order_text_one" android:textColor="@color/cl_order_text_one"
android:textSize="@dimen/sp_13.3" /> android:textSize="@dimen/sp_13.3" />
...@@ -146,7 +146,7 @@ ...@@ -146,7 +146,7 @@
android:layout_below="@id/text_three" android:layout_below="@id/text_three"
android:layout_marginLeft="@dimen/dp_13" android:layout_marginLeft="@dimen/dp_13"
android:layout_marginTop="@dimen/dp_13" android:layout_marginTop="@dimen/dp_13"
android:text="类 型" android:text="@string/prodcut_type"
android:textColor="@color/cl_order_text_one" android:textColor="@color/cl_order_text_one"
android:textSize="@dimen/sp_13.3" /> android:textSize="@dimen/sp_13.3" />
...@@ -168,7 +168,7 @@ ...@@ -168,7 +168,7 @@
android:layout_below="@id/tv_type" android:layout_below="@id/tv_type"
android:layout_marginLeft="@dimen/dp_13" android:layout_marginLeft="@dimen/dp_13"
android:layout_marginTop="@dimen/dp_13" android:layout_marginTop="@dimen/dp_13"
android:text="上门时间" android:text="@string/door_time"
android:textColor="@color/cl_order_text_one" android:textColor="@color/cl_order_text_one"
android:textSize="@dimen/sp_13.3" /> android:textSize="@dimen/sp_13.3" />
...@@ -192,7 +192,7 @@ ...@@ -192,7 +192,7 @@
android:layout_below="@id/tv_door_time" android:layout_below="@id/tv_door_time"
android:layout_marginLeft="@dimen/dp_13" android:layout_marginLeft="@dimen/dp_13"
android:layout_marginTop="@dimen/dp_13" android:layout_marginTop="@dimen/dp_13"
android:text="工单备注" android:text="@string/order_remark"
android:textColor="@color/cl_order_text_one" android:textColor="@color/cl_order_text_one"
android:textSize="@dimen/sp_13.3" /> android:textSize="@dimen/sp_13.3" />
...@@ -222,7 +222,7 @@ ...@@ -222,7 +222,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@+id/tv_order_rmark" android:layout_below="@+id/tv_order_rmark"
android:gravity="center_horizontal" android:gravity="center_horizontal"
android:text="查看更多" android:text="@string/look_more"
android:textColor="@color/cl_receiving_order_item_data" android:textColor="@color/cl_receiving_order_item_data"
android:textSize="13.3sp" android:textSize="13.3sp"
android:visibility="gone" /> android:visibility="gone" />
...@@ -242,7 +242,7 @@ ...@@ -242,7 +242,7 @@
android:id="@+id/tv_fujian" android:id="@+id/tv_fujian"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="附 件" android:text="@string/order_attachment"
android:textColor="@color/cl_order_text_one" android:textColor="@color/cl_order_text_one"
android:textSize="@dimen/sp_13.3" /> android:textSize="@dimen/sp_13.3" />
...@@ -274,7 +274,7 @@ ...@@ -274,7 +274,7 @@
android:layout_below="@id/line_one" android:layout_below="@id/line_one"
android:layout_marginLeft="@dimen/dp_13" android:layout_marginLeft="@dimen/dp_13"
android:layout_marginTop="@dimen/dp_10" android:layout_marginTop="@dimen/dp_10"
android:text="客户信息" android:text="@string/customer_info"
android:textColor="@color/cl_home_title_text_color" android:textColor="@color/cl_home_title_text_color"
android:textSize="@dimen/sp_13.3" /> android:textSize="@dimen/sp_13.3" />
...@@ -285,7 +285,7 @@ ...@@ -285,7 +285,7 @@
android:layout_below="@id/two_text_one" android:layout_below="@id/two_text_one"
android:layout_marginLeft="@dimen/dp_13" android:layout_marginLeft="@dimen/dp_13"
android:layout_marginTop="@dimen/dp_13" android:layout_marginTop="@dimen/dp_13"
android:text="客户类型" android:text="@string/customer_type"
android:textColor="@color/cl_order_text_one" android:textColor="@color/cl_order_text_one"
android:textSize="@dimen/sp_13.3" /> android:textSize="@dimen/sp_13.3" />
...@@ -308,7 +308,7 @@ ...@@ -308,7 +308,7 @@
android:layout_below="@id/two_text_two" android:layout_below="@id/two_text_two"
android:layout_marginLeft="@dimen/dp_13" android:layout_marginLeft="@dimen/dp_13"
android:layout_marginTop="@dimen/dp_13" android:layout_marginTop="@dimen/dp_13"
android:text="客户姓名" android:text="@string/customer_name"
android:textColor="@color/cl_order_text_one" android:textColor="@color/cl_order_text_one"
android:textSize="@dimen/sp_13.3" /> android:textSize="@dimen/sp_13.3" />
...@@ -331,7 +331,7 @@ ...@@ -331,7 +331,7 @@
android:layout_below="@id/two_text_three" android:layout_below="@id/two_text_three"
android:layout_marginLeft="@dimen/dp_13" android:layout_marginLeft="@dimen/dp_13"
android:layout_marginTop="@dimen/dp_13" android:layout_marginTop="@dimen/dp_13"
android:text="联系方式" android:text="@string/tv_two_text_three"
android:textColor="@color/cl_order_text_one" android:textColor="@color/cl_order_text_one"
android:textSize="@dimen/sp_13.3" /> android:textSize="@dimen/sp_13.3" />
...@@ -354,7 +354,7 @@ ...@@ -354,7 +354,7 @@
android:layout_below="@id/two_text_four" android:layout_below="@id/two_text_four"
android:layout_marginLeft="@dimen/dp_13" android:layout_marginLeft="@dimen/dp_13"
android:layout_marginTop="@dimen/dp_13" android:layout_marginTop="@dimen/dp_13"
android:text="客户地址" android:text="@string/tv_two_text_foure"
android:textColor="@color/cl_order_text_one" android:textColor="@color/cl_order_text_one"
android:textSize="@dimen/sp_13.3" /> android:textSize="@dimen/sp_13.3" />
...@@ -379,7 +379,7 @@ ...@@ -379,7 +379,7 @@
android:layout_below="@id/two_text_five" android:layout_below="@id/two_text_five"
android:layout_marginLeft="@dimen/dp_13" android:layout_marginLeft="@dimen/dp_13"
android:layout_marginTop="@dimen/dp_13" android:layout_marginTop="@dimen/dp_13"
android:text="期望时间" android:text="@string/lookforword_time"
android:textColor="@color/cl_order_text_one" android:textColor="@color/cl_order_text_one"
android:textSize="@dimen/sp_13.3" /> android:textSize="@dimen/sp_13.3" />
...@@ -411,7 +411,7 @@ ...@@ -411,7 +411,7 @@
android:layout_below="@id/line_two" android:layout_below="@id/line_two"
android:layout_marginLeft="@dimen/dp_13" android:layout_marginLeft="@dimen/dp_13"
android:layout_marginTop="@dimen/dp_10" android:layout_marginTop="@dimen/dp_10"
android:text="产品信息" android:text="@string/prodcut_info"
android:textColor="@color/cl_home_title_text_color" android:textColor="@color/cl_home_title_text_color"
android:textSize="@dimen/sp_13.3" /> android:textSize="@dimen/sp_13.3" />
...@@ -422,7 +422,7 @@ ...@@ -422,7 +422,7 @@
android:layout_below="@id/three_text_one" android:layout_below="@id/three_text_one"
android:layout_marginLeft="@dimen/dp_13" android:layout_marginLeft="@dimen/dp_13"
android:layout_marginTop="@dimen/dp_13" android:layout_marginTop="@dimen/dp_13"
android:text="品 牌" android:text="@string/prodcut_brand"
android:textColor="@color/cl_order_text_one" android:textColor="@color/cl_order_text_one"
android:textSize="@dimen/sp_13.3" /> android:textSize="@dimen/sp_13.3" />
...@@ -446,7 +446,7 @@ ...@@ -446,7 +446,7 @@
android:layout_below="@id/three_text_two" android:layout_below="@id/three_text_two"
android:layout_marginLeft="@dimen/dp_13" android:layout_marginLeft="@dimen/dp_13"
android:layout_marginTop="@dimen/dp_13" android:layout_marginTop="@dimen/dp_13"
android:text="型 号" android:text="@string/prodcut_num"
android:textColor="@color/cl_order_text_one" android:textColor="@color/cl_order_text_one"
android:textSize="@dimen/sp_13.3" /> android:textSize="@dimen/sp_13.3" />
...@@ -470,7 +470,7 @@ ...@@ -470,7 +470,7 @@
android:layout_below="@id/three_two_two" android:layout_below="@id/three_two_two"
android:layout_marginLeft="@dimen/dp_13" android:layout_marginLeft="@dimen/dp_13"
android:layout_marginTop="@dimen/dp_13" android:layout_marginTop="@dimen/dp_13"
android:text="质保信息" android:text="@string/quality_assurance_info"
android:textColor="@color/cl_order_text_one" android:textColor="@color/cl_order_text_one"
android:textSize="@dimen/sp_13.3" /> android:textSize="@dimen/sp_13.3" />
...@@ -492,7 +492,7 @@ ...@@ -492,7 +492,7 @@
android:layout_below="@id/three_four_four" android:layout_below="@id/three_four_four"
android:layout_marginLeft="@dimen/dp_13" android:layout_marginLeft="@dimen/dp_13"
android:layout_marginTop="@dimen/dp_13" android:layout_marginTop="@dimen/dp_13"
android:text="SN码" android:text="@string/sn_num"
android:textColor="@color/cl_order_text_one" android:textColor="@color/cl_order_text_one"
android:textSize="@dimen/sp_13.3" /> android:textSize="@dimen/sp_13.3" />
...@@ -529,7 +529,7 @@ ...@@ -529,7 +529,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_13" android:layout_marginLeft="@dimen/dp_13"
android:layout_marginTop="@dimen/dp_10" android:layout_marginTop="@dimen/dp_10"
android:text="收费记录" android:text="@string/charge_record"
android:textColor="@color/cl_home_title_text_color" android:textColor="@color/cl_home_title_text_color"
android:textSize="@dimen/sp_13.3" /> android:textSize="@dimen/sp_13.3" />
...@@ -540,7 +540,7 @@ ...@@ -540,7 +540,7 @@
android:layout_below="@id/four_text_one" android:layout_below="@id/four_text_one"
android:layout_marginLeft="@dimen/dp_13" android:layout_marginLeft="@dimen/dp_13"
android:layout_marginTop="@dimen/dp_13" android:layout_marginTop="@dimen/dp_13"
android:text="总金额数" android:text="@string/total_money"
android:textColor="@color/cl_order_text_one" android:textColor="@color/cl_order_text_one"
android:textSize="@dimen/sp_13.3" /> android:textSize="@dimen/sp_13.3" />
...@@ -563,7 +563,7 @@ ...@@ -563,7 +563,7 @@
android:layout_below="@id/four_text_two" android:layout_below="@id/four_text_two"
android:layout_marginLeft="@dimen/dp_13" android:layout_marginLeft="@dimen/dp_13"
android:layout_marginTop="@dimen/dp_13" android:layout_marginTop="@dimen/dp_13"
android:text="上门费用" android:text="@string/door_money"
android:textColor="@color/cl_order_text_one" android:textColor="@color/cl_order_text_one"
android:textSize="@dimen/sp_13.3" /> android:textSize="@dimen/sp_13.3" />
...@@ -587,7 +587,7 @@ ...@@ -587,7 +587,7 @@
android:layout_below="@id/four_text_three" android:layout_below="@id/four_text_three"
android:layout_marginLeft="@dimen/dp_13" android:layout_marginLeft="@dimen/dp_13"
android:layout_marginTop="@dimen/dp_13" android:layout_marginTop="@dimen/dp_13"
android:text="服务费用" android:text="@string/server_money"
android:textColor="@color/cl_order_text_one" android:textColor="@color/cl_order_text_one"
android:textSize="@dimen/sp_13.3" /> android:textSize="@dimen/sp_13.3" />
...@@ -610,7 +610,7 @@ ...@@ -610,7 +610,7 @@
android:layout_below="@id/four_text_five" android:layout_below="@id/four_text_five"
android:layout_marginLeft="@dimen/dp_13" android:layout_marginLeft="@dimen/dp_13"
android:layout_marginTop="@dimen/dp_13" android:layout_marginTop="@dimen/dp_13"
android:text="材料费用" android:text="@string/material_money"
android:textColor="@color/cl_order_text_one" android:textColor="@color/cl_order_text_one"
android:textSize="@dimen/sp_13.3" /> android:textSize="@dimen/sp_13.3" />
...@@ -633,7 +633,7 @@ ...@@ -633,7 +633,7 @@
android:layout_below="@id/four_text_seven" android:layout_below="@id/four_text_seven"
android:layout_marginLeft="@dimen/dp_13" android:layout_marginLeft="@dimen/dp_13"
android:layout_marginTop="@dimen/dp_13" android:layout_marginTop="@dimen/dp_13"
android:text="其他费用" android:text="@string/other_money"
android:textColor="@color/cl_order_text_one" android:textColor="@color/cl_order_text_one"
android:textSize="@dimen/sp_13.3" /> android:textSize="@dimen/sp_13.3" />
...@@ -656,7 +656,7 @@ ...@@ -656,7 +656,7 @@
android:layout_below="@id/four_text_nine" android:layout_below="@id/four_text_nine"
android:layout_marginLeft="@dimen/dp_13" android:layout_marginLeft="@dimen/dp_13"
android:layout_marginTop="@dimen/dp_13" android:layout_marginTop="@dimen/dp_13"
android:text="备 注" android:text="@string/remark"
android:textColor="@color/cl_order_text_one" android:textColor="@color/cl_order_text_one"
android:textSize="@dimen/sp_13.3" /> android:textSize="@dimen/sp_13.3" />
...@@ -686,14 +686,14 @@ ...@@ -686,14 +686,14 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerHorizontal="true" android:layout_centerHorizontal="true"
android:layout_marginTop="@dimen/dp_20" android:layout_marginTop="@dimen/dp_20"
android:text="暂无收费记录" android:text="@string/no_charge_record"
android:textColor="@color/cl_black" android:textColor="@color/cl_black"
android:textSize="@dimen/sp_16" android:textSize="@dimen/sp_16"
android:textStyle="bold" /> android:textStyle="bold" />
</RelativeLayout> </RelativeLayout>
</RelativeLayout> </RelativeLayout>
</RelativeLayout> </RelativeLayout>
</ScrollView> </android.support.v4.widget.NestedScrollView>
<TextView <TextView
android:id="@+id/customer_acceptance" android:id="@+id/customer_acceptance"
......
...@@ -94,7 +94,7 @@ public class ModifyPersonPresenter extends ModifyPersonContract.Presenter { ...@@ -94,7 +94,7 @@ public class ModifyPersonPresenter extends ModifyPersonContract.Presenter {
if (list != null && list.size() > 0) { if (list != null && list.size() > 0) {
modifyUserInfo(mRealName.get(), mIdentity.get(), list.get(0)); modifyUserInfo(mRealName.get(), mIdentity.get(), list.get(0));
} else { } else {
mView.showToast("修改头像失败"); mView.showToast(R.string.modify_header_failed);
} }
})); }));
} }
......
...@@ -4,6 +4,7 @@ import android.databinding.ObservableField; ...@@ -4,6 +4,7 @@ import android.databinding.ObservableField;
import com.dayu.base.api.BaseApiFactory; import com.dayu.base.api.BaseApiFactory;
import com.dayu.event.UserInfo; import com.dayu.event.UserInfo;
import com.dayu.usercenter.R;
import com.dayu.usercenter.api.UserApiFactory; import com.dayu.usercenter.api.UserApiFactory;
import com.dayu.utils.UserManager; import com.dayu.utils.UserManager;
...@@ -40,7 +41,7 @@ public class MyHeadPresenter extends MyHeadContract.Presenter { ...@@ -40,7 +41,7 @@ public class MyHeadPresenter extends MyHeadContract.Presenter {
if (list != null && list.size() > 0) { if (list != null && list.size() > 0) {
modifyHead(list.get(0)); modifyHead(list.get(0));
} else { } else {
mView.showToast("修改头像失败"); mView.showToast(R.string.modify_header_failed);
} }
})); }));
} }
......
...@@ -245,7 +245,6 @@ public class HomePersonFragment extends BaseFragment<HomePersonPresenter, Fragme ...@@ -245,7 +245,6 @@ public class HomePersonFragment extends BaseFragment<HomePersonPresenter, Fragme
starImg.setImageBitmap(bm); starImg.setImageBitmap(bm);
starLinearLayout.addView(starImg, layoutParams); starLinearLayout.addView(starImg, layoutParams);
} }
} }
@Override @Override
......
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="35dp" android:layout_marginLeft="35dp"
android:background="@null" android:background="@null"
android:hint="请输入真实姓名" android:hint="@string/input_real_name"
android:textColor="@color/default_editext_color" android:textColor="@color/default_editext_color"
android:text="@={presenter.mRealName}" android:text="@={presenter.mRealName}"
android:textSize="15sp" /> android:textSize="15sp" />
...@@ -107,7 +107,7 @@ ...@@ -107,7 +107,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="35dp" android:layout_marginLeft="35dp"
android:background="@null" android:background="@null"
android:hint="请输入证件号" android:hint="@string/input_identity"
android:text="@={presenter.mIdentity}" android:text="@={presenter.mIdentity}"
android:textColor="@color/default_editext_color" android:textColor="@color/default_editext_color"
android:textSize="15sp" /> android:textSize="15sp" />
......
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="测试一下"
/> />
</FrameLayout> </FrameLayout>
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
android:layout_height="15dp" android:layout_height="15dp"
android:layout_centerHorizontal="true" android:layout_centerHorizontal="true"
android:layout_marginTop="149.3dp" android:layout_marginTop="149.3dp"
android:text="个人资料" android:text="@string/personal_info"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="11sp" /> android:textSize="11sp" />
......
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
android:layout_below="@id/iv_empty" android:layout_below="@id/iv_empty"
android:layout_centerHorizontal="true" android:layout_centerHorizontal="true"
android:layout_marginTop="@dimen/dp_13" android:layout_marginTop="@dimen/dp_13"
android:text="暂无头像" android:text="@string/no_header"
android:textColor="@color/cl_selector_hui" android:textColor="@color/cl_selector_hui"
android:textSize="@dimen/sp_13.3" /> android:textSize="@dimen/sp_13.3" />
</LinearLayout> </LinearLayout>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment