Jelajahi Sumber

修改工作页面前备份

gongpm 10 tahun lalu
induk
melakukan
4d3a5a8ba7

+ 26 - 11
WeiChat/src/main/java/com/sk/weichat/adapter/PublicMessageAdapter.java

@@ -17,6 +17,7 @@ import android.widget.BaseAdapter;
 import android.widget.FrameLayout;
 import android.widget.ImageView;
 import android.widget.ListView;
+import android.widget.RelativeLayout;
 import android.widget.TextView;
 
 import com.android.volley.Response.ErrorListener;
@@ -308,6 +309,7 @@ public class PublicMessageAdapter extends BaseAdapter implements ListenerAudio,
             viewHolder.multi_praise_tv = (TextView) convertView.findViewById(R.id.multi_praise_tv);
             viewHolder.command_listView = (ListView) convertView.findViewById(R.id.command_listView);
             viewHolder.viewLine = convertView.findViewById(R.id.line);
+            viewHolder.praise_rl = (RelativeLayout) convertView.findViewById(R.id.praise_rl);
             if (innerView != null) {
                 viewHolder.content_fl.addView(innerView);
             }
@@ -419,16 +421,7 @@ public class PublicMessageAdapter extends BaseAdapter implements ListenerAudio,
                 builder.append("...");
             }
             viewHolder.multi_praise_tv.setText(builder);
-            if (viewHolder.multi_praise_tv.getLineCount() > 0) {
-                if (!viewHolder.isf) {
-                    ViewGroup.LayoutParams p = viewHolder.multi_praise_tv.getLayoutParams();
-                    p.height = viewHolder.multi_praise_tv.getHeight() * viewHolder.multi_praise_tv.getLineCount();
-                    viewHolder.multi_praise_tv.setLayoutParams(p);
-                    viewHolder.isf=false;
-                }
-            }
-            Log.i("gongpengming", viewHolder.multi_praise_tv.getLineCount() + "行数");
-//            if (viewHolder.multi_praise_tv.getLineCount()>1)
+
         } else {
             viewHolder.multi_praise_tv.setVisibility(View.GONE);
             viewHolder.multi_praise_tv.setText("");
@@ -451,6 +444,28 @@ public class PublicMessageAdapter extends BaseAdapter implements ListenerAudio,
             viewHolder.command_listView.setAdapter(null);
         }
 
+//        int height = 0;
+//
+//        if (viewHolder.multi_praise_tv.getVisibility() == View.VISIBLE)
+//        {
+//            height += viewHolder.multi_praise_tv.getHeight()+50;
+//            Log.i("gongpengming","优点是"+height);
+//        }
+//        if (viewHolder.command_listView.getVisibility() == View.VISIBLE)
+//        {
+//            height += viewHolder.command_listView.getHeight();
+//            Log.i("gongpengming","有评论"+height);
+//
+//        }
+//        ViewGroup.LayoutParams p = viewHolder.praise_rl.getLayoutParams();
+//        p.height = height + 20;
+//        viewHolder.praise_rl.setLayoutParams(p);
+//        Log.i("gongpengming","height="+height);
+//        if (height == 0) viewHolder.praise_rl.setVisibility(View.GONE);
+        if (viewHolder.multi_praise_tv.getVisibility() == View.GONE&&viewHolder.command_listView.getVisibility() == View.GONE)
+            viewHolder.praise_rl.setVisibility(View.GONE);
+        else
+            viewHolder.praise_rl.setVisibility(View.VISIBLE);
         // //////////////////上面是公用的部分,下面是每个Type不同的部分/////////////////////////////////////////
         // 转载的消息会有一个转载人和text
         SpannableStringBuilder forwardingBuilder = null;
@@ -598,7 +613,7 @@ public class PublicMessageAdapter extends BaseAdapter implements ListenerAudio,
         ImageView operation_more_img;
         TextView multi_praise_tv;
         ListView command_listView;
-        boolean isf=true;
+        RelativeLayout praise_rl;
     }
 
     /* 普通的Text */

+ 16 - 19
WeiChat/src/main/java/com/sk/weichat/ui/cardcast/CardcastActivity.java

