예제 #1
0
  private void changeVisibility() {

    scrollView.setVisibility(View.VISIBLE);

    if (selectAddressChild.getVisibility() == View.GONE) {
      selectAddress.setCompoundDrawablesWithIntrinsicBounds(R.drawable.icon_minus, 0, 0, 0);
      if (addNewAddressChild.getVisibility() == View.GONE) {

        expand(selectAddressChild);
      } else {

        expand(selectAddressChild);
        selectAddress.setCompoundDrawablesWithIntrinsicBounds(R.drawable.icon_plus, 0, 0, 0);
        //
        // addNewAddressChild.setCompoundDrawablesWithIntrinsicBounds(R.drawable.icon_plus,0,0,0);
        collapse(addNewAddressChild);
      }

    } // if it is visible then execute the else part and collapse it
    else {
      selectAddress.setCompoundDrawablesWithIntrinsicBounds(R.drawable.icon_plus, 0, 0, 0);
      collapse(selectAddressChild);
    }
  }
예제 #2
0
  private void setViews() {

    selectAddressChild.setVisibility(View.GONE);
    selectAddress.setCompoundDrawablesWithIntrinsicBounds(R.drawable.icon_plus, 0, 0, 0);
    addNewAddress.setCompoundDrawablesWithIntrinsicBounds(R.drawable.icon_plus, 0, 0, 0);
  }