|
|
@@ -4,22 +4,19 @@ import android.content.Intent;
|
|
|
import android.os.Handler;
|
|
|
import android.os.Message;
|
|
|
import android.util.Log;
|
|
|
-import android.util.TypedValue;
|
|
|
import android.view.Gravity;
|
|
|
import android.view.View;
|
|
|
import android.widget.AdapterView;
|
|
|
import android.widget.LinearLayout;
|
|
|
import android.widget.ListView;
|
|
|
import android.widget.PopupWindow;
|
|
|
-import android.widget.RadioButton;
|
|
|
-import android.widget.RadioGroup;
|
|
|
import android.widget.TextView;
|
|
|
-import android.widget.Toast;
|
|
|
|
|
|
import com.handmark.pulltorefresh.library.PullToRefreshBase;
|
|
|
import com.handmark.pulltorefresh.library.PullToRefreshListView;
|
|
|
import com.xzjmyk.pm.activity.R;
|
|
|
import com.xzjmyk.pm.activity.adapter.AllSubscriptionAdapter;
|
|
|
+import com.xzjmyk.pm.activity.adapter.SubsTypeAdapter;
|
|
|
import com.xzjmyk.pm.activity.bean.SubscriptionNumber;
|
|
|
import com.xzjmyk.pm.activity.bean.message.AllSubscriptonKindMessage;
|
|
|
import com.xzjmyk.pm.activity.ui.erp.activity.SubscribeDetailActivity;
|
|
|
@@ -48,13 +45,12 @@ import java.util.Map;
|
|
|
* 所有订阅
|
|
|
* Created by RaoMeng on 2016/9/5.
|
|
|
*/
|
|
|
-public class SubscriptionAllFragment extends BaseFragment implements RadioGroup.OnCheckedChangeListener {
|
|
|
+public class SubscriptionAllFragment extends BaseFragment{
|
|
|
private PullToRefreshListView mPullToRefreshListView;
|
|
|
private AllSubscriptionAdapter mAllSubscriptionAdapter;
|
|
|
private List<AllSubscriptonKindMessage> mAllSubscriptonKindMessages;
|
|
|
private List<SubscriptionNumber> mSubscriptionNumbers;
|
|
|
private EmptyLayout mEmptyLayout;
|
|
|
- private RadioGroup mRadioGroup;
|
|
|
private int rbPos = 0;
|
|
|
private List<String> keyStrings = new ArrayList<>();
|
|
|
private final static int SUBSCRIBE_DETAIL_REQUEST = 33;
|
|
|
@@ -63,6 +59,8 @@ public class SubscriptionAllFragment extends BaseFragment implements RadioGroup.
|
|
|
private DBManager mDbManager;
|
|
|
private PopupWindow mDeletePopupWindow;
|
|
|
|
|
|
+ private ListView mTypeListView;
|
|
|
+ private SubsTypeAdapter mSubsTypeAdapter;
|
|
|
@Override
|
|
|
protected int getLayout() {
|
|
|
return R.layout.fragment_all_subscription;
|
|
|
@@ -71,13 +69,14 @@ public class SubscriptionAllFragment extends BaseFragment implements RadioGroup.
|
|
|
@Override
|
|
|
protected void initViews() {
|
|
|
mDbManager = new DBManager(getActivity());
|
|
|
- mRadioGroup = (RadioGroup) root.findViewById(R.id.subscription_all_rg);
|
|
|
currentMaster = CommonUtil.getSharedPreferences(getActivity(), "erp_master");
|
|
|
mPullToRefreshListView = (PullToRefreshListView) root.findViewById(R.id.subscription_all_ptlv);
|
|
|
mSubscriptionNumbers = new ArrayList<>();
|
|
|
mAllSubscriptionAdapter = new AllSubscriptionAdapter(getActivity(), mSubscriptionNumbers);
|
|
|
mAllSubscriptonKindMessages = new ArrayList<>();
|
|
|
|
|
|
+ mTypeListView = (ListView) root.findViewById(R.id.subscription_all_type_lv);
|
|
|
+ mSubsTypeAdapter = new SubsTypeAdapter(getActivity(),keyStrings);
|
|
|
mEmptyLayout = new EmptyLayout(getActivity(), mPullToRefreshListView.getRefreshableView());
|
|
|
mEmptyLayout.setShowLoadingButton(false);
|
|
|
mEmptyLayout.setShowEmptyButton(false);
|
|
|
@@ -87,6 +86,7 @@ public class SubscriptionAllFragment extends BaseFragment implements RadioGroup.
|
|
|
|
|
|
@Override
|
|
|
protected void initEvents() {
|
|
|
+ mTypeListView.setAdapter(mSubsTypeAdapter);
|
|
|
mPullToRefreshListView.setAdapter(mAllSubscriptionAdapter);
|
|
|
mPullToRefreshListView.setMode(PullToRefreshBase.Mode.PULL_FROM_START);
|
|
|
mPullToRefreshListView.setOnRefreshListener(new PullToRefreshBase.OnRefreshListener2<ListView>() {
|
|
|
@@ -108,7 +108,6 @@ public class SubscriptionAllFragment extends BaseFragment implements RadioGroup.
|
|
|
}, 1000);
|
|
|
}
|
|
|
});
|
|
|
- mRadioGroup.setOnCheckedChangeListener(this);
|
|
|
mPullToRefreshListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
|
|
|
@Override
|
|
|
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
|
|
|
@@ -128,7 +127,7 @@ public class SubscriptionAllFragment extends BaseFragment implements RadioGroup.
|
|
|
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) {
|
|
|
@@ -139,12 +138,21 @@ public class SubscriptionAllFragment extends BaseFragment implements RadioGroup.
|
|
|
if (mSubscriptionNumbers.size() == 0) {
|
|
|
mAllSubscriptonKindMessages.remove(rbPos);
|
|
|
keyStrings.remove(rbPos);
|
|
|
+ initKeyStrings();
|
|
|
if (keyStrings.size() == 0) {
|
|
|
- mRadioGroup.setVisibility(View.GONE);
|
|
|
+ mSubsTypeAdapter.notifyDataSetChanged();
|
|
|
+ mTypeListView.setVisibility(View.GONE);
|
|
|
+ mEmptyLayout.showEmpty();
|
|
|
+ mSubscriptionNumbers.clear();
|
|
|
+ mAllSubscriptionAdapter.notifyDataSetChanged();
|
|
|
} else {
|
|
|
rbPos = 0;
|
|
|
- mRadioGroup.removeAllViews();
|
|
|
- initRadioGroup();
|
|
|
+ mTypeListView.setVisibility(View.VISIBLE);
|
|
|
+ mSubsTypeAdapter.notifyDataSetChanged();
|
|
|
+ mSubscriptionNumbers.clear();
|
|
|
+ mSubscriptionNumbers.addAll(mAllSubscriptonKindMessages.get(rbPos).getSubscriptionNumbers());
|
|
|
+ mAllSubscriptionAdapter.notifyDataSetChanged();
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
closeDeletePopupWindow();
|
|
|
@@ -166,35 +174,91 @@ public class SubscriptionAllFragment extends BaseFragment implements RadioGroup.
|
|
|
return true;
|
|
|
}
|
|
|
});
|
|
|
+
|
|
|
+ mTypeListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
|
|
|
+ @Override
|
|
|
+ public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
|
|
|
+ mSubsTypeAdapter.setSelectItem(position);
|
|
|
+ mSubsTypeAdapter.notifyDataSetChanged();
|
|
|
+ rbPos = position;
|
|
|
+
|
|
|
+ mSubscriptionNumbers.clear();
|
|
|
+ if (mAllSubscriptonKindMessages.get(rbPos).getSubscriptionNumbers().size() != 0) {
|
|
|
+ mSubscriptionNumbers.addAll(mAllSubscriptonKindMessages.get(rbPos).getSubscriptionNumbers());
|
|
|
+ mAllSubscriptionAdapter.notifyDataSetChanged();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ mTypeListView.setOnItemLongClickListener(new AdapterView.OnItemLongClickListener() {
|
|
|
+ @Override
|
|
|
+ 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.setOnClickListener(new View.OnClickListener() {
|
|
|
+ @Override
|
|
|
+ public void onClick(View v) {
|
|
|
+ mDbManager.deleteListFromAllSubs(mAllSubscriptonKindMessages.get(position).getSubscriptionNumbers());
|
|
|
+ mAllSubscriptonKindMessages.remove(position);
|
|
|
+ keyStrings.remove(position);
|
|
|
+ initKeyStrings();
|
|
|
+ if (keyStrings.size() == 0) {
|
|
|
+ mSubsTypeAdapter.notifyDataSetChanged();
|
|
|
+ mTypeListView.setVisibility(View.GONE);
|
|
|
+ mEmptyLayout.showEmpty();
|
|
|
+ mSubscriptionNumbers.clear();
|
|
|
+ mAllSubscriptionAdapter.notifyDataSetChanged();
|
|
|
+ } else {
|
|
|
+ rbPos = 0;
|
|
|
+ mTypeListView.setVisibility(View.VISIBLE);
|
|
|
+ mSubsTypeAdapter.notifyDataSetChanged();
|
|
|
+
|
|
|
+ mSubscriptionNumbers.clear();
|
|
|
+ mSubscriptionNumbers.addAll(mAllSubscriptonKindMessages.get(rbPos).getSubscriptionNumbers());
|
|
|
+ mAllSubscriptionAdapter.notifyDataSetChanged();
|
|
|
+ }
|
|
|
+ closeDeletePopupWindow();
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ mDeletePopupWindow = new PopupWindow(popView, LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT);
|
|
|
+ mDeletePopupWindow.setOutsideTouchable(true);
|
|
|
+ mDeletePopupWindow.setFocusable(true);
|
|
|
+ mDeletePopupWindow.showAtLocation(getActivity().getWindow().getDecorView(), Gravity.CENTER, 0, 0);
|
|
|
+ DisplayUtil.backgroundAlpha(getActivity(), 0.5f);
|
|
|
+ mDeletePopupWindow.setOnDismissListener(new PopupWindow.OnDismissListener() {
|
|
|
+ @Override
|
|
|
+ public void onDismiss() {
|
|
|
+ closeDeletePopupWindow();
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
- private void initRadioGroup() {
|
|
|
- StringBuilder keyStringBuilder = new StringBuilder();
|
|
|
- for (int i = 0; i < keyStrings.size(); i++) {
|
|
|
- keyStringBuilder.append("," + keyStrings.get(i));
|
|
|
- final RadioButton radioButton = new RadioButton(getActivity());
|
|
|
- radioButton.setButtonDrawable(null);
|
|
|
- radioButton.setGravity(Gravity.CENTER);
|
|
|
- radioButton.setTextSize(TypedValue.COMPLEX_UNIT_SP, 16);
|
|
|
- radioButton.setBackground(getResources().getDrawable(R.drawable.selector_subscribe_bg));
|
|
|
- radioButton.setText(keyStrings.get(i));
|
|
|
- radioButton.setTextColor(getResources().getColor(R.color.selector_subscribe_tv));
|
|
|
- radioButton.setPadding(0, 30, 0, 30);
|
|
|
- radioButton.setId(i);
|
|
|
-
|
|
|
- if (i == rbPos) {
|
|
|
-// radioButton.setTextColor(getResources().getColor(R.color.red));
|
|
|
- radioButton.setChecked(true);
|
|
|
- } else {
|
|
|
-// radioButton.setTextColor(getResources().getColor(R.color.black));
|
|
|
- radioButton.setChecked(false);
|
|
|
+ private void initKeyStrings() {
|
|
|
+ StringBuilder keyStringBuilder = null;
|
|
|
+ if (keyStrings.size() != 0){
|
|
|
+ keyStringBuilder = new StringBuilder();
|
|
|
+ for (int i = 0; i < keyStrings.size(); i++) {
|
|
|
+ keyStringBuilder.append("," + keyStrings.get(i));
|
|
|
+
|
|
|
+ if (i == rbPos) {
|
|
|
+ mSubsTypeAdapter.setSelectItem(i);
|
|
|
+ mSubsTypeAdapter.notifyDataSetChanged();
|
|
|
+ }
|
|
|
}
|
|
|
- mRadioGroup.addView(radioButton, LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT);
|
|
|
- }
|
|
|
- if (keyStringBuilder.length() > 2) {
|
|
|
- keyStringBuilder.delete(0, 1);
|
|
|
+ if (keyStringBuilder.length() > 2) {
|
|
|
+ keyStringBuilder.delete(0, 1);
|
|
|
+ }
|
|
|
+ SharedUtil.putString(currentMaster + "subs", keyStringBuilder.toString());
|
|
|
+ }else {
|
|
|
+ SharedUtil.putString(currentMaster + "subs", null);
|
|
|
}
|
|
|
- SharedUtil.putString(currentMaster + "subs", keyStringBuilder.toString());
|
|
|
+
|
|
|
}
|
|
|
|
|
|
private void closeDeletePopupWindow() {
|
|
|
@@ -209,7 +273,6 @@ public class SubscriptionAllFragment extends BaseFragment implements RadioGroup.
|
|
|
|
|
|
@Override
|
|
|
protected void initDatas() {
|
|
|
-// mAllSubscriptonKindMessages = (List<AllSubscriptonKindMessage>) MyApplication.getDataCacheFromMap("all_subs_cache");
|
|
|
Log.d("currentMaster: ", currentMaster);
|
|
|
String cacheKeys = SharedUtil.getString(currentMaster + "subs");
|
|
|
if (cacheKeys != null) {
|
|
|
@@ -219,43 +282,45 @@ public class SubscriptionAllFragment extends BaseFragment implements RadioGroup.
|
|
|
}
|
|
|
}
|
|
|
try {
|
|
|
-// List<SubscriptionNumber> dbSubscriptionNumbers = MyApplication.mDbUtils.findAll(SubscriptionNumber.class);
|
|
|
List<SubscriptionNumber> dbSubscriptionNumbers
|
|
|
= mDbManager.queryFromAllSubs(new String[]{currentMaster}, "subs_master=?");
|
|
|
if (dbSubscriptionNumbers == null) {
|
|
|
sendAllSubscriptionRequest();
|
|
|
- Toast.makeText(getActivity(), "网络加载", Toast.LENGTH_SHORT).show();
|
|
|
+// Toast.makeText(getActivity(), "网络加载", Toast.LENGTH_SHORT).show();
|
|
|
} else {
|
|
|
- Toast.makeText(getActivity(), "本地加载", Toast.LENGTH_SHORT).show();
|
|
|
- for (int i = 0; i < keyStrings.size(); i++) {
|
|
|
- AllSubscriptonKindMessage tempSubscriptonKindMessage = new AllSubscriptonKindMessage();
|
|
|
- List<SubscriptionNumber> tempSubscriptionNumbers = new ArrayList<>();
|
|
|
- String currentKey = keyStrings.get(i);
|
|
|
- for (int j = 0; j < dbSubscriptionNumbers.size(); j++) {
|
|
|
- SubscriptionNumber currentSubscriptionNumber = dbSubscriptionNumbers.get(j);
|
|
|
- if (currentSubscriptionNumber.getType().equals(currentKey)) {
|
|
|
- tempSubscriptionNumbers.add(currentSubscriptionNumber);
|
|
|
- }
|
|
|
- }
|
|
|
- tempSubscriptonKindMessage.setSubscriptionKind(currentKey);
|
|
|
- tempSubscriptonKindMessage.setSubscriptionNumbers(tempSubscriptionNumbers);
|
|
|
-
|
|
|
- mAllSubscriptonKindMessages.add(tempSubscriptonKindMessage);
|
|
|
- }
|
|
|
-
|
|
|
+// Toast.makeText(getActivity(), "本地加载", Toast.LENGTH_SHORT).show();
|
|
|
+ initKeyStrings();
|
|
|
if (keyStrings.size() == 0) {
|
|
|
- mRadioGroup.setVisibility(View.GONE);
|
|
|
+ mSubsTypeAdapter.notifyDataSetChanged();
|
|
|
+ mTypeListView.setVisibility(View.GONE);
|
|
|
mEmptyLayout.showEmpty();
|
|
|
+ mSubscriptionNumbers.clear();
|
|
|
+ mAllSubscriptionAdapter.notifyDataSetChanged();
|
|
|
} else {
|
|
|
- mRadioGroup.setVisibility(View.VISIBLE);
|
|
|
- initRadioGroup();
|
|
|
+ mTypeListView.setVisibility(View.VISIBLE);
|
|
|
+ mSubsTypeAdapter.notifyDataSetChanged();
|
|
|
+ for (int i = 0; i < keyStrings.size(); i++) {
|
|
|
+ AllSubscriptonKindMessage tempSubscriptonKindMessage = new AllSubscriptonKindMessage();
|
|
|
+ List<SubscriptionNumber> tempSubscriptionNumbers = new ArrayList<>();
|
|
|
+ String currentKey = keyStrings.get(i);
|
|
|
+ for (int j = 0; j < dbSubscriptionNumbers.size(); j++) {
|
|
|
+ SubscriptionNumber currentSubscriptionNumber = dbSubscriptionNumbers.get(j);
|
|
|
+ if (currentSubscriptionNumber.getType().equals(currentKey)) {
|
|
|
+ tempSubscriptionNumbers.add(currentSubscriptionNumber);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ tempSubscriptonKindMessage.setSubscriptionKind(currentKey);
|
|
|
+ tempSubscriptonKindMessage.setSubscriptionNumbers(tempSubscriptionNumbers);
|
|
|
+
|
|
|
+ mAllSubscriptonKindMessages.add(tempSubscriptonKindMessage);
|
|
|
+ }
|
|
|
+ mSubscriptionNumbers.clear();
|
|
|
+ mSubscriptionNumbers.addAll(mAllSubscriptonKindMessages.get(rbPos).getSubscriptionNumbers());
|
|
|
+ Log.d("allsubscription:", mSubscriptionNumbers.toString());
|
|
|
+ mAllSubscriptionAdapter.notifyDataSetChanged();
|
|
|
}
|
|
|
|
|
|
}
|
|
|
- mSubscriptionNumbers.clear();
|
|
|
- mSubscriptionNumbers.addAll(mAllSubscriptonKindMessages.get(rbPos).getSubscriptionNumbers());
|
|
|
- Log.d("allsubscription:", mSubscriptionNumbers.toString());
|
|
|
- mAllSubscriptionAdapter.notifyDataSetChanged();
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
@@ -282,12 +347,7 @@ public class SubscriptionAllFragment extends BaseFragment implements RadioGroup.
|
|
|
switch (msg.what) {
|
|
|
case GET_ALL_SUBSCRIPTION:
|
|
|
progressDialog.dismiss();
|
|
|
-// try {
|
|
|
-// MyApplication.mDbUtils.deleteAll(SubscriptionNumber.class);
|
|
|
-// } catch (DbException e) {
|
|
|
-// e.printStackTrace();
|
|
|
-// }
|
|
|
- mDbManager.deleteMasterSubs(currentMaster);
|
|
|
+ mDbManager.deleteMasterAllSubs(currentMaster);
|
|
|
String resultJson = msg.getData().getString("result");
|
|
|
Log.d("allsubscriptionResult: ", resultJson);
|
|
|
try {
|
|
|
@@ -302,12 +362,12 @@ public class SubscriptionAllFragment extends BaseFragment implements RadioGroup.
|
|
|
Crouton.makeText(getActivity(), "没有未订阅数据", 0xff99cc00, 1500).show();
|
|
|
}
|
|
|
keyStrings.clear();
|
|
|
- mRadioGroup.removeAllViews();
|
|
|
+ mSubsTypeAdapter.notifyDataSetChanged();
|
|
|
+ mTypeListView.setVisibility(View.GONE);
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
keyStrings.clear();
|
|
|
- mRadioGroup.removeAllViews();
|
|
|
while (iterator.hasNext()) {
|
|
|
String key = iterator.next().toString();
|
|
|
|
|
|
@@ -334,11 +394,8 @@ public class SubscriptionAllFragment extends BaseFragment implements RadioGroup.
|
|
|
if (subscriptionNumbers.size() != 0) {
|
|
|
keyStrings.add(key);
|
|
|
subscriptonKindMessage.setSubscriptionNumbers(subscriptionNumbers);
|
|
|
- /*try {
|
|
|
- MyApplication.mDbUtils.saveAll(subscriptionNumbers);
|
|
|
- } catch (DbException e) {
|
|
|
- e.printStackTrace();
|
|
|
- }*/
|
|
|
+
|
|
|
+ mSubsTypeAdapter.notifyDataSetChanged();
|
|
|
mDbManager.saveListToAllSubs(subscriptionNumbers);
|
|
|
mAllSubscriptonKindMessages.add(subscriptonKindMessage);
|
|
|
}
|
|
|
@@ -347,17 +404,20 @@ public class SubscriptionAllFragment extends BaseFragment implements RadioGroup.
|
|
|
} catch (JSONException e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
-
|
|
|
+ initKeyStrings();
|
|
|
if (keyStrings.size() == 0) {
|
|
|
- mRadioGroup.setVisibility(View.GONE);
|
|
|
+ mTypeListView.setVisibility(View.GONE);
|
|
|
+
|
|
|
+ mSubscriptionNumbers.clear();
|
|
|
+ mAllSubscriptionAdapter.notifyDataSetChanged();
|
|
|
} else {
|
|
|
- mRadioGroup.setVisibility(View.VISIBLE);
|
|
|
- initRadioGroup();
|
|
|
+ mTypeListView.setVisibility(View.VISIBLE);
|
|
|
+ mSubsTypeAdapter.notifyDataSetChanged();
|
|
|
+ mSubscriptionNumbers.clear();
|
|
|
+ mSubscriptionNumbers.addAll(mAllSubscriptonKindMessages.get(rbPos).getSubscriptionNumbers());
|
|
|
+ Log.d("allsubscription:", mSubscriptionNumbers.toString());
|
|
|
+ mAllSubscriptionAdapter.notifyDataSetChanged();
|
|
|
}
|
|
|
- mSubscriptionNumbers.clear();
|
|
|
- mSubscriptionNumbers.addAll(mAllSubscriptonKindMessages.get(rbPos).getSubscriptionNumbers());
|
|
|
- Log.d("allsubscription:", mSubscriptionNumbers.toString());
|
|
|
- mAllSubscriptionAdapter.notifyDataSetChanged();
|
|
|
|
|
|
if (mPullToRefreshListView.isRefreshing()) {
|
|
|
mPullToRefreshListView.onRefreshComplete();
|
|
|
@@ -372,25 +432,6 @@ public class SubscriptionAllFragment extends BaseFragment implements RadioGroup.
|
|
|
}
|
|
|
};
|
|
|
|
|
|
- @Override
|
|
|
- public void onCheckedChanged(RadioGroup group, int checkedId) {
|
|
|
- rbPos = checkedId;
|
|
|
-/*
|
|
|
- for (int i = 0; i < keyStrings.size(); i++) {
|
|
|
- RadioButton currentButton = (RadioButton) group.findViewById(i);
|
|
|
- if (i == checkedId){
|
|
|
- currentButton.setTextColor(getResources().getColor(R.color.red));
|
|
|
- }else {
|
|
|
- currentButton.setTextColor(getResources().getColor(R.color.black));
|
|
|
- }
|
|
|
- }*/
|
|
|
- mSubscriptionNumbers.clear();
|
|
|
- if (mAllSubscriptonKindMessages.get(rbPos).getSubscriptionNumbers().size() != 0) {
|
|
|
- mSubscriptionNumbers.addAll(mAllSubscriptonKindMessages.get(rbPos).getSubscriptionNumbers());
|
|
|
- mAllSubscriptionAdapter.notifyDataSetChanged();
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
@Override
|
|
|
public void onActivityResult(int requestCode, int resultCode, Intent data) {
|
|
|
if (requestCode == SUBSCRIBE_DETAIL_REQUEST && resultCode == 9 && data != null) {
|