|
|
@@ -19,6 +19,7 @@ import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.baidu.mapapi.map.MapView;
|
|
|
+import com.baidu.mapapi.map.TextureMapView;
|
|
|
import com.baidu.mapapi.model.LatLng;
|
|
|
import com.common.data.JSONUtil;
|
|
|
import com.common.data.ListUtils;
|
|
|
@@ -30,6 +31,7 @@ import com.core.utils.ToastUtil;
|
|
|
import com.me.network.app.http.Method;
|
|
|
import com.modular.apputils.fragment.ViewPagerLazyFragment;
|
|
|
import com.modular.apputils.listener.OnSmartHttpListener;
|
|
|
+import com.modular.apputils.model.BillListConfig;
|
|
|
import com.modular.apputils.network.Parameter;
|
|
|
import com.modular.apputils.network.Tags;
|
|
|
import com.modular.apputils.utils.UUHttpHelper;
|
|
|
@@ -53,13 +55,29 @@ public class CustomerMapDetailsFragment extends ViewPagerLazyFragment {
|
|
|
private String mCaller;
|
|
|
private String mCondition;
|
|
|
private int mPageIndex = 1;
|
|
|
- private MapView mMapView;
|
|
|
+ private TextureMapView mMapView;
|
|
|
private SimpleRefreshLayout mRefreshLayout;
|
|
|
private RecyclerView mRecyclerView;
|
|
|
private UUHttpHelper mUUHttpHelper;
|
|
|
private LatLng mapLatLng = null;
|
|
|
private boolean isMe;
|
|
|
-
|
|
|
+ public void onItemSelected(MenuItem item) {
|
|
|
+ if (R.id.search == item.getItemId()) {
|
|
|
+ BillListConfig billConfig = new BillListConfig();
|
|
|
+ billConfig.setMe(mCondition != null && mCondition.contains("cu_sellercode="));
|
|
|
+ billConfig.setNeedForward(false);
|
|
|
+ billConfig.setCondition(mCondition);
|
|
|
+ billConfig.setCaller(mCondition);
|
|
|
+ billConfig.setTitle(getActivity().getTitle().toString());
|
|
|
+ startActivity(new Intent(ct, BillSearchActivity.class)
|
|
|
+ .putExtra(Constants.Intents.CALLER, mCaller)
|
|
|
+ .putExtra(Constants.Intents.DETAILS_CLASS, CustomerDetails3_0Activity.class)
|
|
|
+ .putExtra(Constants.Intents.CONFIG, billConfig)
|
|
|
+ .putExtra(Constants.Intents.CONDITION, mCondition)
|
|
|
+ .putStringArrayListExtra(Constants.Intents.FIELD_CONFIG, fieldConfig)
|
|
|
+ .putExtra(Constants.Intents.TITLE, getActivity().getTitle()));
|
|
|
+ }
|
|
|
+ }
|
|
|
public static CustomerMapDetailsFragment newInstance(boolean isMe,String mCaller, String mCondition) {
|
|
|
Bundle args = new Bundle();
|
|
|
CustomerMapDetailsFragment fragment = new CustomerMapDetailsFragment();
|
|
|
@@ -70,26 +88,26 @@ public class CustomerMapDetailsFragment extends ViewPagerLazyFragment {
|
|
|
return fragment;
|
|
|
}
|
|
|
|
|
|
- @Override
|
|
|
- public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
|
|
|
- inflater.inflate(R.menu.search, menu);
|
|
|
- super.onCreateOptionsMenu(menu, inflater);
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
- public boolean onOptionsItemSelected(MenuItem item) {
|
|
|
- if (R.id.search == item.getItemId()) {
|
|
|
- startActivity(new Intent(ct, BillSearchActivity.class)
|
|
|
- .putExtra(Constants.Intents.CALLER, mCaller)
|
|
|
- .putExtra(Constants.Intents.MY_DOIT, isMe)
|
|
|
- .putExtra(Constants.Intents.DETAILS_CLASS, CustomerDetails3_0Activity.class)
|
|
|
- .putExtra(Constants.Intents.CONDITION, mCondition)
|
|
|
- .putStringArrayListExtra(Constants.Intents.FIELD_CONFIG, fieldConfig)
|
|
|
- .putExtra(Constants.Intents.TITLE, getActivity().getTitle())
|
|
|
- );
|
|
|
- }
|
|
|
- return super.onOptionsItemSelected(item);
|
|
|
- }
|
|
|
+// @Override
|
|
|
+// public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
|
|
|
+// inflater.inflate(R.menu.search, menu);
|
|
|
+// super.onCreateOptionsMenu(menu, inflater);
|
|
|
+// }
|
|
|
+//
|
|
|
+// @Override
|
|
|
+// public boolean onOptionsItemSelected(MenuItem item) {
|
|
|
+// if (R.id.search == item.getItemId()) {
|
|
|
+// startActivity(new Intent(ct, BillSearchActivity.class)
|
|
|
+// .putExtra(Constants.Intents.CALLER, mCaller)
|
|
|
+// .putExtra(Constants.Intents.MY_DOIT, isMe)
|
|
|
+// .putExtra(Constants.Intents.DETAILS_CLASS, CustomerDetails3_0Activity.class)
|
|
|
+// .putExtra(Constants.Intents.CONDITION, mCondition)
|
|
|
+// .putStringArrayListExtra(Constants.Intents.FIELD_CONFIG, fieldConfig)
|
|
|
+// .putExtra(Constants.Intents.TITLE, getActivity().getTitle())
|
|
|
+// );
|
|
|
+// }
|
|
|
+// return super.onOptionsItemSelected(item);
|
|
|
+// }
|
|
|
|
|
|
@Override
|
|
|
protected int inflateLayoutId() {
|
|
|
@@ -109,8 +127,7 @@ public class CustomerMapDetailsFragment extends ViewPagerLazyFragment {
|
|
|
|
|
|
private void initView() {
|
|
|
mUUHttpHelper = new UUHttpHelper(CommonUtil.getAppBaseUrl(MyApplication.getInstance()));
|
|
|
- mMapView = (MapView) findViewById(R.id.mMapView);
|
|
|
-
|
|
|
+ mMapView = findViewById(R.id.mMapView);
|
|
|
mRefreshLayout = (SimpleRefreshLayout) findViewById(R.id.mRefreshLayout);
|
|
|
EmptyRecyclerView mEmptyRecyclerView = (EmptyRecyclerView) findViewById(R.id.mEmptyRecyclerView);
|
|
|
mRecyclerView = mEmptyRecyclerView.getRecyclerView();
|