|
@@ -1,7 +1,11 @@
|
|
|
package com.cooleshow.student.ui.mine;
|
|
|
|
|
|
+import android.media.Image;
|
|
|
import android.os.Bundle;
|
|
|
+import android.view.LayoutInflater;
|
|
|
import android.view.View;
|
|
|
+import android.widget.ImageView;
|
|
|
+import android.widget.TextView;
|
|
|
|
|
|
import androidx.annotation.Nullable;
|
|
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
|
@@ -11,6 +15,7 @@ import com.alibaba.android.arouter.facade.annotation.Route;
|
|
|
import com.alibaba.android.arouter.launcher.ARouter;
|
|
|
import com.cooleshow.base.router.RouterPath;
|
|
|
import com.cooleshow.base.ui.activity.BaseMVPActivity;
|
|
|
+import com.cooleshow.base.widgets.EmptyViewLayout;
|
|
|
import com.cooleshow.student.R;
|
|
|
import com.cooleshow.student.adapter.AddressListAdapter;
|
|
|
import com.cooleshow.student.bean.AddressBean;
|
|
@@ -39,11 +44,12 @@ public class AddressListActivity extends BaseMVPActivity<ActivityAddressListBind
|
|
|
switch (view.getId()) {
|
|
|
case R.id.tv_add:
|
|
|
ARouter.getInstance().build(RouterPath.MineCenter.MINE_EDIT_ADDRESS)
|
|
|
- .withBoolean("isAdd",true)
|
|
|
+ .withBoolean("isAdd", true)
|
|
|
.navigation();
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
@Override
|
|
|
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
|
|
super.onCreate(savedInstanceState);
|
|
@@ -60,9 +66,16 @@ public class AddressListActivity extends BaseMVPActivity<ActivityAddressListBind
|
|
|
LinearLayoutManager manager = new LinearLayoutManager(this);
|
|
|
rvAddress.setLayoutManager(manager);
|
|
|
addressListAdapter = new AddressListAdapter(dataList);
|
|
|
+ setEmptyView();
|
|
|
rvAddress.setAdapter(addressListAdapter);
|
|
|
}
|
|
|
|
|
|
+ private void setEmptyView() {
|
|
|
+ EmptyViewLayout emptyView = new EmptyViewLayout(this);
|
|
|
+ emptyView.setContent(com.cooleshow.base.R.drawable.icon_empty_content,"暂无数据");
|
|
|
+ addressListAdapter.setEmptyView(emptyView);
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
protected void onResume() {
|
|
|
super.onResume();
|