Browse Source

git修改备份

gongpengming 9 years ago
parent
commit
76a5953279

+ 0 - 1
WeiChat/build.gradle

@@ -85,7 +85,6 @@ dependencies {
     compile 'com.android.support:support-v4:22.2.0'
     compile 'com.android.support:appcompat-v7:22.2.0'
     compile 'com.android.support:cardview-v7:22.2.0'
-    compile 'com.android.support:design:22+'
     compile 'com.android.support:design:22.2.0'
     compile 'com.commit451:PhotoView:1.2.5'
     compile 'me.gujun.android.taggroup:library:1.4@aar'

+ 3 - 3
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/oa/MeetingActivity.java

@@ -9,15 +9,15 @@ import android.view.View;
 import android.view.ViewGroup;
 import android.widget.AdapterView;
 import android.widget.BaseAdapter;
-import android.widget.ListView;
 import android.widget.TextView;
 
+import com.handmark.pulltorefresh.library.PullToRefreshListView;
 import com.xzjmyk.pm.activity.R;
 import com.xzjmyk.pm.activity.ui.base.BaseActivity;
 
 public class MeetingActivity extends BaseActivity {
     private MeetingActivity activity = this;
-    private ListView listView;
+    private PullToRefreshListView listView;
 
     @Override
     protected void onCreate(Bundle savedInstanceState) {
@@ -28,7 +28,7 @@ public class MeetingActivity extends BaseActivity {
     }
 
     private void initView() {
-        listView = (ListView) findViewById(R.id.listview);
+        listView = (PullToRefreshListView) findViewById(R.id.listview);
         listView.setAdapter(new MesstingAdapter());
         listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
             @Override

+ 48 - 2
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/oa/WorkLogsActivity.java

@@ -1,28 +1,44 @@
 package com.xzjmyk.pm.activity.ui.erp.activity.oa;
 
 import android.os.Bundle;
+import android.view.LayoutInflater;
 import android.view.Menu;
 import android.view.MenuItem;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.BaseAdapter;
 
+import com.handmark.pulltorefresh.library.PullToRefreshListView;
 import com.xzjmyk.pm.activity.R;
 import com.xzjmyk.pm.activity.ui.base.BaseActivity;
 
+/**
+ * 工作日志
+ * by gongpm 16\07\05
+ */
 public class WorkLogsActivity extends BaseActivity {
 
+    private PullToRefreshListView listView;
+    private WorkLogsActivity ct;
+    private WorkLogsAdapter adapter;
+
     @Override
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
         setContentView(R.layout.activity_work_logs);
-
+        ct = this;
         init();
         initView();
     }
 
     private void initView() {
-
+        listView = (PullToRefreshListView) findViewById(R.id.listView);
+        listView.setAdapter(adapter);
     }
 
     private void init() {
+        adapter = new WorkLogsAdapter();
+
     }
 
     @Override
@@ -41,4 +57,34 @@ public class WorkLogsActivity extends BaseActivity {
         }
         return super.onOptionsItemSelected(item);
     }
+
+
+    class WorkLogsAdapter extends BaseAdapter {
+        @Override
+        public int getCount() {
+            return 10;
+        }
+
+        @Override
+        public Object getItem(int i) {
+            return null;
+        }
+
+        @Override
+        public long getItemId(int i) {
+            return i;
+        }
+
+        @Override
+        public View getView(int i, View view, ViewGroup viewGroup) {
+
+            if (view == null) {
+                view = LayoutInflater.from(ct).inflate(R.layout.item_activity_worklogs, null);
+            } else {
+
+            }
+
+            return view;
+        }
+    }
 }

+ 23 - 0
WeiChat/src/main/java/com/xzjmyk/pm/activity/view/CustomRatingBar.java

@@ -0,0 +1,23 @@
+package com.xzjmyk.pm.activity.view;
+
+import android.content.Context;
+import android.util.AttributeSet;
+import android.widget.RelativeLayout;
+
+/**
+ * Created by gongpm on 2016/7/6.
+ * 自定义的RatingBar星级控件
+ */
+public class CustomRatingBar extends RelativeLayout {
+
+    public CustomRatingBar(Context context, AttributeSet attrs) {
+        super(context, attrs);
+
+
+
+    }
+
+    public CustomRatingBar(Context context) {
+        this(context, null);
+    }
+}

BIN
WeiChat/src/main/res/drawable-hdpi/oa_client.png


+ 1 - 1
WeiChat/src/main/res/drawable/oa_signin_rl.xml

@@ -6,7 +6,7 @@
     <!-- 边框 -->
     <stroke
         android:width="0.5dp"
-        android:color="@android:color/black" />
+        android:color="@color/item_line" />
     <!-- 边距 -->
     <padding
         android:bottom="10dp"

+ 5 - 4
WeiChat/src/main/res/layout/activity_meeting.xml

@@ -5,11 +5,12 @@
     android:layout_height="match_parent"
     tools:context="com.xzjmyk.pm.activity.ui.erp.activity.oa.MeetingActivity">
 
-    <ListView
+    <com.handmark.pulltorefresh.library.PullToRefreshListView
         android:id="@+id/listview"
-        android:dividerHeight="2px"
-        android:divider="@color/item_line"
         android:layout_width="match_parent"
-        android:layout_height="match_parent" />
+        android:layout_height="match_parent"
+        android:layout_below="@+id/top"
+        android:layout_marginTop="10dp"
+        android:background="@color/item_color2" />
 
 </RelativeLayout>

+ 6 - 10
WeiChat/src/main/res/layout/activity_work_logs.xml

@@ -4,16 +4,12 @@
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     tools:context="com.xzjmyk.pm.activity.ui.erp.activity.oa.WorkLogsActivity">
-
-    <com.xzjmyk.pm.activity.view.SuperSwipeRefreshLayout
+    <com.handmark.pulltorefresh.library.PullToRefreshListView
+        android:id="@+id/listView"
         android:layout_width="match_parent"
-        android:layout_height="match_parent">
-
-        <android.support.v7.widget.RecyclerView
-            android:id="@+id/recycler"
-            android:layout_width="match_parent"
-            android:layout_height="match_parent" />
-
-    </com.xzjmyk.pm.activity.view.SuperSwipeRefreshLayout>
+        android:layout_height="match_parent"
+        android:layout_below="@+id/top"
+        android:layout_marginTop="10dp"
+        android:background="@color/item_color2" />
 
 </RelativeLayout>

+ 146 - 0
WeiChat/src/main/res/layout/item_activity_worklogs.xml

@@ -0,0 +1,146 @@
+<?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"
+    android:background="@color/item_color2"
+    android:orientation="vertical"
+    android:padding="10dp">
+
+    <ImageView
+        android:id="@+id/avatar_img"
+        android:layout_width="40dp"
+        android:layout_height="40dp"
+        android:background="@drawable/avatar_normal"
+        android:contentDescription="@string/app_name"
+        android:scaleType="fitXY" />
+
+    <TextView
+        android:id="@+id/name_tv"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginLeft="10dp"
+        android:layout_toRightOf="@+id/avatar_img"
+        android:text="周建伟"
+        android:textColor="@color/text_main"
+        android:textSize="@dimen/text_main" />
+
+    <TextView
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_alignLeft="@+id/name_tv"
+        android:layout_below="@+id/name_tv"
+        android:layout_marginTop="5dp"
+        android:text="1月12日 19:40"
+        android:textColor="@color/text_hine"
+        android:textSize="@dimen/text_hine" />
+
+    <RatingBar
+        android:id="@+id/ratingBar"
+        style="?android:attr/ratingBarStyleSmall"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_alignParentRight="true"
+        android:layout_gravity="center_horizontal"
+        android:focusable="true"
+        android:isIndicator="true"
+        android:numStars="5"
+        android:rating="0"
+        android:stepSize="1" />
+
+    <TextView
+        android:id="@+id/content_tv"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_below="@+id/avatar_img"
+        android:layout_marginTop="20dp"
+        android:minLines="3" />
+
+    <RelativeLayout
+        android:id="@+id/client_tag_rl"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_below="@+id/content_tv"
+        android:layout_marginTop="20dp"
+        android:background="@color/item_color1"
+        android:gravity="center_vertical"
+        android:padding="5dp">
+
+        <TextView
+            android:id="@+id/client_tag_tv"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:drawableLeft="@drawable/oa_client"
+            android:gravity="center_vertical"
+            android:text="关联客户(3):"
+            android:textColor="@color/text_hine"
+            android:textSize="@dimen/text_hine" />
+
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_alignTop="@+id/client_tag_tv"
+            android:layout_marginLeft="3dp"
+            android:layout_marginTop="3dp"
+            android:layout_toRightOf="@+id/client_tag_tv"
+            android:maxLines="1"
+            android:text="背景灌灌灌灌灌灌灌灌"
+            android:textColor="@color/text_hine"
+            android:textSize="@dimen/text_hine" />
+
+    </RelativeLayout>
+
+    <LinearLayout
+        android:id="@+id/comment_tag_ll"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_below="@+id/client_tag_rl"
+        android:layout_marginTop="20dp"
+        android:orientation="vertical">
+
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:drawableLeft="@drawable/oa_rb_pass"
+            android:gravity="center_vertical"
+            android:maxLines="1"
+            android:text="以下为直属领导的点评:"
+            android:textColor="@color/text_hine"
+            android:textSize="@dimen/text_hine" />
+
+        <com.xzjmyk.pm.activity.view.MyListView
+            android:id="@+id/comment_listview"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content" />
+    </LinearLayout>
+
+    <RelativeLayout
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_below="@+id/comment_tag_ll"
+        android:layout_centerHorizontal="true"
+        android:layout_marginTop="20dp"
+        android:background="@drawable/oa_signin_rl">
+
+        <TextView
+            android:id="@+id/like_tv"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="20dp"
+            android:layout_marginRight="20dp"
+            android:drawableLeft="@drawable/likes"
+            android:gravity="center"
+            android:padding="20dp"
+            android:text="1" />
+
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_gravity="center"
+            android:layout_marginLeft="20dp"
+            android:layout_marginRight="20dp"
+            android:layout_toRightOf="@id/like_tv"
+            android:drawableLeft="@drawable/operate_more"
+            android:padding="20dp"
+            android:text="1" />
+    </RelativeLayout>
+</RelativeLayout>