@@ -36,8 +36,6 @@ public class CardcastActivity extends BaseActivity {
 
     private boolean mBind;
     private CoreService mXmppService;
-    private RadioButton btnG;
-    private RadioButton btnAG;
     private FriendFragment friendFragment;
     private AttentionFragment attentionFragment;
     private RoomFragment roomFragment;
@@ -66,13 +64,12 @@ public class CardcastActivity extends BaseActivity {
         roomFragment = new RoomFragment();
         friendFragment = new FriendFragment();
         attentionFragment = new AttentionFragment();
-        btnG = (RadioButton) findViewById(R.id.btn_guanzu);
-        btnAG = (RadioButton) findViewById(R.id.btn_aguanzu);
+
         FragmentManager fm = getSupportFragmentManager();
         bt = fm.beginTransaction();
         bt.add(R.id.fl, friendFragment);
         bt.add(R.id.fl, attentionFragment);
-        bt.hide(roomFragment);
+        bt.hide(attentionFragment);
         bt.commit();
         findViewById(R.id.tv_back).setOnClickListener(new View.OnClickListener() {
             @Override
@@ -80,32 +77,32 @@ public class CardcastActivity extends BaseActivity {
                 CardcastActivity.this.finish();
             }
         });
-        btnG.setOnClickListener(new View.OnClickListener() {
+        findViewById(R.id.btn_guanzu).setOnClickListener(new View.OnClickListener() {
             @SuppressLint("NewApi")
             @Override
             public void onClick(View view) {
-                btnG.setClickable(false);
-                btnG.setBackground(getResources().getDrawable(R.drawable.aguanzu_pass));
-                btnAG.setBackground(getResources().getDrawable(R.drawable.guanzu));
-                btnAG.setClickable(true);
+//                btnG.setClickable(false);
+//                btnG.setBackground(getResources().getDrawable(R.drawable.aguanzu_pass));
+//                btnAG.setBackground(getResources().getDrawable(R.drawable.guanzu));
+//                btnAG.setClickable(true);
                 bt = getSupportFragmentManager().beginTransaction();
-                bt.show(friendFragment);
-                bt.hide(attentionFragment);
+                bt.show(attentionFragment);
+                bt.hide(friendFragment);
                 bt.commit();
 
             }
         });
-        btnAG.setOnClickListener(new View.OnClickListener() {
+        findViewById(R.id.btn_aguanzu).setOnClickListener(new View.OnClickListener() {
             @SuppressLint("NewApi")
             @Override
             public void onClick(View view) {
-                btnAG.setClickable(false);
-                btnG.setClickable(true);
-                btnG.setBackground(getResources().getDrawable(R.drawable.aguanzu));
-                btnAG.setBackground(getResources().getDrawable(R.drawable.guanzu_pass));
+//                btnAG.setClickable(false);
+//                btnG.setClickable(true);
+//                btnG.setBackground(getResources().getDrawable(R.drawable.aguanzu));
+//                btnAG.setBackground(getResources().getDrawable(R.drawable.guanzu_pass));
                 bt = getSupportFragmentManager().beginTransaction();
-                bt.show(attentionFragment);
-                bt.hide(friendFragment);
+                bt.show(friendFragment);
+                bt.hide(attentionFragment);
                 bt.commit();
             }
         });

+ 1 - 0
WeiChat/src/main/java/com/sk/weichat/ui/erp/activity/SaleDetailActivity.java

@@ -163,6 +163,7 @@ public class SaleDetailActivity extends BaseActivity implements OnClickListener
 		initData();
 	}
 	public void initView() {
+		Log.i("gongpengming","病假详情");
 		setContentView(R.layout.act_sale_detail_list);
 		TAG = "SaleDetailActivity";
 		ct=this;

File diff ditekan karena terlalu besar
+ 575 - 554
WeiChat/src/main/java/com/sk/weichat/ui/erp/activity/SaleSelectActivity.java


+ 0 - 2
WeiChat/src/main/java/com/sk/weichat/ui/erp/fragment/WorksFragment.java

@@ -96,10 +96,8 @@ public class WorksFragment extends XutilsFragment implements View.OnClickListene
                 intent.putExtra(AppConstant.EXTRA_CIRCLE_TYPE, AppConstant.CIRCLE_TYPE_MY_BUSINESS);
                 if (MainActivity.timeMin != -1 && MainActivity.timeMin != PreferenceUtils.getLong(getActivity(), MainActivity.TIME_MAIN)){
                     PreferenceUtils.putLong(getActivity(), MainActivity.TIME_MAIN, MainActivity.timeMin); //获取以前时间
-                    Log.i("gongpengmingif","MainActivity.timeMin ="+MainActivity.timeMin +"@@@  PreferenceUtils.getLong(getActivity(), MainActivity.TIME_MAIN)"+PreferenceUtils.getLong(getActivity(), MainActivity.TIME_MAIN));
 
                 }else{
-                    Log.i("gongpengmingss","MainActivity.timeMin ="+MainActivity.timeMin +"@@@  PreferenceUtils.getLong(getActivity(), MainActivity.TIME_MAIN)"+PreferenceUtils.getLong(getActivity(), MainActivity.TIME_MAIN));
                 }
                 startActivity(intent);
                 break;

+ 6 - 4
WeiChat/src/main/res/layout/activity_cardast.xml

@@ -28,21 +28,23 @@
             android:orientation="horizontal">
 
             <RadioButton
-                android:id="@+id/btn_guanzu"
+                android:id="@+id/btn_aguanzu"
                 android:layout_width="70dp"
                 android:layout_height="35dp"
                 android:background="@drawable/aguanzu_pass"
                 android:button="@null"
-                android:clickable="false" />
+                android:clickable="true"
+              />
 
             <RadioButton
-                android:id="@+id/btn_aguanzu"
+                android:id="@+id/btn_guanzu"
                 android:layout_width="70dp"
                 android:layout_height="35dp"
                 android:layout_toRightOf="@+id/btn_guanzu"
                 android:background="@drawable/guanzu"
                 android:button="@null"
-                android:clickable="true" />
+                android:clickable="false"
+           />
         </RadioGroup>
     </RelativeLayout>
 

+ 9 - 11
WeiChat/src/main/res/layout/from_leave_view.xml

@@ -174,8 +174,8 @@
 
                 <RelativeLayout
                     android:id="@+id/ry_set_startTime"
-                    android:background="@color/item_color1"
-                    style="@style/form_relative_customer">
+                    style="@style/form_relative_customer"
+                    android:background="@color/item_color1">
 
 
                     <TextView
@@ -193,18 +193,17 @@
                 </RelativeLayout>
 
 
-
                 <RelativeLayout
                     android:id="@+id/ry_set_endTime"
-                    android:background="@color/item_color2"
-                    style="@style/form_relative_customer">
+                    style="@style/form_relative_customer"
+                    android:background="@color/item_color2">
 
                     <TextView
                         android:id="@+id/tv_date_gh"
-                        android:textSize="@dimen/text_main"
-                        android:textColor="@color/text_main"
                         style="@style/form_relative_left_text"
-                        android:text="结束时间:" />
+                        android:text="结束时间:"
+                        android:textColor="@color/text_main"
+                        android:textSize="@dimen/text_main" />
 
                     <com.andreabaccega.widget.FormEditText xmlns:editTextFormExample="http://schemas.android.com/apk/res-auto"
                         android:id="@+id/tv_end_time"
@@ -228,14 +227,13 @@
                 <Button
                     android:id="@+id/bt_save"
                     style="@style/from_button_base_bule"
-                    android:text="提  交"/>
+                    android:text="提  交" />
             </LinearLayout>
 
             <LinearLayout
                 android:id="@+id/ly_bottom_handler"
                 style="@style/form_linear_customer"
-                android:orientation="horizontal"
-                android:visibility="gone">
+                android:orientation="horizontal">
 
                 <Button
                     android:id="@+id/bt_add"

+ 36 - 23
WeiChat/src/main/res/layout/p_msg_item_main_body.xml

@@ -5,7 +5,7 @@
     android:descendantFocusability="blocksDescendants"
     android:gravity="center_horizontal"
     android:orientation="horizontal"
-    android:padding="10dp" >
+    android:padding="10dp">
 
     <ImageView
         android:id="@+id/avatar_img"
@@ -19,7 +19,7 @@
         android:layout_width="fill_parent"
         android:layout_height="wrap_content"
         android:layout_marginLeft="10dp"
-        android:orientation="vertical" >
+        android:orientation="vertical">
 
         <TextView
             android:id="@+id/nick_name_tv"
@@ -28,20 +28,20 @@
             android:background="@drawable/user_nick_name_bg"
             android:gravity="center_vertical"
             android:singleLine="true"
-            android:textSize="@dimen/text_main"
-            android:textColor="@color/text_main"
             android:text="texts"
+            android:textColor="@color/text_main"
+            android:textSize="@dimen/text_main"
             android:textStyle="bold" />
 
         <TextView
             android:id="@+id/body_tv"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:layout_marginTop="8dp"
             android:layout_marginLeft="5dp"
+            android:layout_marginTop="8dp"
             android:background="@drawable/text_click_bg"
-            android:textColor="@color/text_hine"
             android:text="ss"
+            android:textColor="@color/text_hine"
             android:textSize="@dimen/text_hine" />
 
         <FrameLayout
@@ -55,7 +55,7 @@
             android:layout_height="wrap_content"
             android:layout_marginTop="15dp"
             android:gravity="center_vertical"
-            android:orientation="horizontal" >
+            android:orientation="horizontal">
 
             <TextView
                 android:id="@+id/time_tv"
@@ -64,8 +64,8 @@
                 android:layout_alignParentLeft="true"
                 android:layout_centerVertical="true"
                 android:gravity="center_vertical"
-                android:textColor="@color/text_hine"
                 android:text="ss"
+                android:textColor="@color/text_hine"
                 android:textSize="@dimen/text_min" />
 
             <TextView
@@ -90,28 +90,41 @@
                 android:background="@drawable/operation_more_bg"
                 android:contentDescription="@string/app_name" />
         </RelativeLayout>
+
         <View
             android:id="@+id/line"
-            android:visibility="gone"
             android:layout_width="match_parent"
             android:layout_height="1dp"
             android:layout_marginTop="5dp"
-            android:background="@color/item_line"/>
-        <TextView
-            android:id="@+id/multi_praise_tv"
-            android:layout_width="fill_parent"
-            android:layout_height="wrap_content"
-            android:layout_marginTop="8dp"
-            android:text="safddsafdsafdsafdsafdsafadsfewqewqdfdsafdsafdsafdsa法国人完全覆盖对方的身份为亲人"
-            android:background="@drawable/praise_bg"
-            android:drawableLeft="@drawable/likes"
-            android:textSize="@dimen/text_min" />
+            android:background="@color/item_line"
+            android:visibility="gone" />
 
-        <com.sk.weichat.view.MyListView
-            android:id="@+id/command_listView"
-            android:layout_width="fill_parent"
+        <RelativeLayout
+            android:id="@+id/praise_rl"
+            android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:layout_marginTop="5dp" />
+            android:background="#f2f2f2"
+          >
+            <!--android:background="@drawable/praise_bg"-->
+            <TextView
+                android:id="@+id/multi_praise_tv"
+                android:layout_width="fill_parent"
+                android:layout_height="wrap_content"
+                android:drawableLeft="@drawable/likes"
+                android:paddingBottom="2dp"
+                android:paddingTop="10dp"
+                android:text="safddsafdsafdsafdsafdsafadsfewqewqdfdsafdsafdsafdsa法国人完全覆盖对方的身份为亲人"
+                android:textSize="@dimen/text_min" />
+
+            <com.sk.weichat.view.MyListView
+                android:id="@+id/command_listView"
+                android:layout_width="fill_parent"
+                android:layout_height="wrap_content"
+                android:layout_below="@+id/multi_praise_tv"
+                android:paddingTop="5dp" />
+        </RelativeLayout>
+
+
     </LinearLayout>
 
 </LinearLayout>

+ 2 - 2
WeiChat/src/main/res/layout/row_sort_friend.xml

@@ -24,8 +24,8 @@
 
         <ImageView
             android:id="@+id/avatar_img"
-            android:layout_width="50dp"
-            android:layout_height="50dp"
+            android:layout_width="38dp"
+            android:layout_height="38dp"
             android:layout_centerVertical="true"
             android:contentDescription="@string/app_name"
             android:src="@drawable/friend_u" />

Beberapa file tidak ditampilkan karena terlalu banyak file yang berubah dalam diff ini