|
|
@@ -30,7 +30,6 @@ import com.xzjmyk.pm.activity.ui.erp.view.EmptyLayout;
|
|
|
import com.xzjmyk.pm.activity.util.DisplayUtil;
|
|
|
import com.xzjmyk.pm.activity.util.SharedUtil;
|
|
|
import com.xzjmyk.pm.activity.view.crouton.Crouton;
|
|
|
-import com.xzjmyk.pm.activity.view.crouton.Style;
|
|
|
|
|
|
import org.json.JSONArray;
|
|
|
import org.json.JSONException;
|
|
|
@@ -111,8 +110,15 @@ public class SubscriptionAllFragment extends BaseFragment {
|
|
|
mPullToRefreshListView.setOnRefreshListener(new PullToRefreshBase.OnRefreshListener2<ListView>() {
|
|
|
@Override
|
|
|
public void onPullDownToRefresh(PullToRefreshBase<ListView> refreshView) {
|
|
|
- mAllSubscriptonKindMessages.clear();
|
|
|
- sendAllSubscriptionRequest();
|
|
|
+ if (CommonUtil.isNetWorkConnected(getActivity().getApplicationContext())){
|
|
|
+ mAllSubscriptonKindMessages.clear();
|
|
|
+ sendAllSubscriptionRequest();
|
|
|
+ }else {
|
|
|
+ if (mPullToRefreshListView.isRefreshing()){
|
|
|
+ mPullToRefreshListView.onRefreshComplete(500);
|
|
|
+ }
|
|
|
+ Crouton.makeText(getActivity(), "网络未连接", 0xffff4444, 1500).show();
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
@@ -146,7 +152,7 @@ public class SubscriptionAllFragment extends BaseFragment {
|
|
|
public boolean onItemLongClick(AdapterView<?> parent, View view, final int position, long id) {
|
|
|
View popView = View.inflate(getActivity(), R.layout.pop_subs_delete, null);
|
|
|
TextView deleteTv = (TextView) popView.findViewById(R.id.pop_subs_delete_tv);
|
|
|
- deleteTv.setText("删除该订阅号");
|
|
|
+ deleteTv.setText("隐藏该订阅号");
|
|
|
deleteTv.setOnClickListener(new View.OnClickListener() {
|
|
|
@Override
|
|
|
public void onClick(View v) {
|
|
|
@@ -218,7 +224,7 @@ public class SubscriptionAllFragment extends BaseFragment {
|
|
|
public boolean onItemLongClick(AdapterView<?> parent, View view, final int position, long id) {
|
|
|
View popView = View.inflate(getActivity(), R.layout.pop_subs_delete, null);
|
|
|
TextView deleteTv = (TextView) popView.findViewById(R.id.pop_subs_delete_tv);
|
|
|
- deleteTv.setText("删除该订阅类");
|
|
|
+ deleteTv.setText("隐藏该订阅类");
|
|
|
deleteTv.setOnClickListener(new View.OnClickListener() {
|
|
|
@Override
|
|
|
public void onClick(View v) {
|
|
|
@@ -492,7 +498,7 @@ public class SubscriptionAllFragment extends BaseFragment {
|
|
|
break;
|
|
|
case Constants.APP_SOCKETIMEOUTEXCEPTION:
|
|
|
progressDialog.dismiss();
|
|
|
- Crouton.makeText(getActivity(), msg.getData().getString("result"), Style.ALERT).show();
|
|
|
+ Crouton.makeText(getActivity(), msg.getData().getString("result"), 0xffff4444, 1500).show();
|
|
|
if (mPullToRefreshListView.isRefreshing()){
|
|
|
mPullToRefreshListView.onRefreshComplete();
|
|
|
}
|