lundi 28 décembre 2015

checkbox not visible when value is not null

i want to set visibility Check-box when server return value is not null but check-box is not visible

this is my code

    JSONObject json_Response = new JSONObject(response);
      String _RchAmount = json_Response.getString("pay_from_wallet");
      String _Remainbalance = json_Response.getString("ewalletbalance");
      String _InrPay =json_Response.getString("amt_collected");
          if(_Remainbalance==null)
             {
              _CheckBox.setVisibility(View.VISIBLE);
              confirm_payWallet.setText("Pay from  eWallet Rs. " + _RchAmount);
              confirm_payWallet.setVisibility(View.VISIBLE);
              confirm_TotalWallet.setText("Your current eWallet balance is Rs." + _Remainbalance);
              confirm_TotalWallet.setVisibility(View.VISIBLE);
            }

Myxml

 <CheckBox
    android:layout_width="40dp"
    android:layout_height="wrap_content"
    android:layout_marginLeft="10dp"
    android:id="@+id/check_wallet"
    android:textColorHint="@color/MediumVioletRed"
    android:layout_alignTop="@+id/pay_textView"
    android:visibility="invisible"
    />
<TextView
    android:layout_width="match_parent"
    android:layout_height="30dp"
    android:layout_below="@+id/main_layout"
    android:layout_marginTop="11dp"
    android:layout_toRightOf="@+id/check_wallet"
    android:layout_marginRight="50dp"
    android:textColor="@color/Black"
    android:textStyle="bold"
    android:text=""
    android:gravity="center_vertical"
    android:id="@+id/pay_textView"
    android:visibility="invisible"
    />
<TextView
    android:layout_width="match_parent"
    android:layout_height="25dp"
    android:layout_below="@+id/pay_textView"
    android:layout_marginLeft="50dp"
    android:textStyle="bold"
    android:layout_marginRight="7dp"
    android:text=""
    android:id="@+id/status_wallet"
    android:visibility="invisible"
    />

i dont know where i am doing mistake Please help me




Aucun commentaire:

Enregistrer un commentaire