Explorar el Código

1.岗位列表 更换无数据提示 (全职 兼职 高薪 福利 入职 面试 收藏 投递)

zhangxinyu hace 5 años
padre
commit
f7da188354

+ 4 - 0
app/src/main/java/com/tongyu/luck/happywork/ui/activity/cclient/job/InterviewInvitationListActivity.java

@@ -4,6 +4,7 @@ import android.os.Bundle;
 import android.support.annotation.NonNull;
 import android.view.View;
 import android.widget.AbsListView;
+import android.widget.LinearLayout;
 import android.widget.ListView;
 
 import com.scwang.smartrefresh.layout.api.RefreshLayout;
@@ -29,6 +30,8 @@ public class InterviewInvitationListActivity extends BaseActivity<InterviewInvit
     ListView ivJob;
     @BindView(R.id.prl_refresh)
     ProgressRefreshLayout prlRefresh;
+    @BindView(R.id.ll_empty)
+    LinearLayout llEmpty;
 
     private FooterViewHolder mFooterHolder;
     private InterviewListAdapter mAdapter;
@@ -58,6 +61,7 @@ public class InterviewInvitationListActivity extends BaseActivity<InterviewInvit
             mAdapter = new InterviewListAdapter(mContext, mData);
             ivJob.setAdapter(mAdapter);
             ivJob.setOnItemClickListener(mAdapter);
