Просмотр исходного кода

Merge branch 'developer' of https://gitlab.com/Arisono/SkWeiChat-Baidu into developer

raomeng 8 лет назад
Родитель
Сommit
d4295942d5

+ 15 - 19
WeiChat/src/main/res/layout/activity_contacts.xml

@@ -8,12 +8,25 @@
         android:id="@+id/voiceSearchView"
         android:layout_width="match_parent"
         android:layout_height="48dp" />
+    <LinearLayout
+        android:id="@+id/include_tag"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:clickable="true"
+        android:layout_alignParentBottom="true"
+        android:orientation="vertical">
+        <View
+            android:layout_width="match_parent"
+            android:layout_height="1px"
+            android:background="@color/item_line" />
+        <include layout="@layout/include_select" />
+    </LinearLayout>
     <com.handmark.pulltorefresh.library.PullToRefreshListView
         xmlns:ptr="http://schemas.android.com/apk/res-auto"
         android:id="@+id/mList"
         android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_above="@+id/include_tag"
+        android:layout_height="match_parent"
+        android:layout_above="@id/include_tag"
         android:layout_below="@+id/voiceSearchView"
         android:divider="#00000000"
         android:dividerHeight="0dip"
@@ -26,21 +39,4 @@
         ptr:ptrOverScroll="false"
         ptr:ptrScrollingWhileRefreshingEnabled="true"
         ptr:ptrShowIndicator="false" />
-    <LinearLayout
-        android:id="@+id/include_tag"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:clickable="true"
-        android:layout_alignParentBottom="true"
-        android:layout_alignParentLeft="true"
-        android:layout_alignParentStart="true"
-        android:orientation="vertical">
-
-        <View
-            android:layout_width="match_parent"
-            android:layout_height="2px"
-            android:background="@color/item_line" />
-
-        <include layout="@layout/include_select" />
-    </LinearLayout>
 </RelativeLayout>

+ 12 - 6
app_modular/appbooking/src/main/java/com/modular/booking/activity/business/BBCompanyListActivity.java

