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

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

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

+ 1 - 3
app_core/common/src/main/java/com/common/config/VersionUtil.java

@@ -1,14 +1,12 @@
 package com.common.config;
 
-import com.core.utils.CommonUtil;
-
 /**
  * Created by Bitliker on 2017/9/14.
  */
 public class VersionUtil {
 
     public static boolean showUUHelper() {
-        return CommonUtil.isReleaseVersion();
+        return false;
     }
 
 }

+ 24 - 7
app_core/common/src/main/java/com/common/ui/ViewUtils.java

@@ -9,8 +9,6 @@ import android.view.View;
 import android.widget.LinearLayout;
 import android.widget.TextView;
 
-import com.common.LogUtil;
-
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
@@ -54,11 +52,30 @@ public class ViewUtils {
     }
 
 
-    public static void moveRecyclerView2Postion(RecyclerView recyclerView, int postion) {
-        LogUtil.i("postion="+postion);
-        if (recyclerView != null && recyclerView.getLayoutManager() != null && recyclerView.getLayoutManager() instanceof LinearLayoutManager) {
-            ((LinearLayoutManager) recyclerView.getLayoutManager()).scrollToPositionWithOffset(postion, -100);
-            ((LinearLayoutManager) recyclerView.getLayoutManager()).setStackFromEnd(true);
+    public static void move2PositionSmooth(LinearLayoutManager manager, RecyclerView mRecyclerView, int position) {
+        int firstItem = manager.findFirstVisibleItemPosition();
+        int lastItem = manager.findLastVisibleItemPosition();
+        if (position <= firstItem) {
+            mRecyclerView.smoothScrollToPosition(position);
+        } else if (position <= lastItem) {
+            int top = mRecyclerView.getChildAt(position - firstItem).getTop();
+            mRecyclerView.scrollBy(0, top);
+        } else {
+            mRecyclerView.smoothScrollToPosition(position);
+        }
+    }
+
+    public static void move2Position(LinearLayoutManager manager, RecyclerView mRecyclerView, int position) {
+        if (position < 0) return;
+        int firstItem = manager.findFirstVisibleItemPosition();
+        int lastItem = manager.findLastVisibleItemPosition();
+        if (position <= firstItem) {
+            mRecyclerView.scrollToPosition(position);
+        } else if (position <= lastItem) {
+            int top = mRecyclerView.getChildAt(position - firstItem).getTop();
+            mRecyclerView.scrollBy(0, top);
+        } else {
+            mRecyclerView.scrollToPosition(position);
         }
     }
 }

+ 2 - 0
app_core/common/src/main/java/com/core/app/Constants.java

@@ -285,6 +285,8 @@ public class Constants {
             + "," + DatabaseTables.UUHelperTable.Cols.LINK_URL
             + "," + DatabaseTables.UUHelperTable.Cols.CONTENT
             + "," + DatabaseTables.UUHelperTable.Cols.READED
+            + "," + DatabaseTables.UUHelperTable.Cols.TITLE
+            + "," + DatabaseTables.UUHelperTable.Cols.TYPE
             + ")";
 
 

+ 13 - 2
app_core/common/src/main/java/com/core/dao/UUHelperDao.java

@@ -53,6 +53,8 @@ public class UUHelperDao extends Dao<UUHelperModel> {
         values.put(DatabaseTables.UUHelperTable.Cols.CONTENT, model.getContent());
         values.put(DatabaseTables.UUHelperTable.Cols.READED, model.isReaded());
         values.put(DatabaseTables.UUHelperTable.Cols.DATE, model.getDate());
+        values.put(DatabaseTables.UUHelperTable.Cols.TITLE, model.getTitle());
+        values.put(DatabaseTables.UUHelperTable.Cols.TYPE, model.getType());
         return values;
     }
 
@@ -65,8 +67,17 @@ public class UUHelperDao extends Dao<UUHelperModel> {
         String linkUrl = c.getString(c.getColumnIndex(DatabaseTables.UUHelperTable.Cols.LINK_URL));
         String content = c.getString(c.getColumnIndex(DatabaseTables.UUHelperTable.Cols.CONTENT));
         String date = c.getString(c.getColumnIndex(DatabaseTables.UUHelperTable.Cols.DATE));
+        String title = c.getString(c.getColumnIndex(DatabaseTables.UUHelperTable.Cols.TITLE));
+        int type = c.getInt(c.getColumnIndex(DatabaseTables.UUHelperTable.Cols.TYPE));
         boolean readed = c.getInt(c.getColumnIndex(DatabaseTables.UUHelperTable.Cols.READED)) > 0;
-        return new UUHelperModel(readed, _id, timeSend, imageUrl, iconUrl, linkUrl, content, date);
+        return new UUHelperModel(timeSend, date, type)
+                .setId(_id)
+                .setIconUrl(iconUrl)
+                .setImageUrl(imageUrl)
+                .setLinkUrl(linkUrl)
+                .setContent(content)
+                .setTitle(title)
+                .setReaded(readed);
     }
 
 
@@ -92,7 +103,7 @@ public class UUHelperDao extends Dao<UUHelperModel> {
     public boolean updateRead(int id) {
         long i = 0;
         try {
-            String where = DatabaseTables.UUHelperTable.Cols.ID+" =?";
+            String where = DatabaseTables.UUHelperTable.Cols.ID + " =?";
             String[] whereArgs = {String.valueOf(id)};
             SQLiteDatabase db = DatabaseManager.getInstance().openDatabase();
             ContentValues values = new ContentValues();

+ 2 - 0
app_core/common/src/main/java/com/core/db/DatabaseTables.java

@@ -28,6 +28,8 @@ public class DatabaseTables {
             public static final String LINK_URL = "linkUrl";
             public static final String CONTENT = "content";
             public static final String READED = "readed";
+            public static final String TITLE = "title";
+            public static final String TYPE = "type";
         }
     }
 }

+ 82 - 45
app_core/common/src/main/java/com/core/model/UUHelperModel.java

@@ -1,9 +1,12 @@
 package com.core.model;
 
+import android.support.annotation.IntDef;
+
 import com.common.data.DateFormatUtil;
 import com.common.data.JSONUtil;
-import com.common.data.StringUtil;
 
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
 import java.util.HashMap;
 import java.util.Map;
 
@@ -12,30 +15,29 @@ import java.util.Map;
  */
 
 public class UUHelperModel {
+    public static final int ARTICLE_SINGLE = 1, ARTICLE_MERGE = 2;
 
-    private boolean isTag;
     private int id;
+    private int type;
     private long timeSend;//发送时间
     private String date;//发送日期(通过timeSend)
+
+    private String title;
+    private String content;//显示内容
     private String imageUrl;//图片网址
     private String linkUrl;//链接网址
     private String iconUrl;//小图片网址
-    private String content;//显示内容
     private boolean readed;
 
 
-
-
-
-
-
     @Override
     public String toString() {
         Map<String, Object> map = new HashMap<>();
-        map.put("isTag", isTag);
         map.put("_id", id);
-        map.put("timeSend", timeSend);
+        map.put("type", type);
+        map.put("title", title);
         map.put("date", date);
+        map.put("timeSend", timeSend);
         map.put("imageUrl", imageUrl);
         map.put("linkUrl", linkUrl);
         map.put("iconUrl", iconUrl);
@@ -43,37 +45,67 @@ public class UUHelperModel {
         return JSONUtil.map2JSON(map);
     }
 
-    public UUHelperModel(String date) {
-        this.isTag = true;
+
+    /*通过数据源获取到数据封装成类*/
+    public UUHelperModel(long timeSend) {
+        this(timeSend, DateFormatUtil.long2Str(timeSend, DateFormatUtil.YMD_HMS), ARTICLE_SINGLE);
+    }
+
+    /*数据库获取到的数据封装成类*/
+    public UUHelperModel(long timeSend, String date, int type) {
+        this.timeSend = timeSend;
         this.date = date;
+        this.type = type;
     }
 
-    public UUHelperModel(long timeSend,
-                         String imageUrl,
-                         String iconUrl,
-                         String linkUrl,
-                         String content) {
-        this(false, 0, timeSend, imageUrl, iconUrl, linkUrl, content, null);
+
+    public UUHelperModel setId(int id) {
+        this.id = id;
+        return this;
     }
 
-    public UUHelperModel(boolean readed, int _id, long timeSend,
-                         String imageUrl,
-                         String iconUrl,
-                         String linkUrl,
-                         String content
-            , String date) {
-        this.readed = readed;
-        this.id = _id;
-        this.timeSend = timeSend;
+    public UUHelperModel setType(@Duration int type) {
+        this.type = type;
+        return this;
+    }
+
+    public UUHelperModel setTitle(String title) {
+        this.title = title;
+        return this;
+    }
+
+    public UUHelperModel setContent(String content) {
+        this.content = content;
+        return this;
+    }
+
+    public UUHelperModel setImageUrl(String imageUrl) {
         this.imageUrl = imageUrl;
-        this.iconUrl = iconUrl;
+        return this;
+    }
+
+    public UUHelperModel setLinkUrl(String linkUrl) {
         this.linkUrl = linkUrl;
-        this.content = content;
-        if (StringUtil.isEmpty(date)) {
-            this.date = DateFormatUtil.long2Str(this.timeSend, DateFormatUtil.YMD);
-        } else {
-            this.date = date;
-        }
+        return this;
+    }
+
+    public UUHelperModel setIconUrl(String iconUrl) {
+        this.iconUrl = iconUrl;
+        return this;
+    }
+
+    public UUHelperModel setReaded(boolean readed) {
+        this.readed = readed;
+        return this;
+    }
+
+
+    public int getId() {
+        return id;
+    }
+
+    public int getType() {
+        return type;
     }
 
     public long getTimeSend() {
@@ -81,34 +113,39 @@ public class UUHelperModel {
     }
 
     public String getDate() {
-        return date;
+        return date == null ? "未知" : date;
     }
 
-    public String getImageUrl() {
-        return imageUrl == null ? iconUrl : imageUrl;
+    public String getTitle() {
+        return title == null ? "" : title;
     }
 
-    public String getIconUrl() {
-        return iconUrl == null ? imageUrl : iconUrl;
+    public String getContent() {
+        return content == null ? "" : content;
+    }
+
+    public String getImageUrl() {
+        return imageUrl;
     }
 
     public String getLinkUrl() {
         return linkUrl;
     }
 
-    public String getContent() {
-        return content;
+    public String getIconUrl() {
+        return iconUrl;
     }
 
     public boolean isReaded() {
         return readed;
     }
 
-    public int getId() {
-        return id;
+    public boolean isTag() {
+        return false;
     }
 
-    public boolean isTag() {
-        return isTag;
+    @IntDef({ARTICLE_SINGLE, ARTICLE_MERGE})
+    @Retention(RetentionPolicy.SOURCE)
+    public @interface Duration {
     }
 }

+ 12 - 5
app_core/common/src/main/java/com/core/xmpp/XChatManager.java

@@ -145,7 +145,7 @@ public class XChatManager {
             }
             String fromUserId = StringUtils.parseName(message.getFrom());
             String messageBody = message.getBody();
-            if (VersionUtil.showUUHelper() && !StringUtils.isEmpty(messageBody) && fromUserId != null && fromUserId.equals("10000")) {
+            if (!StringUtils.isEmpty(messageBody) && fromUserId != null && fromUserId.equals("10000")) {
                 saveUUHelperMessage(messageBody);
             } else {
                 saveSingleMessage(message, false);//将消息保存到本地
@@ -281,13 +281,16 @@ public class XChatManager {
         }
     }
 
+    /*UU 助手的数据源*/
     private void saveUUHelperMessage(String messageBody) {
+        if (!VersionUtil.showUUHelper()) return;
         JSONObject object = JSON.parseObject(messageBody);
         long timeSend = JSONUtil.getLong(object, "timeSend");
-        String content = JSONUtil.getText(object, "content");
+        String content = JSONUtil.getText(object, "content", "title");
         String imageUrl = JSONUtil.getText(object, "imageUrl");
         String linkUrl = JSONUtil.getText(object, "linkUrl");
         String iconUrl = JSONUtil.getText(object, "iconUrl");
+        String title = JSONUtil.getText(object, "title", "content");
         if (timeSend > 0) {
             timeSend *= 1000;
         }
@@ -295,14 +298,18 @@ public class XChatManager {
         if (!StringUtils.isEmpty(linkUrl) && user != null) {
             linkUrl += "?userid=" + user.getUserId() + "&username=" + user.getNickName() + "&iconurl=" + AvatarHelper.getInstance().getAvatarUrl(user.getUserId(), true);
         }
-        UUHelperModel model = new UUHelperModel(timeSend, imageUrl, iconUrl, linkUrl, content);
+        UUHelperModel model = new UUHelperModel(timeSend)
+                .setContent(content)
+                .setTitle(title)
+                .setIconUrl(iconUrl)
+                .setLinkUrl(linkUrl)
+                .setImageUrl(imageUrl);
         UUHelperDao.getInstance().saveData(model);
-        NotificationManage.sendUUHelperNotif(content);
+        NotificationManage.sendUUHelperNotif(title);
     }
 
     private void saveMucMessage(String messageBody, String packetId) {
         JSONObject jObject = JSON.parseObject(messageBody);
-        System.out.println(messageBody.toString() + "========================");
         int type = 0;
         String objectId = null;
         String content = null;

+ 5 - 48
app_modular/appmessages/src/main/java/com/modular/appmessages/activity/UUHelperActivity.java

@@ -13,22 +13,18 @@ import android.view.Menu;
 import android.view.MenuItem;
 import android.view.View;
 
-import com.common.LogUtil;
 import com.common.data.ListUtils;
-import com.common.thread.ThreadUtil;
 import com.common.ui.ViewUtils;
 import com.core.app.AppConstant;
 import com.core.app.Constants;
 import com.core.base.BaseActivity;
 import com.core.dao.UUHelperDao;
 import com.core.model.UUHelperModel;
-import com.core.net.http.http.OAHttpHelper;
 import com.core.utils.CommonUtil;
 import com.core.utils.IntentUtils;
 import com.modular.appmessages.R;
 import com.modular.appmessages.adapter.UUHelperAdapter;
 
-import java.util.ArrayList;
 import java.util.List;
 
 public class UUHelperActivity extends BaseActivity implements View.OnClickListener {
@@ -42,6 +38,7 @@ public class UUHelperActivity extends BaseActivity implements View.OnClickListen
             initData();
         }
     };
+    private LinearLayoutManager manager;
 
     @Override
     public boolean onCreateOptionsMenu(Menu menu) {
@@ -76,8 +73,8 @@ public class UUHelperActivity extends BaseActivity implements View.OnClickListen
     private void initView() {
         contentRV = (RecyclerView) findViewById(R.id.contentRV);
         contentRV.setItemAnimator(new DefaultItemAnimator());
-        LinearLayoutManager linearLayoutManager = new LinearLayoutManager(ct);
-        contentRV.setLayoutManager(linearLayoutManager);
+        manager = new LinearLayoutManager(ct);
+        contentRV.setLayoutManager(manager);
         findViewById(R.id.successfulTV).setOnClickListener(this);
         findViewById(R.id.experienceTV).setOnClickListener(this);
         findViewById(R.id.serviceTV).setOnClickListener(this);
@@ -86,28 +83,7 @@ public class UUHelperActivity extends BaseActivity implements View.OnClickListen
 
     private void initData() {
         List<UUHelperModel> models = UUHelperDao.getInstance().getAllModels();
-        for (UUHelperModel e : models) {
-            LogUtil.i(e.toString());
-            LogUtil.i("__________________________");
-        }
-        List<UUHelperModel> showModels = new ArrayList<>();
-        if (!ListUtils.isEmpty(models)) {
-            String dateChche = null;
-            for (int i = 0; i < models.size(); i++) {
-                UUHelperModel model = models.get(i);
-                if (dateChche == null) {
-                    dateChche = model.getDate();
-                    showModels.add(new UUHelperModel(dateChche));
-
-                }
-                if (!dateChche.equals(model.getDate())) {
-                    dateChche = model.getDate();
-                    showModels.add(new UUHelperModel(dateChche));
-                }
-                showModels.add(model);
-            }
-        }
-        showModel(showModels);
+        showModel(models);
     }
 
     private void showModel(final List<UUHelperModel> models) {
@@ -118,26 +94,7 @@ public class UUHelperActivity extends BaseActivity implements View.OnClickListen
             mAdapter.setModels(models);
             mAdapter.notifyDataSetChanged();
         }
-        if (ListUtils.getSize(models) > 5) {
-            ThreadUtil.getInstance().addTask(new Runnable() {
-                @Override
-                public void run() {
-                    int lastPostion = -1;
-                    for (int i = 0; i < models.size(); i++) {
-                        if (models.get(i).isTag()) {
-                            lastPostion = i;
-                        }
-                    }
-                    final int postion = lastPostion;
-                    OAHttpHelper.getInstance().post(new Runnable() {
-                        @Override
-                        public void run() {
-                            ViewUtils.moveRecyclerView2Postion(contentRV, postion);
-                        }
-                    });
-                }
-            });
-        }
+        ViewUtils.move2Position(manager, contentRV, ListUtils.getSize(models) - 1);
     }
 
 

+ 44 - 8
app_modular/appmessages/src/main/java/com/modular/appmessages/adapter/UUHelperAdapter.java

@@ -74,24 +74,42 @@ public class UUHelperAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolde
 
     @Override
     public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
-        boolean isTag = models.get(viewType).isTag();
-        if (isTag) {
-            return new TimeHolder(parent);
-        } else {
-            return new ViewHolder(parent);
-        }
+        models.get(viewType).getType();
+        return new SingleHolder(parent);
     }
 
     @Override
     public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {
         UUHelperModel model = models.get(position);
-        if (holder instanceof TimeHolder) {
+        if (holder instanceof SingleHolder) {
+            bindSingleHolder((SingleHolder) holder, model, position);
+        } else if (holder instanceof TimeHolder) {
             ((TimeHolder) holder).timeTV.setText(model.getDate());
         } else if (holder instanceof ViewHolder) {
             bindViewHolder((ViewHolder) holder, model, position);
         }
     }
 
+    private void bindSingleHolder(SingleHolder holder, final UUHelperModel model, final int position) {
+        holder.timeTV.setText(model.getDate());
+        holder.titleTV.setText(model.getTitle());
+        holder.contentTV.setText(model.getContent());
+        ImageLoader.getInstance().displayImage(model.getIconUrl(), holder.imageIV);
+        holder.itemView.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                onItemClick(model);
+            }
+        });
+        holder.itemView.setOnLongClickListener(new View.OnLongClickListener() {
+            @Override
+            public boolean onLongClick(View v) {
+                onLongItemClick(model, position);
+                return false;
+            }
+        });
+    }
+
     private void bindViewHolder(ViewHolder holder, final UUHelperModel model, final int position) {
         if (position > 0) {
             if (models.get(position - 1).isTag()) {//上一个是时间
@@ -161,6 +179,24 @@ public class UUHelperAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolde
         }
     }
 
+
+    class SingleHolder extends RecyclerView.ViewHolder {
+        TextView contentTV, titleTV, timeTV;
+        ImageView imageIV;
+
+        public SingleHolder(ViewGroup parent) {
+            this(getViewByLayout(R.layout.item_uuhelper_single, parent));
+        }
+
+        public SingleHolder(View itemView) {
+            super(itemView);
+            imageIV = (ImageView) itemView.findViewById(R.id.imageIV);
+            titleTV = (TextView) itemView.findViewById(R.id.titleTV);
+            contentTV = (TextView) itemView.findViewById(R.id.contentTV);
+            timeTV = (TextView) itemView.findViewById(R.id.timeTV);
+        }
+    }
+
     private View getViewByLayout(int layout, ViewGroup parent) {
         if (inflater == null) {
             inflater = LayoutInflater.from(ct);
@@ -171,7 +207,7 @@ public class UUHelperAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolde
     private void onItemClick(UUHelperModel model) {
         UUHelperDao.getInstance().updateRead(model.getId());
         String url = model.getLinkUrl();
-        IntentUtils.linkCommonWeb(ct, url, "UU 助手",model.getImageUrl(),model.getContent());
+        IntentUtils.linkCommonWeb(ct, url, "UU 助手", model.getImageUrl(), model.getContent());
     }
 
     private void onLongItemClick(final UUHelperModel model, final int position) {

+ 84 - 0
app_modular/appmessages/src/main/res/layout/item_uuhelper_single.xml

@@ -0,0 +1,84 @@
+<?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="wrap_content"
+    android:layout_marginLeft="20dp"
+    android:layout_marginRight="20dp">
+
+    <TextView
+        android:id="@+id/timeTV"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_centerHorizontal="true"
+        android:layout_marginBottom="8dp"
+        android:layout_marginTop="10dp"
+        android:background="@drawable/text_hint_bg"
+        android:text="2017-11-11"
+        android:textColor="@color/white"
+        android:textSize="@dimen/text_main" />
+
+    <RelativeLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_below="@id/timeTV"
+        android:background="@color/white"
+        android:paddingLeft="10dp"
+        android:paddingRight="10dp">
+
+        <TextView
+            android:id="@+id/titleTV"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:ellipsize="end"
+            android:lines="1"
+            android:paddingBottom="5dp"
+            android:paddingTop="5dp"
+            android:text="titleTV"
+            android:textColor="@color/text_main"
+            android:textSize="@dimen/text_main" />
+
+        <ImageView
+            android:id="@+id/imageIV"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_below="@id/titleTV"
+            android:maxHeight="140dp"
+            android:minHeight="100dp"
+            android:scaleType="fitXY" />
+
+        <TextView
+            android:id="@+id/contentTV"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_below="@id/imageIV"
+            android:ellipsize="end"
+            android:maxLines="3"
+            android:paddingBottom="5dp"
+            android:paddingTop="5dp"
+            android:text="contentTV"
+            android:textColor="@color/text_hine"
+            android:textSize="@dimen/text_hine" />
+
+        <View
+            android:id="@+id/line"
+            android:layout_width="match_parent"
+            android:layout_height="2px"
+            android:layout_below="@id/contentTV"
+            android:background="@color/item_line" />
+
+        <TextView
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:ellipsize="end"
+            android:lines="1"
+            android:paddingBottom="8dp"
+            android:paddingTop="8dp"
+            android:text="阅读全文"
+            android:layout_below="@+id/line"
+            android:drawableRight="@drawable/oa_next"
+            android:textColor="@color/text_main"
+            android:textSize="@dimen/text_main" />
+    </RelativeLayout>
+
+
+</RelativeLayout>

+ 2 - 2
app_modular/appworks/src/main/java/com/uas/appworks/OA/erp/activity/MissionActivity.java

@@ -145,7 +145,7 @@ public class MissionActivity extends OABaseActivity implements View.OnClickListe
         } else {
             if (flag == 1) {
                 //启动手动外勤
-                Intent intent = new Intent("com,modualr.appworks.OutofficeActivity");
+                Intent intent = new Intent("com.modualr.appworks.OutofficeActivity");
                 intent.putExtra(AppConfig.IS_ADMIN, true);//上传管理员状态
                 startActivity(intent);
                 finish();
@@ -328,7 +328,7 @@ public class MissionActivity extends OABaseActivity implements View.OnClickListe
             if (!isAuto && !(ApiUtils.getApiModel() instanceof ApiPlatform)) {
                 if (flag == 1) {
                     //启动手动外勤
-                    Intent intent = new Intent("com,modualr.appworks.OutofficeActivity");
+                    Intent intent = new Intent("com.modualr.appworks.OutofficeActivity");
                     intent.putExtra(AppConfig.IS_ADMIN, true);
                     startActivity(intent);
                     finish();