diff --git a/android/RunUsAndroid/app/src/main/java/com/example/runusandroid/ui/multi_mode/MultiModeFragment.java b/android/RunUsAndroid/app/src/main/java/com/example/runusandroid/ui/multi_mode/MultiModeFragment.java index 0174469f..f8f10a4a 100644 --- a/android/RunUsAndroid/app/src/main/java/com/example/runusandroid/ui/multi_mode/MultiModeFragment.java +++ b/android/RunUsAndroid/app/src/main/java/com/example/runusandroid/ui/multi_mode/MultiModeFragment.java @@ -36,6 +36,7 @@ import java.util.List; import android.widget.EditText; +import android.widget.ImageButton; import android.widget.NumberPicker; import android.widget.TimePicker; @@ -59,7 +60,7 @@ private void showModal(Context context) { dialog.requestWindowFeature(Window.FEATURE_NO_TITLE); dialog.setContentView(R.layout.create_room_modal_layout); dialog.setCanceledOnTouchOutside(true); - + ImageButton closeButton = dialog.findViewById(R.id.buttonClose); EditText groupNameEditText = dialog.findViewById(R.id.editTextGroupName); EditText distanceEditText = dialog.findViewById(R.id.editTextDistance); //EditText timeEditText = dialog.findViewById(R.id.editTextTime); @@ -111,6 +112,14 @@ public void onClick(View v) { } }); + closeButton.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + // ImageButton을 클릭하면 모달 레이아웃의 가시성을 변경 + dialog.dismiss(); + } + }); + dialog.show(); } diff --git a/android/RunUsAndroid/app/src/main/res/drawable/ic_close.png b/android/RunUsAndroid/app/src/main/res/drawable/ic_close.png new file mode 100644 index 00000000..aaeeacbd Binary files /dev/null and b/android/RunUsAndroid/app/src/main/res/drawable/ic_close.png differ diff --git a/android/RunUsAndroid/app/src/main/res/layout/create_room_modal_layout.xml b/android/RunUsAndroid/app/src/main/res/layout/create_room_modal_layout.xml index b8986658..181ffad2 100644 --- a/android/RunUsAndroid/app/src/main/res/layout/create_room_modal_layout.xml +++ b/android/RunUsAndroid/app/src/main/res/layout/create_room_modal_layout.xml @@ -3,18 +3,30 @@ android:layout_width="match_parent" android:layout_height="match_parent"> - + + @@ -23,12 +35,15 @@ android:id="@+id/editTextDistance" android:layout_width="match_parent" android:layout_height="wrap_content" + android:layout_below="@id/editTextGroupName" android:hint="거리 (Km)" android:inputType="numberDecimal" /> @@ -36,19 +51,24 @@ android:id="@+id/timePicker" android:layout_width="match_parent" android:layout_height="wrap_content" + android:layout_below="@id/editStartTime" android:timePickerMode="spinner"/> @@ -82,6 +102,7 @@ android:id="@+id/editTextMembers" android:layout_width="match_parent" android:layout_height="wrap_content" + android:layout_below="@id/durationPicker" android:hint="인원 (명)" android:inputType="number" /> @@ -91,6 +112,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginBottom="20dp" + android:layout_below="@id/editTextMembers" android:hint="태그" android:inputType="text" /> @@ -100,8 +122,9 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:backgroundTint="#4AA570" + android:layout_below="@id/editTextTag" android:text="완료" /> - +