@@ -69,21 +69,27 @@ public class BBCompanyListActivity extends BaseActivity {
         emptyLayout.setShowErrorButton(false);
         emptyLayout.setEmptyViewRes(R.layout.view_empty);
         adapter = new ListAdapter(formBean);
+        SelectBean selectBean=new SelectBean();
+        selectBean.setName(CommonUtil.getSharedPreferences(mContext,"erp_commpany"));
+        formBean.add(selectBean);
         list.setAdapter(adapter);
     }
     
     public void initEvent(){
-        search_edit.setText(CommonUtil.getSharedPreferences(mContext,"erp_commpany"));
+       // search_edit.setText(CommonUtil.getSharedPreferences(mContext,"erp_commpany"));
         list.setOnItemClickListener(new AdapterView.OnItemClickListener() {
             @Override
             public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
                 List<SelectBean> formBeaans=  adapter.getFormBeaan();
                 if (!ListUtils.isEmpty(formBeaans)){
-                    String json=formBeaans.get(position).getJson();
-                    String name= JSON.parseObject(json).getString("company");
-                    ToastMessage(name);
-//                    startActivityForResult(new Intent(mContext,MuilSelectBeanActivity.class)
-//                            .putExtra("name",name),0x01);
+                    String name= null;
+                    try {
+                        String json=formBeaans.get(position).getJson();
+                        name = JSON.parseObject(json).getString("company");
+                    } catch (Exception e) {
+                        name=formBeaans.get(position).getName();
+                    }
+                    
                     Intent intent = new Intent("com.modular.main.SelectCollisionActivity");
                     SelectCollisionTurnBean bean = new SelectCollisionTurnBean()
                             .setResultCode(0x001)

+ 8 - 0
app_modular/appbooking/src/main/java/com/modular/booking/activity/business/BBookingDetailActivity.java

@@ -46,6 +46,7 @@ import com.core.model.SelectCollisionTurnBean;
 import com.core.model.SelectEmUser;
 import com.core.model.XmppMessage;
 import com.core.utils.helper.AvatarHelper;
+import com.core.widget.CustomerScrollView;
 import com.core.widget.MyListView;
 import com.core.xmpp.CoreService;
 import com.core.xmpp.ListenerManager;
@@ -118,6 +119,7 @@ public class BBookingDetailActivity extends OABaseActivity implements View.OnCli
 
         }
     };
+    private CustomerScrollView sv_top;
 
     @Override
     protected void onDestroy() {
@@ -177,6 +179,7 @@ public class BBookingDetailActivity extends OABaseActivity implements View.OnCli
     
     public void initView(){
         getSupportActionBar().setTitle("商务预约");
+        sv_top =(CustomerScrollView)findViewById(R.id.sv_top);
         mListDetail=(MyListView) findViewById(R.id.mListDetail);
         rvTop = (RelativeLayout) findViewById(R.id.rv_top);
         llLeft = (LinearLayout) findViewById(R.id.ll_left);
@@ -293,6 +296,8 @@ public class BBookingDetailActivity extends OABaseActivity implements View.OnCli
             ll_bottom.setVisibility(View.GONE);
             isMenuShuffle=false;
         }
+        ll_bottom.setVisibility(View.VISIBLE);
+        sv_top.setVisibility(View.VISIBLE);
     }
 
     public void initEvent(){
@@ -308,6 +313,7 @@ public class BBookingDetailActivity extends OABaseActivity implements View.OnCli
     private String companys;
     private String  bmanid;
     public void getApiData(){
+        showLoading();
         HttpClient httpClient=new HttpClient.Builder("http://113.105.74.140:8092/").build();
         httpClient.Api()
                 .send(new HttpClient.Builder().url("user/appBusinessDetail")
@@ -318,6 +324,7 @@ public class BBookingDetailActivity extends OABaseActivity implements View.OnCli
                     
                     @Override
                     public void onResponse(Object o) {
+                        dimssLoading();
                         LogUtil.d("ResponseText"," onResponse o:"+o.toString());
                         //mapdetail
                         if (JSONUtil.validate(o.toString())){
@@ -327,6 +334,7 @@ public class BBookingDetailActivity extends OABaseActivity implements View.OnCli
                             JSONObject baseObject=baseArray.getJSONObject(0);
                             
                             model= JSON.parseObject(baseObject.toJSONString(),BookingModel.class);
+                            
 //                            tvTime.setText(model.getAb_starttime().substring(0,10)+" "+model.getAb_starttime().substring(11,16)
 //                            +"-"+model.getAb_endtime().substring(11,16));
 //                            tv_topic.setText(model.getAb_content());

+ 2 - 0
app_modular/appbooking/src/main/res/layout/activity_bbooking_detail.xml

@@ -8,6 +8,7 @@
         android:layout_width="match_parent"
         android:layout_height="match_parent"
         android:layout_marginBottom="50dp"
+        android:visibility="gone"
         android:fillViewport="true">
 
         <RelativeLayout
@@ -231,6 +232,7 @@
         android:layout_width="match_parent"
         android:layout_height="48dp"
         android:layout_alignParentBottom="true"
+        android:visibility="gone"
         android:orientation="horizontal"
         android:weightSum="2">
 

+ 18 - 11
app_modular/appcontact/src/main/java/com/uas/appcontact/ui/activity/ContactsActivity.java

@@ -18,6 +18,7 @@ import android.widget.CheckBox;
 import android.widget.CompoundButton;
 import android.widget.LinearLayout;
 import android.widget.ListView;
+import android.widget.RelativeLayout;
 import android.widget.TextView;
 
 import com.alibaba.fastjson.JSON;
@@ -90,6 +91,7 @@ public class ContactsActivity extends OABaseActivity implements ContactsAdapter.
 
     private PullToRefreshListView mlist;
     private VoiceSearchView voiceSearchView;
+    private RelativeLayout select_rl;
     private TextView mumber_tv;
     private CheckBox all_sure_cb;
     private boolean isClickCb = true;
@@ -138,13 +140,17 @@ public class ContactsActivity extends OABaseActivity implements ContactsAdapter.
         all_sure_cb = (CheckBox) findViewById(R.id.all_sure_cb);
         mumber_tv = (TextView) findViewById(R.id.mumber_tv);
         include_tag= (LinearLayout) findViewById(R.id.include_tag);
-
+        select_rl= (RelativeLayout) findViewById(R.id.select_rl);
         voiceSearchView = (VoiceSearchView) findViewById(R.id.voiceSearchView);
         if (getIntent() != null) {
             type = getIntent().getIntExtra("type", 0);
             String title = getIntent().getStringExtra("title");
             isSingleSelect = getIntent().getBooleanExtra("isSingleSelect", true);
-           
+            if(isSingleSelect){
+                select_rl.setVisibility(View.GONE);
+            }else{
+                select_rl.setVisibility(View.VISIBLE);
+            }
             if (!StringUtil.isEmpty(title)) {
                 getSupportActionBar().setTitle(title);
             } else {
@@ -422,7 +428,7 @@ public class ContactsActivity extends OABaseActivity implements ContactsAdapter.
                     List<Contacts> contacts =
                             ContactsUtils.getContacts1();
                     //上传数据到服务器
-                    uploadData(contacts);
+                  uploadData(contacts);
                     if (contacts != null) {
                         for (Contacts entity : contacts) {
                             ContactsModel model = new ContactsModel();
@@ -461,6 +467,14 @@ public class ContactsActivity extends OABaseActivity implements ContactsAdapter.
             @Override
             public void run() {
                 final List<ContactsModel> lists = getLocalContactsByDB();
+//                List<ContactsModel> contacts=new ArrayList<>();
+//                for (ContactsModel model:lists){
+//                    if ("0".equals(model.getImid())){
+//                        contacts.add(model);
+//                    }
+//                }
+//                uploadData(contacts);
+                    
                 LogUtil.d("Test", "!ListUtils.isEmpty(lists)=" + !ListUtils.isEmpty(lists));
                 boolean falg = !ListUtils.isEmpty(lists) && !isHasNet;
                 LogUtil.d("Test", "缓存不为空!" + falg);
@@ -479,14 +493,7 @@ public class ContactsActivity extends OABaseActivity implements ContactsAdapter.
                                 mlist.onRefreshComplete();
                                 voiceSearchView.getSearch_edit().setHint(lists.size() + "位联系人");
                                 dimssLoading();
-                                if(isSingleSelect){
-                                    include_tag.setVisibility(View.GONE);
-                                    //include_tag.getBackground().setAlpha(0);
-                                }else{
-                                    include_tag.setVisibility(View.VISIBLE);
-                                    // include_tag.getBackground().setAlpha(100);
-
-                                }
+                              
                             }
                         }
                     });

+ 2 - 2
version.gradle

@@ -11,8 +11,8 @@ ext {
             minSdkVersion    : 9,
             targetSdkVersion : 24,
             javaVersion      : JavaVersion.VERSION_1_8,
-            versionCode      : 113,
-            versionName      : '5.9.1',
+            versionCode      : 114,
+            versionName      : '5.9.2',
     ]
 
     depsVersion = [