+            ivJob.setEmptyView(llEmpty);
             ivJob.addFooterView(mFooterHolder.getView());
             ivJob.setOnScrollListener(onScrollListener);
         } else {

+ 4 - 1
app/src/main/java/com/tongyu/luck/happywork/ui/activity/cclient/job/JobFavoriteListActivity.java

@@ -4,6 +4,7 @@ import android.os.Bundle;
 import android.support.annotation.NonNull;
 import android.view.View;
 import android.widget.AbsListView;
+import android.widget.LinearLayout;
 import android.widget.ListView;
 
 import com.scwang.smartrefresh.layout.api.RefreshLayout;
@@ -19,7 +20,6 @@ import com.tongyu.luck.happywork.ui.mvp.cclient.contacts.JobFavoriteListContacts
 import com.tongyu.luck.happywork.ui.mvp.cclient.presenter.JobFavoriteListPresenter;
 import com.tongyu.luck.happywork.ui.viewholder.cclient.FooterViewHolder;
 
-import org.greenrobot.eventbus.EventBus;
 import org.greenrobot.eventbus.Subscribe;
 
 import java.util.List;
@@ -34,6 +34,8 @@ public class JobFavoriteListActivity extends BaseActivity<JobFavoriteListPresent
     ListView ivJob;
     @BindView(R.id.prl_refresh)
     ProgressRefreshLayout prlRefresh;
+    @BindView(R.id.ll_empty)
+    LinearLayout llEmpty;
 
     private FooterViewHolder mFooterHolder;
     private JobListAdapter mAdapter;
@@ -64,6 +66,7 @@ public class JobFavoriteListActivity extends BaseActivity<JobFavoriteListPresent
             mAdapter.isCreateTime(true);
             ivJob.setAdapter(mAdapter);
             ivJob.setOnItemClickListener(mAdapter);
+            ivJob.setEmptyView(llEmpty);
             ivJob.addFooterView(mFooterHolder.getView());
             ivJob.setOnScrollListener(onScrollListener);
         } else {

+ 3 - 0
app/src/main/java/com/tongyu/luck/happywork/ui/activity/cclient/job/JobListActivity.java

@@ -67,6 +67,8 @@ public class JobListActivity extends BaseActivity<JobListPresenter> implements J
     ListView ivJob;
     @BindView(R.id.prl_refresh)
     ProgressRefreshLayout prlRefresh;
+    @BindView(R.id.ll_empty)
+    LinearLayout llEmpty;
     private FooterViewHolder mFooterHolder;
     private ClearTypePopWindow mTypePop;
     private JobAreaPopWindow mAreaPop;
@@ -127,6 +129,7 @@ public class JobListActivity extends BaseActivity<JobListPresenter> implements J
             mAdapter = new JobListAdapter(mContext, mData);
             ivJob.setAdapter(mAdapter);
             ivJob.setOnItemClickListener(mAdapter);
+            ivJob.setEmptyView(llEmpty);
             ivJob.addFooterView(mFooterHolder.getView());
             ivJob.setOnScrollListener(onScrollListener);
         } else {

+ 4 - 1
app/src/main/java/com/tongyu/luck/happywork/ui/activity/cclient/job/JobRequestListActivity.java

@@ -4,6 +4,7 @@ import android.os.Bundle;
 import android.support.annotation.NonNull;
 import android.view.View;
 import android.widget.AbsListView;
+import android.widget.LinearLayout;
 import android.widget.ListView;
 
 import com.scwang.smartrefresh.layout.api.RefreshLayout;
@@ -19,7 +20,6 @@ import com.tongyu.luck.happywork.ui.mvp.cclient.contacts.JobRequestListContacts;
 import com.tongyu.luck.happywork.ui.mvp.cclient.presenter.JobRequestListPresenter;
 import com.tongyu.luck.happywork.ui.viewholder.cclient.FooterViewHolder;
 
-import org.greenrobot.eventbus.EventBus;
 import org.greenrobot.eventbus.Subscribe;
 
 import java.util.List;
@@ -34,6 +34,8 @@ public class JobRequestListActivity extends BaseActivity<JobRequestListPresenter
     ListView ivJob;
     @BindView(R.id.prl_refresh)
     ProgressRefreshLayout prlRefresh;
+    @BindView(R.id.ll_empty)
+    LinearLayout llEmpty;
 
     private FooterViewHolder mFooterHolder;
     private JobListAdapter mAdapter;
@@ -64,6 +66,7 @@ public class JobRequestListActivity extends BaseActivity<JobRequestListPresenter
             mAdapter.isCreateTime(true);
             ivJob.setAdapter(mAdapter);
             ivJob.setOnItemClickListener(mAdapter);
+            ivJob.setEmptyView(llEmpty);
             ivJob.addFooterView(mFooterHolder.getView());
             ivJob.setOnScrollListener(onScrollListener);
         } else {

+ 15 - 5
app/src/main/res/layout/activity_job_favorite_list.xml

@@ -8,14 +8,24 @@
     <com.tongyu.luck.happywork.baselibrary.widget.refresh.ProgressRefreshLayout
         android:id="@+id/prl_refresh"
         android:layout_width="match_parent"
-        android:layout_height="match_parent">
+        android:layout_height="match_parent"
+        android:background="@color/gray_bg">
 
-        <ListView
-            android:id="@+id/iv_job"
+
+        <LinearLayout
             android:layout_width="match_parent"
             android:layout_height="match_parent"
-            android:divider="@null"
-            android:dividerHeight="0px" />
+            android:orientation="vertical">
+
+            <ListView
+                android:id="@+id/iv_job"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:divider="@null"
+                android:dividerHeight="0px" />
+
+            <include layout="@layout/view_empty_nothing" />
+        </LinearLayout>
     </com.tongyu.luck.happywork.baselibrary.widget.refresh.ProgressRefreshLayout>
 
 

+ 13 - 7
app/src/main/res/layout/activity_job_interview_list.xml

@@ -4,19 +4,25 @@
     android:layout_height="match_parent"
     android:orientation="vertical">
 
-
     <com.tongyu.luck.happywork.baselibrary.widget.refresh.ProgressRefreshLayout
         android:id="@+id/prl_refresh"
         android:layout_width="match_parent"
-        android:layout_height="match_parent">
+        android:layout_height="match_parent"
+        android:background="@color/gray_bg">
 
-        <ListView
-            android:id="@+id/iv_job"
+        <LinearLayout
             android:layout_width="match_parent"
             android:layout_height="match_parent"
-            android:divider="@null"
-            android:dividerHeight="0px" />
-    </com.tongyu.luck.happywork.baselibrary.widget.refresh.ProgressRefreshLayout>
+            android:orientation="vertical">
 
+            <ListView
+                android:id="@+id/iv_job"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:divider="@null"
+                android:dividerHeight="0px" />
 
+            <include layout="@layout/view_empty_nothing" />
+        </LinearLayout>
+    </com.tongyu.luck.happywork.baselibrary.widget.refresh.ProgressRefreshLayout>
 </LinearLayout>

+ 15 - 5
app/src/main/res/layout/activity_job_list.xml

@@ -123,14 +123,24 @@
     <com.tongyu.luck.happywork.baselibrary.widget.refresh.ProgressRefreshLayout
         android:id="@+id/prl_refresh"
         android:layout_width="match_parent"
-        android:layout_height="match_parent">
+        android:layout_height="match_parent"
+        android:background="@color/gray_bg">
 
-        <ListView
-            android:id="@+id/iv_job"
+        <LinearLayout
             android:layout_width="match_parent"
             android:layout_height="match_parent"
-            android:divider="@null"
-            android:dividerHeight="0px" />
+            android:orientation="vertical">
+
+            <ListView
+                android:id="@+id/iv_job"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:divider="@null"
+                android:dividerHeight="0px" />
+
+            <include layout="@layout/view_empty_nothing" />
+        </LinearLayout>
+
     </com.tongyu.luck.happywork.baselibrary.widget.refresh.ProgressRefreshLayout>
 
 </LinearLayout>

+ 15 - 5
app/src/main/res/layout/activity_job_request_list.xml

@@ -8,14 +8,24 @@
     <com.tongyu.luck.happywork.baselibrary.widget.refresh.ProgressRefreshLayout
         android:id="@+id/prl_refresh"
         android:layout_width="match_parent"
-        android:layout_height="match_parent">
+        android:layout_height="match_parent"
+        android:background="@color/gray_bg">
 
-        <ListView
-            android:id="@+id/iv_job"
+
+        <LinearLayout
             android:layout_width="match_parent"
             android:layout_height="match_parent"
-            android:divider="@null"
-            android:dividerHeight="0px" />
+            android:orientation="vertical">
+
+            <ListView
+                android:id="@+id/iv_job"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:divider="@null"
+                android:dividerHeight="0px" />
+
+            <include layout="@layout/view_empty_nothing" />
+        </LinearLayout>
     </com.tongyu.luck.happywork.baselibrary.widget.refresh.ProgressRefreshLayout>
 
 

+ 32 - 0
app/src/main/res/layout/view_empty_nothing.xml

@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/ll_empty"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:gravity="center"
+    android:orientation="vertical">
+
+    <View
+        android:layout_width="100dp"
+        android:layout_height="154dp"
+        android:background="@mipmap/ic_nothing" />
+
+    <TextView
+        android:layout_width="wrap_content"
+        android:layout_height="23dp"
+        android:layout_marginTop="28dp"
+        android:gravity="center"
+        android:text="呃哦……什么也没有"
+        android:textColor="@color/text_black_66"
+        android:textSize="@dimen/px48_16sp"
+        android:textStyle="bold" />
+
+    <TextView
+        android:layout_width="wrap_content"
+        android:layout_height="19dp"
+        android:layout_marginTop="8dp"
+        android:gravity="center"
+        android:text="记得常回来看看"
+        android:textColor="@color/text_gray_99"
+        android:textSize="@dimen/px39_13sp" />
+</LinearLayout>

BIN
app/src/main/res/mipmap-hdpi/ic_home_job5.png


BIN
app/src/main/res/mipmap-hdpi/ic_home_job6.png


BIN
app/src/main/res/mipmap-hdpi/ic_nothing.png


BIN
app/src/main/res/mipmap-xhdpi/ic_home_job5.png


BIN
app/src/main/res/mipmap-xhdpi/ic_home_job6.png


BIN
app/src/main/res/mipmap-xhdpi/ic_nothing.png


BIN
app/src/main/res/mipmap-xxhdpi/ic_home_job5.png


BIN
app/src/main/res/mipmap-xxhdpi/ic_home_job6.png


BIN
app/src/main/res/mipmap-xxhdpi/ic_nothing.png


BIN
app/src/main/res/mipmap-xxxhdpi/ic_home_job5.png


BIN
app/src/main/res/mipmap-xxxhdpi/ic_home_job6.png


BIN
app/src/main/res/mipmap-xxxhdpi/ic_nothing.png