Kaynağa Gözat

工作台备份

raomeng 8 yıl önce
ebeveyn
işleme
1bbf99e3ac

+ 79 - 68
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/fragment/WorkPlatFragment.java

@@ -197,88 +197,99 @@ public class WorkPlatFragment extends BaseMVPFragment<WorkPlatPresenter> impleme
         } else if (what == OBTAIN_APP_CITY_INDUSTRY_SERVICE) {
             String result = object.toString();
             Log.e("cityindustryservice", result);
-            JSONObject resultobObject = JSON.parseObject(result);
-            JSONArray configArray = resultobObject.getJSONArray("configs");
-            if (configArray != null) {
-                List<WorkMenuBean> netWorkMenuBeans = new ArrayList<>();
-                for (int i = 0; i < configArray.size(); i++) {
-                    JSONObject configObject = configArray.getJSONObject(i);
-                    if (configObject != null) {
-                        WorkMenuBean workMenuBean = new WorkMenuBean();
-                        workMenuBean.setModuleVisible(true);
-                        workMenuBean.setIsLocalModule(false);
-                        workMenuBean.setModuleName(JSONUtil.getText(configObject, "st_name"));
-                        workMenuBean.setModuleTag(JSONUtil.getText(configObject, "st_id"));
-                        workMenuBean.setModuleId(JSONUtil.getText(configObject, "st_id"));
-
-                        JSONArray serviceArray = configObject.getJSONArray("serves");
-                        if (serviceArray != null && serviceArray.size() > 0) {
-                            List<WorkMenuBean.ModuleListBean> moduleListBeans = new ArrayList<>();
-                            for (int j = 0; j < serviceArray.size(); j++) {
-                                JSONObject serviceObject = serviceArray.getJSONObject(j);
-                                if (serviceObject != null) {
-                                    WorkMenuBean.ModuleListBean moduleListBean = new WorkMenuBean.ModuleListBean();
-                                    moduleListBean.setMenuUrl("");
-                                    moduleListBean.setMenuName(JSONUtil.getText(serviceObject, "sv_name"));
-                                    // TODO: 2017/11/17 页面设置
-                                    moduleListBean.setMenuActivity("");
-                                    moduleListBean.setIsLocalMenu(false);
-                                    moduleListBean.setIsHide(false);
-                                    moduleListBean.setCaller(JSONUtil.getText(serviceObject, "sv_id"));
-
-                                    JSONObject logourlObject = serviceObject.getJSONObject("sv_logourl");
-                                    if (logourlObject != null) {
-                                        moduleListBean.setMenuIcon(JSONUtil.getText(logourlObject, "mobile"));
-                                    }
-                                    moduleListBeans.add(moduleListBean);
+            analyzeCityIndustry(result);
+        }
+    }
+
+    private void analyzeCityIndustry(String result) {
+        JSONObject resultObject = JSON.parseObject(result);
+        JSONArray configArray = resultObject.getJSONArray("configs");
+        if (configArray != null) {
+            List<WorkMenuBean> netWorkMenuBeans = new ArrayList<>();
+            for (int i = 0; i < configArray.size(); i++) {
+                JSONObject configObject = configArray.getJSONObject(i);
+                if (configObject != null) {
+                    WorkMenuBean workMenuBean = new WorkMenuBean();
+                    workMenuBean.setModuleVisible(true);
+                    workMenuBean.setIsLocalModule(false);
+                    workMenuBean.setModuleName(JSONUtil.getText(configObject, "st_name"));
+                    workMenuBean.setModuleTag(JSONUtil.getText(configObject, "st_id"));
+                    workMenuBean.setModuleId(JSONUtil.getText(configObject, "st_id"));
+
+                    JSONArray serviceArray = configObject.getJSONArray("serves");
+                    if (serviceArray != null && serviceArray.size() > 0) {
+                        List<WorkMenuBean.ModuleListBean> moduleListBeans = new ArrayList<>();
+                        for (int j = 0; j < serviceArray.size(); j++) {
+                            JSONObject serviceObject = serviceArray.getJSONObject(j);
+                            if (serviceObject != null) {
+                                WorkMenuBean.ModuleListBean moduleListBean = new WorkMenuBean.ModuleListBean();
+                                moduleListBean.setMenuUrl("");
+                                moduleListBean.setMenuName(JSONUtil.getText(serviceObject, "sv_name"));
+                                moduleListBean.setMenuActivity("com.modular.work.CommonDataFormActivity");
+                                moduleListBean.setIsLocalMenu(false);
+                                moduleListBean.setIsHide(false);
+                                moduleListBean.setCaller(JSONUtil.getText(serviceObject, "sv_id"));
+
+                                JSONObject logourlObject = serviceObject.getJSONObject("sv_logourl");
+                                if (logourlObject != null) {
+                                    moduleListBean.setMenuIcon(JSONUtil.getText(logourlObject, "mobile"));
                                 }
+                                moduleListBeans.add(moduleListBean);
                             }
-                            workMenuBean.setModuleList(moduleListBeans);
-
-                            netWorkMenuBeans.add(workMenuBean);
                         }
+                        workMenuBean.setModuleList(moduleListBeans);
+
+                        netWorkMenuBeans.add(workMenuBean);
                     }
                 }
+            }
 
-                for (WorkMenuBean netWorkMenuBean : netWorkMenuBeans) {
-                    boolean isExist = false;
-                    String netModuleName = netWorkMenuBean.getModuleName();
-                    List<WorkMenuBean.ModuleListBean> netModuleList = netWorkMenuBean.getModuleList();
-                    for (WorkMenuBean cacheWorkMenuBean : mCacheMenuTypeBeans) {
-                        String cacheModuleName = cacheWorkMenuBean.getModuleName();
-                        List<WorkMenuBean.ModuleListBean> cacheModuleList = cacheWorkMenuBean.getModuleList();
-                        if (cacheModuleName.equals(netModuleName)) {
-                            isExist = true;
-                            netWorkMenuBean.setModuleVisible(cacheWorkMenuBean.isModuleVisible());
-                            for (WorkMenuBean.ModuleListBean netModuleListBean : netModuleList) {
-                                boolean isFuncExist = false;
-                                String netMenuName = netModuleListBean.getMenuName();
-                                for (WorkMenuBean.ModuleListBean adapterModuleListBean : cacheModuleList) {
-                                    String adapterMenuName = adapterModuleListBean.getMenuName();
-                                    if (adapterMenuName.equals(netMenuName)) {
-                                        isFuncExist = true;
-                                        netModuleListBean.setIsHide(adapterModuleListBean.isHide());
-                                        break;
+            for (WorkMenuBean netWorkMenuBean : netWorkMenuBeans) {
+                boolean isExist = false;
+                String netModuleName = netWorkMenuBean.getModuleName();
+                List<WorkMenuBean.ModuleListBean> netModuleList = netWorkMenuBean.getModuleList();
+                for (WorkMenuBean cacheWorkMenuBean : mCacheMenuTypeBeans) {
+                    String cacheModuleName = cacheWorkMenuBean.getModuleName();
+                    List<WorkMenuBean.ModuleListBean> cacheModuleList = cacheWorkMenuBean.getModuleList();
+                    if (cacheModuleName.equals(netModuleName)) {
+                        isExist = true;
+                        cacheWorkMenuBean.setModuleId(netWorkMenuBean.getModuleId());
+                        cacheWorkMenuBean.setModuleTag(netWorkMenuBean.getModuleTag());
+                        cacheWorkMenuBean.setModuleName(netWorkMenuBean.getModuleName());
+                        for (WorkMenuBean.ModuleListBean netModuleListBean : netModuleList) {
+                            boolean isFuncExist = false;
+                            String netMenuName = netModuleListBean.getMenuName();
+                            for (WorkMenuBean.ModuleListBean cacheModuleListBean : cacheModuleList) {
+                                String cacheMenuName = cacheModuleListBean.getMenuName();
+                                if (cacheMenuName.equals(netMenuName)) {
+                                    isFuncExist = true;
+                                    if (!cacheModuleListBean.isLocalMenu()) {
+                                        cacheModuleListBean.setCaller(netModuleListBean.getCaller());
+                                        cacheModuleListBean.setMenuActivity(netModuleListBean.getMenuActivity());
+                                        cacheModuleListBean.setMenuIcon(netModuleListBean.getMenuIcon());
+                                        cacheModuleListBean.setMenuName(netModuleListBean.getMenuName());
+                                        cacheModuleListBean.setMenuUrl(netModuleListBean.getMenuUrl());
                                     }
-                                }
-                                if (!isFuncExist) {
-                                    cacheModuleList.add(netModuleListBean);
+                                    break;
                                 }
                             }
-
-                            break;
+                            if (!isFuncExist) {
+                                cacheModuleList.add(netModuleListBean);
+                            }
                         }
-                    }
-                    if (!isExist) {
-                        mCacheMenuTypeBeans.add(netWorkMenuBean);
+
+                        break;
                     }
                 }
+                if (!isExist) {
+                    mCacheMenuTypeBeans.add(netWorkMenuBean);
+                }
+            }
 
-                String resultJson = JSON.toJSONString(mCacheMenuTypeBeans);
-                com.core.utils.CommonUtil.setUniqueSharedPreferences(mContext, Constants.WORK_MENU_CACHE, resultJson);
+            String resultJson = JSON.toJSONString(mCacheMenuTypeBeans);
+            com.core.utils.CommonUtil.setUniqueSharedPreferences(mContext, Constants.WORK_MENU_CACHE, resultJson);
 
-                mPresenter.obtainData(mContext, new Request.Bulider().setWhat(Constants.LOAD_WORK_MENU_CACHE).bulid());
-            }
+            mPresenter.obtainData(mContext, new Request.Bulider().setWhat(Constants.LOAD_WORK_MENU_CACHE).bulid());
         }
     }
 

+ 2 - 1
WeiChat/src/main/res/layout/fragment_work.xml

@@ -2,7 +2,8 @@
 <LinearLayout
     xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
-    android:layout_height="match_parent">
+    android:layout_height="match_parent"
+    android:background="@color/white">
 
     <com.handmark.pulltorefresh.library.PullToRefreshListView
         android:id="@+id/work_menu_lv"

+ 2 - 1
WeiChat/src/main/res/layout/item_work_menu_child.xml

@@ -3,7 +3,8 @@
     xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="wrap_content"
-    android:layout_height="wrap_content">
+    android:layout_height="wrap_content"
+    android:background="@color/white">
 
     <LinearLayout
         android:layout_width="wrap_content"

+ 1 - 0
app_core/common/build.gradle

@@ -40,6 +40,7 @@ dependencies {
     compile deps.stickyListHeaders
     compile deps.stickyGridHeaders
 //    compile deps.vlayout
+//    compile deps.BaseRecyclerViewAdapterHelper
 
     compile 'com.squareup.okhttp3:okhttp:3.9.0'
     compile project(':network')

+ 7 - 0
app_modular/appworks/src/main/AndroidManifest.xml

@@ -237,5 +237,12 @@
                 <category android:name="android.intent.category.DEFAULT" />
             </intent-filter>
         </activity>
+
+        <activity android:name=".activity.CommonDataFormActivity">
+            <intent-filter>
+                <action android:name="com.modular.work.CommonDataFormActivity" />
+                <category android:name="android.intent.category.DEFAULT" />
+            </intent-filter>
+        </activity>
     </application>
 </manifest>

+ 41 - 2
app_modular/appworks/src/main/java/com/uas/appworks/activity/CityIndustryActivity.java

@@ -2,15 +2,26 @@ package com.uas.appworks.activity;
 
 import android.util.Log;
 
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.common.data.JSONUtil;
 import com.core.base.activity.BaseMVPActivity;
 import com.core.net.http.http.Request;
 import com.core.utils.CommonUtil;
+import com.google.gson.Gson;
+import com.handmark.pulltorefresh.library.PullToRefreshBase;
+import com.handmark.pulltorefresh.library.PullToRefreshListView;
 import com.uas.appworks.R;
+import com.uas.appworks.adapter.CityIndustryParentAdapter;
+import com.uas.appworks.model.bean.CityIndustryMenuBean;
 import com.uas.appworks.presenter.WorkPlatPresenter;
 import com.uas.appworks.view.WorkPlatView;
 
+import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.LinkedHashMap;
+import java.util.List;
 import java.util.Map;
 
 /**
@@ -23,6 +34,10 @@ public class CityIndustryActivity extends BaseMVPActivity<WorkPlatPresenter> imp
     private final int OBTAIN_CITY_INDUSTRY_SERVICE = 0x12;
     private final int OBTAIN_CITY_INDUSTRY_CONFIG = 0x13;
 
+    private PullToRefreshListView mPullToRefreshListView;
+    private CityIndustryParentAdapter mCityIndustryParentAdapter;
+    private List<CityIndustryMenuBean> mCityIndustryMenuBeans;
+
     @Override
     protected int getLayout() {
         return R.layout.activity_city_industry;
@@ -30,7 +45,12 @@ public class CityIndustryActivity extends BaseMVPActivity<WorkPlatPresenter> imp
 
     @Override
     protected void initView() {
+        mPullToRefreshListView = $(R.id.city_industry_ptlv);
+        mPullToRefreshListView.setMode(PullToRefreshBase.Mode.DISABLED);
 
+        mCityIndustryMenuBeans = new ArrayList<>();
+        mCityIndustryParentAdapter = new CityIndustryParentAdapter(this, mCityIndustryMenuBeans);
+        mPullToRefreshListView.setAdapter(mCityIndustryParentAdapter);
     }
 
     @Override
@@ -46,7 +66,7 @@ public class CityIndustryActivity extends BaseMVPActivity<WorkPlatPresenter> imp
     @Override
     protected void initData() {
         obtainCityIndustryService();
-        obtainCityIndustryConfig();
+//        obtainCityIndustryConfig();
     }
 
     private void obtainCityIndustryService() {
@@ -100,7 +120,26 @@ public class CityIndustryActivity extends BaseMVPActivity<WorkPlatPresenter> imp
     @Override
     public void loadSuccess(int what, Object object) {
         if (what == OBTAIN_CITY_INDUSTRY_SERVICE) {
-            Log.e("CityIndustryActivity", "service_success = " + object.toString());
+            if (object != null) {
+                Log.e("CityIndustryActivity", "service_success = " + object.toString());
+                Gson gson = new Gson();
+                String result = object.toString();
+                if (JSONUtil.validate(result)) {
+                    mCityIndustryMenuBeans.clear();
+                    JSONObject resultObject = JSON.parseObject(result);
+                    JSONArray configArray = resultObject.getJSONArray("configs");
+                    if (configArray != null) {
+                        for (int i = 0; i < configArray.size(); i++) {
+                            JSONObject configObject = configArray.getJSONObject(i);
+                            CityIndustryMenuBean cityIndustryMenuBean = gson.fromJson(configObject.toString(), CityIndustryMenuBean.class);
+                            mCityIndustryMenuBeans.add(cityIndustryMenuBean);
+                        }
+                    }
+                    mCityIndustryParentAdapter.notifyDataSetChanged();
+                }
+
+            }
+
         } else if (what == OBTAIN_CITY_INDUSTRY_CONFIG) {
             Log.e("CityIndustryActivity", "config_success = " + object.toString());
         }

Dosya farkı çok büyük olduğundan ihmal edildi
+ 126 - 0
app_modular/appworks/src/main/java/com/uas/appworks/activity/CommonDataFormActivity.java


+ 73 - 0
app_modular/appworks/src/main/java/com/uas/appworks/adapter/CityIndustryChildAdapter.java

@@ -0,0 +1,73 @@
+package com.uas.appworks.adapter;
+
+import android.content.Context;
+import android.text.TextUtils;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.BaseAdapter;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import com.me.imageloader.ImageLoaderUtil;
+import com.uas.appworks.R;
+import com.uas.appworks.model.bean.CityIndustryMenuBean;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class CityIndustryChildAdapter extends BaseAdapter {
+    private List<CityIndustryMenuBean.ServesBean> mServesBeans = new ArrayList<CityIndustryMenuBean.ServesBean>();
+    private Context context;
+    private LayoutInflater layoutInflater;
+
+    public CityIndustryChildAdapter(Context context, List<CityIndustryMenuBean.ServesBean> servesBeans) {
+        this.context = context;
+        this.layoutInflater = LayoutInflater.from(context);
+        mServesBeans = servesBeans;
+    }
+
+    @Override
+    public int getCount() {
+        return mServesBeans.size();
+    }
+
+    @Override
+    public CityIndustryMenuBean.ServesBean getItem(int position) {
+        return mServesBeans.get(position);
+    }
+
+    @Override
+    public long getItemId(int position) {
+        return position;
+    }
+
+    @Override
+    public View getView(int position, View convertView, ViewGroup parent) {
+        if (convertView == null) {
+            convertView = layoutInflater.inflate(R.layout.item_city_industry_child, null);
+            convertView.setTag(new ViewHolder(convertView));
+        }
+        initializeViews((CityIndustryMenuBean.ServesBean) getItem(position), (ViewHolder) convertView.getTag());
+        return convertView;
+    }
+
+    private void initializeViews(CityIndustryMenuBean.ServesBean object, ViewHolder holder) {
+        holder.cityIndustryChildNameTv.setText(object.getSv_name());
+        if (TextUtils.isEmpty(object.getSv_logourl().getMobile())) {
+            holder.cityIndustryChildIconIv.setImageResource(R.drawable.defaultpic);
+        } else {
+            ImageLoaderUtil.getInstance().loadImage(object.getSv_logourl().getMobile(), holder.cityIndustryChildIconIv);
+        }
+    }
+
+    protected class ViewHolder {
+        private ImageView cityIndustryChildIconIv;
+        private TextView cityIndustryChildNameTv;
+
+        public ViewHolder(View view) {
+            cityIndustryChildIconIv = (ImageView) view.findViewById(R.id.city_industry_child_icon_iv);
+            cityIndustryChildNameTv = (TextView) view.findViewById(R.id.city_industry_child_name_tv);
+        }
+    }
+}

+ 71 - 0
app_modular/appworks/src/main/java/com/uas/appworks/adapter/CityIndustryParentAdapter.java

@@ -0,0 +1,71 @@
+package com.uas.appworks.adapter;
+
+import android.content.Context;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.BaseAdapter;
+import android.widget.TextView;
+
+import com.core.widget.view.MyGridView;
+import com.uas.appworks.R;
+import com.uas.appworks.model.bean.CityIndustryMenuBean;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class CityIndustryParentAdapter extends BaseAdapter {
+    private List<CityIndustryMenuBean> mCityIndustryMenuBeans = new ArrayList<CityIndustryMenuBean>();
+    private Context mContext;
+    private LayoutInflater layoutInflater;
+    private CityIndustryChildAdapter mCityIndustryChildAdapter;
+
+    public CityIndustryParentAdapter(Context context, List<CityIndustryMenuBean> cityIndustryMenuBeans) {
+        this.mContext = context;
+        this.layoutInflater = LayoutInflater.from(context);
+        mCityIndustryMenuBeans = cityIndustryMenuBeans;
+    }
+
+    @Override
+    public int getCount() {
+        return mCityIndustryMenuBeans.size();
+    }
+
+    @Override
+    public CityIndustryMenuBean getItem(int position) {
+        return mCityIndustryMenuBeans.get(position);
+    }
+
+    @Override
+    public long getItemId(int position) {
+        return position;
+    }
+
+    @Override
+    public View getView(int position, View convertView, ViewGroup parent) {
+        if (convertView == null) {
+            convertView = layoutInflater.inflate(R.layout.item_city_industry_parent, null);
+            convertView.setTag(new ViewHolder(convertView));
+        }
+        initializeViews((CityIndustryMenuBean) getItem(position), (ViewHolder) convertView.getTag());
+        return convertView;
+    }
+
+    private void initializeViews(CityIndustryMenuBean object, ViewHolder holder) {
+        holder.cityIndustryParentTitleTv.setText(object.getSt_name());
+        if (object.getServes() != null) {
+            mCityIndustryChildAdapter = new CityIndustryChildAdapter(mContext, object.getServes());
+            holder.cityIndustryParentGv.setAdapter(mCityIndustryChildAdapter);
+        }
+    }
+
+    protected class ViewHolder {
+        private TextView cityIndustryParentTitleTv;
+        private MyGridView cityIndustryParentGv;
+
+        public ViewHolder(View view) {
+            cityIndustryParentTitleTv = (TextView) view.findViewById(R.id.city_industry_parent_title_tv);
+            cityIndustryParentGv = (MyGridView) view.findViewById(R.id.city_industry_parent_gv);
+        }
+    }
+}

+ 6 - 2
app_modular/appworks/src/main/java/com/uas/appworks/model/WorkPlatModel.java

@@ -85,13 +85,15 @@ public class WorkPlatModel implements IWorkPlatModel {
             // TODO: 2017/11/15 循环逻辑待优化
             for (WorkMenuBean cacheWorkMenuBean : cacheWorkMenuBeans) {
                 String cacheModuleTag = cacheWorkMenuBean.getModuleTag();
+                String cacheModuleName = cacheWorkMenuBean.getModuleName();
                 List<WorkMenuBean.ModuleListBean> cacheTypeList = cacheWorkMenuBean.getModuleList();
                 boolean isWorkMenuExist = false;
 
                 for (WorkMenuBean localWorkMenuBean : localWorkMenuBeans) {
                     String localModuleTag = localWorkMenuBean.getModuleTag();
+                    String localModuleName = localWorkMenuBean.getModuleName();
                     List<WorkMenuBean.ModuleListBean> localModuleList = localWorkMenuBean.getModuleList();
-                    if (localModuleTag.equals(cacheModuleTag)) {
+                    if (localModuleName.equals(cacheModuleName)) {
                         isWorkMenuExist = true;
                         WorkMenuBean workMenuBean = new WorkMenuBean();
                         workMenuBean.setIsLocalModule(true);
@@ -152,9 +154,11 @@ public class WorkPlatModel implements IWorkPlatModel {
             for (WorkMenuBean localWorkMenuBean : localWorkMenuBeans) {
                 boolean isExist = false;
                 String localModuleTag = localWorkMenuBean.getModuleTag();
+                String localModuleName = localWorkMenuBean.getModuleName();
                 for (WorkMenuBean workMenuBean : mMenuTypeBeen) {
                     String moduleTag = workMenuBean.getModuleTag();
-                    if (localModuleTag.equals(moduleTag)) {
+                    String moduleName = workMenuBean.getModuleName();
+                    if (localModuleName.equals(moduleName)) {
                         isExist = true;
                         break;
                     }

+ 9 - 0
app_modular/appworks/src/main/java/com/uas/appworks/model/bean/CityIndustryMenuBean.java

@@ -55,6 +55,7 @@ public class CityIndustryMenuBean {
         private String sv_url;
         private String sv_name;
         private int sv_id;
+        private String sv_desc;
         private SvLogourlBean sv_logourl;
 
         public String getSv_url() {
@@ -81,6 +82,14 @@ public class CityIndustryMenuBean {
             this.sv_id = sv_id;
         }
 
+        public String getSv_desc() {
+            return sv_desc;
+        }
+
+        public void setSv_desc(String sv_desc) {
+            this.sv_desc = sv_desc;
+        }
+
         public SvLogourlBean getSv_logourl() {
             return sv_logourl;
         }

+ 12 - 1
app_modular/appworks/src/main/res/layout/activity_city_industry.xml

@@ -3,6 +3,17 @@
     xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:orientation="vertical">
+    android:orientation="vertical"
+    android:background="@color/white">
+
+    <com.handmark.pulltorefresh.library.PullToRefreshListView
+        android:id="@+id/city_industry_ptlv"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:divider="#cecaca"
+        android:dividerHeight="1dp"
+        android:scrollbars="none"
+        android:scrollingCache="false"
+        />
 
 </LinearLayout>

+ 37 - 0
app_modular/appworks/src/main/res/layout/item_city_industry_child.xml

@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="wrap_content"
+    android:layout_height="wrap_content"
+    android:background="@color/white">
+
+    <LinearLayout
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_centerInParent="true"
+        android:gravity="center"
+        android:orientation="vertical"
+        android:paddingLeft="8dp"
+        android:paddingRight="8dp"
+        android:paddingTop="8dp">
+
+        <ImageView
+            android:id="@+id/city_industry_child_icon_iv"
+            android:layout_width="20dp"
+            android:layout_height="20dp"
+            tools:src="@drawable/defaultpic" />
+
+        <TextView
+            android:id="@+id/city_industry_child_name_tv"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="6dp"
+            android:ellipsize="end"
+            android:gravity="center_horizontal"
+            android:lines="2"
+            android:textColor="#000000"
+            android:textSize="12sp" />
+    </LinearLayout>
+
+</RelativeLayout>

+ 36 - 0
app_modular/appworks/src/main/res/layout/item_city_industry_parent.xml

@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:orientation="vertical">
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:gravity="center_vertical"
+        android:orientation="horizontal">
+
+        <View
+            android:layout_width="6dp"
+            android:layout_height="12dp"
+            android:layout_marginLeft="10dp"
+            android:background="@color/titleBlue" />
+
+        <TextView
+            android:id="@+id/city_industry_parent_title_tv"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:padding="6dp"
+            android:textSize="14sp" />
+    </LinearLayout>
+
+    <com.core.widget.view.MyGridView
+        android:id="@+id/city_industry_parent_gv"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="10dp"
+        android:numColumns="4"
+        android:scrollbars="none" />
+</LinearLayout>

+ 68 - 67
version.gradle

@@ -16,82 +16,83 @@ ext {
     ]
 
     depsVersion = [
-            junitVersion            : '4.12',
-            supportVersion          : '24.2.1',
-            multidex                : '1.0.1',
-            butterknifeVersion      : '8.2.1',
-            fastjsonVersion         : '1.2.24',
-            logVersion              : '1.15',
-            rxJavaVersion           : '1.1.8',
-            rxAndroidVersion        : '1.2.1',
-            okhttpVersion           : '3.4.1',
-            retrofitVersion         : '2.1.0',
-            stethoVersion           : '1.5.0',
-            glideVersion            : '3.8.0',
-            supertoastsVersion      : '2.0',
-            alerterVersion          : '1.0.6',
-            circleimageviewVersion  : '2.1.0',
-            systembartintVersion    : '1.0.3',
-            photoViewVersion        : '1.2.5',
-            leakcanaryVersion       : '1.5',
-            materialDialogsVersion  : '0.9.0.2',
-            stickyGridHeadersVersion: '1.0.1',
-            stickyListHeadersVersion: '2.7.0',
-            activityOnCrashVersion  : '1.5.0',
-            analyticsVersion        : 'latest.integration',
-            tagGroupVersion         : '1.4@aar',
-            jodatimeVersion         : '2.9.4',
-            gifVersion              : '1.2.8',
-            recyclerLib             : 'v1.0',
-            vlayoutVersion          : '1.2.1'
+            junitVersion                        : '4.12',
+            supportVersion                      : '24.2.1',
+            multidex                            : '1.0.1',
+            butterknifeVersion                  : '8.2.1',
+            fastjsonVersion                     : '1.2.24',
+            logVersion                          : '1.15',
+            rxJavaVersion                       : '1.1.8',
+            rxAndroidVersion                    : '1.2.1',
+            okhttpVersion                       : '3.4.1',
+            retrofitVersion                     : '2.1.0',
+            stethoVersion                       : '1.5.0',
+            glideVersion                        : '3.8.0',
+            supertoastsVersion                  : '2.0',
+            alerterVersion                      : '1.0.6',
+            circleimageviewVersion              : '2.1.0',
+            systembartintVersion                : '1.0.3',
+            photoViewVersion                    : '1.2.5',
+            leakcanaryVersion                   : '1.5',
+            materialDialogsVersion              : '0.9.0.2',
+            stickyGridHeadersVersion            : '1.0.1',
+            stickyListHeadersVersion            : '2.7.0',
+            activityOnCrashVersion              : '1.5.0',
+            analyticsVersion                    : 'latest.integration',
+            tagGroupVersion                     : '1.4@aar',
+            jodatimeVersion                     : '2.9.4',
+            gifVersion                          : '1.2.8',
+            recyclerLib                         : 'v1.0',
+            vlayoutVersion                      : '1.2.1',
+            BaseRecyclerViewAdapterHelperVersion: '2.9.30'
     ]
 
     deps = [
-            junit              : 'junit:junit:' + depsVersion.junitVersion,
-            appcompatV7        : 'com.android.support:appcompat-v7:' + depsVersion.supportVersion,
-            supportV4          : 'com.android.support:support-v4:' + depsVersion.supportVersion,
-            supportAnnotations : 'com.android.support:support-annotations:' + depsVersion.supportVersion,
-            design             : 'com.android.support:design:' + depsVersion.supportVersion,
-            gridlayoutV7       : 'com.android.support:gridlayout-v7:' + depsVersion.supportVersion,
-            recyclerviewV7     : 'com.android.support:recyclerview-v7:' + depsVersion.supportVersion,
-            cardviewV7         : 'com.android.support:cardview-v7:' + depsVersion.supportVersion,
-            multidex           : 'com.android.support:multidex:' + depsVersion.multidex,
+            junit                        : 'junit:junit:' + depsVersion.junitVersion,
+            appcompatV7                  : 'com.android.support:appcompat-v7:' + depsVersion.supportVersion,
+            supportV4                    : 'com.android.support:support-v4:' + depsVersion.supportVersion,
+            supportAnnotations           : 'com.android.support:support-annotations:' + depsVersion.supportVersion,
+            design                       : 'com.android.support:design:' + depsVersion.supportVersion,
+            gridlayoutV7                 : 'com.android.support:gridlayout-v7:' + depsVersion.supportVersion,
+            recyclerviewV7               : 'com.android.support:recyclerview-v7:' + depsVersion.supportVersion,
+            cardviewV7                   : 'com.android.support:cardview-v7:' + depsVersion.supportVersion,
+            multidex                     : 'com.android.support:multidex:' + depsVersion.multidex,
 
-            logger             : 'com.orhanobut:logger:' + depsVersion.logVersion,
-            fastjson           : 'com.alibaba:fastjson:' + depsVersion.fastjsonVersion,
-            stetho             : 'com.facebook.stetho:stetho:' + depsVersion.stethoVersion,
+            logger                       : 'com.orhanobut:logger:' + depsVersion.logVersion,
+            fastjson                     : 'com.alibaba:fastjson:' + depsVersion.fastjsonVersion,
+            stetho                       : 'com.facebook.stetho:stetho:' + depsVersion.stethoVersion,
 
-            butterknife        : 'com.jakewharton:butterknife:' + depsVersion.butterknifeVersion,
-            butterknifeCompiler: 'com.jakewharton:butterknife-compiler:' + depsVersion.butterknifeVersion,
-            rxjava             : 'io.reactivex:rxjava:' + depsVersion.rxJavaVersion,
-            rxandroid          : 'io.reactivex:rxandroid:' + depsVersion.rxAndroidVersion,
-            okhttp             : 'com.squareup.okhttp3:okhttp:' + depsVersion.okhttpVersion,
-            retrofit           : 'com.squareup.retrofit2:retrofit:' + depsVersion.retrofitVersion,
-            converterGson      : 'com.squareup.retrofit2:converter-gson:' + depsVersion.retrofitVersion,
-            adapterRxjava      : 'com.squareup.retrofit2:adapter-rxjava:' + depsVersion.retrofitVersion,
+            butterknife                  : 'com.jakewharton:butterknife:' + depsVersion.butterknifeVersion,
+            butterknifeCompiler          : 'com.jakewharton:butterknife-compiler:' + depsVersion.butterknifeVersion,
+            rxjava                       : 'io.reactivex:rxjava:' + depsVersion.rxJavaVersion,
+            rxandroid                    : 'io.reactivex:rxandroid:' + depsVersion.rxAndroidVersion,
+            okhttp                       : 'com.squareup.okhttp3:okhttp:' + depsVersion.okhttpVersion,
+            retrofit                     : 'com.squareup.retrofit2:retrofit:' + depsVersion.retrofitVersion,
+            converterGson                : 'com.squareup.retrofit2:converter-gson:' + depsVersion.retrofitVersion,
+            adapterRxjava                : 'com.squareup.retrofit2:adapter-rxjava:' + depsVersion.retrofitVersion,
 
-            glide              : 'com.github.bumptech.glide:glide:' + depsVersion.glideVersion,
+            glide                        : 'com.github.bumptech.glide:glide:' + depsVersion.glideVersion,
 
-            supertoasts        : 'com.github.johnpersano:supertoasts:' + depsVersion.supertoastsVersion,
-            alerter            : 'com.tapadoo.android:alerter:' + depsVersion.alerterVersion,
+            supertoasts                  : 'com.github.johnpersano:supertoasts:' + depsVersion.supertoastsVersion,
+            alerter                      : 'com.tapadoo.android:alerter:' + depsVersion.alerterVersion,
 
-            circleimageview    : 'de.hdodenhof:circleimageview:' + depsVersion.circleimageviewVersion,
-            systembartint      : 'com.readystatesoftware.systembartint:systembartint:' + depsVersion.systembartintVersion,
-            photoView          : 'com.commit451:PhotoView:' + depsVersion.photoViewVersion,
-
-            tagGroup           : 'me.gujun.android.taggroup:library:' + depsVersion.tagGroupVersion,
-            analytics          : 'com.umeng.analytics:analytics:' + depsVersion.analyticsVersion,
-            activityOnCrash    : 'cat.ereza:customactivityoncrash:' + depsVersion.activityOnCrashVersion,
-            stickyListHeaders  : 'se.emilsjolander:stickylistheaders:' + depsVersion.stickyListHeadersVersion,
-            stickyGridHeaders  : 'com.github.TonicArtos:StickyGridHeaders:' + depsVersion.stickyGridHeadersVersion,
-            materialDialogs    : 'com.afollestad.material-dialogs:core:' + depsVersion.materialDialogsVersion,
-            leakcanary         : 'com.squareup.leakcanary:leakcanary-android:' + depsVersion.leakcanaryVersion,
-            leakcanaryNp       : 'com.squareup.leakcanary:leakcanary-android-no-op:' + depsVersion.leakcanaryVersion,
-            jodatime           : 'joda-time:joda-time:' + depsVersion.jodatimeVersion,
-            gif                : 'pl.droidsonroids.gif:android-gif-drawable:' + depsVersion.gifVersion,
-            recyclerLib        : 'com.gxut.ui:recyclerlibrary:' + depsVersion.recyclerLib,
-            vlayout            : 'com.alibaba.android:vlayout:' + depsVersion.vlayoutVersion
+            circleimageview              : 'de.hdodenhof:circleimageview:' + depsVersion.circleimageviewVersion,
+            systembartint                : 'com.readystatesoftware.systembartint:systembartint:' + depsVersion.systembartintVersion,
+            photoView                    : 'com.commit451:PhotoView:' + depsVersion.photoViewVersion,
 
+            tagGroup                     : 'me.gujun.android.taggroup:library:' + depsVersion.tagGroupVersion,
+            analytics                    : 'com.umeng.analytics:analytics:' + depsVersion.analyticsVersion,
+            activityOnCrash              : 'cat.ereza:customactivityoncrash:' + depsVersion.activityOnCrashVersion,
+            stickyListHeaders            : 'se.emilsjolander:stickylistheaders:' + depsVersion.stickyListHeadersVersion,
+            stickyGridHeaders            : 'com.github.TonicArtos:StickyGridHeaders:' + depsVersion.stickyGridHeadersVersion,
+            materialDialogs              : 'com.afollestad.material-dialogs:core:' + depsVersion.materialDialogsVersion,
+            leakcanary                   : 'com.squareup.leakcanary:leakcanary-android:' + depsVersion.leakcanaryVersion,
+            leakcanaryNp                 : 'com.squareup.leakcanary:leakcanary-android-no-op:' + depsVersion.leakcanaryVersion,
+            jodatime                     : 'joda-time:joda-time:' + depsVersion.jodatimeVersion,
+            gif                          : 'pl.droidsonroids.gif:android-gif-drawable:' + depsVersion.gifVersion,
+            recyclerLib                  : 'com.gxut.ui:recyclerlibrary:' + depsVersion.recyclerLib,
+            vlayout                      : 'com.alibaba.android:vlayout:' + depsVersion.vlayoutVersion,
+            BaseRecyclerViewAdapterHelper: 'com.github.CymChad:BaseRecyclerViewAdapterHelper:' + depsVersion.BaseRecyclerViewAdapterHelperVersion
     ]
 }
   

Bu fark içinde çok fazla dosya değişikliği olduğu için bazı dosyalar gösterilmiyor