示例#1
0
  private void syncRadioButton(RadioGroup group, int checkedId) {
    int index = group.indexOfChild(group.findViewById(checkedId));

    if (shadow_user_info_tab.getVisibility() == View.VISIBLE) {
      shadow_uliv_user_info.setCurrentItem(index);

      ((RadioButton) rg_user_info.findViewById(checkedId)).setChecked(true);
      uliv_user_info.setCurrentItemWithoutAnim(index);
    } else {
      uliv_user_info.setCurrentItem(index);

      ((RadioButton) shadow_rg_user_info.findViewById(checkedId)).setChecked(true);
      shadow_uliv_user_info.setCurrentItemWithoutAnim(index);
    }
  }