diff --git a/app/src/main/java/org/ntlab/radishforandroidstudio/cactusClient/views/LoginFragment.java b/app/src/main/java/org/ntlab/radishforandroidstudio/cactusClient/views/LoginFragment.java index 8a6bb3f..ed3b19d 100644 --- a/app/src/main/java/org/ntlab/radishforandroidstudio/cactusClient/views/LoginFragment.java +++ b/app/src/main/java/org/ntlab/radishforandroidstudio/cactusClient/views/LoginFragment.java @@ -14,9 +14,11 @@ import android.widget.Toast; import org.ntlab.radishforandroidstudio.R; +import org.ntlab.radishforandroidstudio.cactusClient.models.URIAddressedEntity; +import org.ntlab.radishforandroidstudio.framework.network.CallBack; public class LoginFragment extends Fragment { -// private URIAddressedEntity connection; + private URIAddressedEntity connection; @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, @@ -69,22 +71,22 @@ -// if (userName.getText().toString().isEmpty()) { -// Toast.makeText(getActivity(), "値が未記入です", Toast.LENGTH_SHORT).show(); -// } else { -// -// connection = new URIAddressedEntity(); -// -// connection.setCallBack(new CallBack() { -// @Override -// public void onResponse(String response) { -// //通信した時の処理を書くのだ -// } -// -// }); -// connection.addFormParam("userName", userName.getText().toString()); -// connection.doPost(); -// } + if (userName.getText().toString().isEmpty()) { + Toast.makeText(getActivity(), "値が未記入です", Toast.LENGTH_SHORT).show(); + } else { + + connection = new URIAddressedEntity(); + + connection.setCallBack(new CallBack() { + @Override + public void onResponse(String response) { + //通信した時の処理を書くのだ + } + + }); + connection.addFormParam("userName", userName.getText().toString()); + connection.doPost(); + }