-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #102 from INFRAcp/seungmin
[feat] #101 Change View
- Loading branch information
Showing
30 changed files
with
1,018 additions
and
404 deletions.
There are no files selected for viewing
12 changes: 0 additions & 12 deletions
12
app/src/main/java/com/example/infraandroid/category/model/ApplyProjectService.kt
This file was deleted.
Oops, something went wrong.
11 changes: 7 additions & 4 deletions
11
...category/model/LookUpAllProjectService.kt → ...aandroid/category/model/ProjectService.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,17 @@ | ||
package com.example.infraandroid.category.model | ||
|
||
import retrofit2.Call | ||
import retrofit2.http.GET | ||
import retrofit2.http.Header | ||
import retrofit2.http.Query | ||
import retrofit2.http.* | ||
|
||
interface LookUpAllProjectService { | ||
interface ProjectService { | ||
@GET("/project/inquiry?") | ||
fun getLookUpAllProject( | ||
@Header("X-ACCESS-TOKEN") jwt: String, | ||
@Query("user_id") user_id : String | ||
): Call<ResponseLookUpAllProjectData> | ||
|
||
@POST("/project/apply") | ||
fun postApplyProject( | ||
@Body body : RequestApplyProjectData | ||
): Call<ResponseApplyProjectData> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
app/src/main/java/com/example/infraandroid/myinfo/myideamanage/view/WarningDeleteDialog.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
package com.example.infraandroid.myinfo.myideamanage.view | ||
|
||
import android.content.res.Resources | ||
import android.graphics.Rect | ||
import android.os.Bundle | ||
import android.view.LayoutInflater | ||
import android.view.View | ||
import android.view.ViewGroup | ||
import androidx.fragment.app.DialogFragment | ||
import com.example.infraandroid.R | ||
import com.example.infraandroid.databinding.MyInfoMyProjectDeleteWarningBinding | ||
|
||
class WarningDeleteDialog: DialogFragment() { | ||
private var mBinding : MyInfoMyProjectDeleteWarningBinding? = null | ||
|
||
override fun onCreateView( | ||
inflater: LayoutInflater, | ||
container: ViewGroup?, | ||
savedInstanceState: Bundle? | ||
): View? { | ||
val binding = MyInfoMyProjectDeleteWarningBinding.inflate(inflater, container, false) | ||
mBinding = binding | ||
|
||
return mBinding?.root | ||
} | ||
|
||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { | ||
super.onViewCreated(view, savedInstanceState) | ||
|
||
mBinding?.warningOkayButton?.setOnClickListener { | ||
// 삭제 버튼 눌렀을 때 | ||
} | ||
|
||
mBinding?.warningCancelButton?.setOnClickListener { | ||
dismiss() | ||
} | ||
} | ||
|
||
override fun onActivityCreated(savedInstanceState: Bundle?) { | ||
super.onActivityCreated(savedInstanceState) | ||
|
||
setWidthPercent(90) | ||
} | ||
|
||
fun DialogFragment.setWidthPercent(percentage: Int) { | ||
val percent = percentage.toFloat() / 100 | ||
val dm = Resources.getSystem().displayMetrics | ||
val rect = dm.run { Rect(0, 0, widthPixels, heightPixels) } | ||
val percentWidth = rect.width() * percent | ||
dialog?.window?.setLayout(percentWidth.toInt(), ViewGroup.LayoutParams.WRAP_CONTENT) | ||
dialog?.window?.setBackgroundDrawableResource(R.drawable.warning_background) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
...le/infraandroid/myinfo/myideamanage/view/fragment/MyProjectMoreMenuBottomSheetFragment.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
package com.example.infraandroid.myinfo.myideamanage.view.fragment | ||
|
||
import android.annotation.SuppressLint | ||
import android.app.Dialog | ||
import android.content.DialogInterface | ||
import android.os.Bundle | ||
import android.util.Log | ||
import android.view.LayoutInflater | ||
import android.view.View | ||
import android.view.ViewGroup | ||
import androidx.navigation.findNavController | ||
import androidx.navigation.fragment.NavHostFragment.findNavController | ||
import androidx.navigation.fragment.findNavController | ||
import com.example.infraandroid.R | ||
import com.example.infraandroid.databinding.MyProjectMoreMenuBinding | ||
import com.example.infraandroid.id.viewmodel.SignUpViewModel.Companion.TAG | ||
import com.example.infraandroid.myinfo.myideamanage.view.WarningDeleteDialog | ||
import com.google.android.material.bottomsheet.BottomSheetDialogFragment | ||
|
||
class MyProjectMoreMenuBottomSheetFragment : BottomSheetDialogFragment() { | ||
private var mBinding : MyProjectMoreMenuBinding? = null | ||
|
||
override fun onCreateView( | ||
inflater: LayoutInflater, | ||
container: ViewGroup?, | ||
savedInstanceState: Bundle? | ||
): View? { | ||
val binding = MyProjectMoreMenuBinding.inflate(inflater, container, false) | ||
mBinding = binding | ||
|
||
return mBinding?.root | ||
} | ||
|
||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { | ||
super.onViewCreated(view, savedInstanceState) | ||
|
||
val warningDeleteDialog = WarningDeleteDialog() | ||
|
||
mBinding?.editProjectConstraintLayout?.setOnClickListener { | ||
dismiss() | ||
findNavController().navigate(R.id.action_myInfoTeamIdeaFragment_to_myInfoProjectModifyFragment) | ||
} | ||
mBinding?.deleteProjectConstraintLayout?.setOnClickListener { | ||
dismiss() | ||
activity?.supportFragmentManager?.let { it1 -> warningDeleteDialog.show(it1, warningDeleteDialog.tag) } | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="17dp" | ||
android:height="17dp" | ||
android:viewportWidth="17" | ||
android:viewportHeight="17"> | ||
<path | ||
android:pathData="M2.5,13.3382H6.0333C6.143,13.3388 6.2517,13.3178 6.3533,13.2763C6.4548,13.2348 6.5471,13.1737 6.625,13.0965L12.3917,7.3215L14.7583,5.0048C14.8364,4.9274 14.8984,4.8352 14.9407,4.7337C14.9831,4.6321 15.0048,4.5232 15.0048,4.4132C15.0048,4.3032 14.9831,4.1942 14.9407,4.0927C14.8984,3.9911 14.8364,3.899 14.7583,3.8215L11.225,0.2465C11.1475,0.1684 11.0554,0.1064 10.9538,0.0641C10.8523,0.0218 10.7433,0 10.6333,0C10.5233,0 10.4144,0.0218 10.3129,0.0641C10.2113,0.1064 10.1191,0.1684 10.0417,0.2465L7.6917,2.6048L1.9083,8.3798C1.8311,8.4577 1.77,8.55 1.7285,8.6516C1.687,8.7531 1.666,8.8618 1.6667,8.9715V12.5048C1.6667,12.7258 1.7545,12.9378 1.9107,13.0941C2.067,13.2504 2.279,13.3382 2.5,13.3382ZM10.6333,2.0132L12.9917,4.3715L11.8083,5.5548L9.45,3.1965L10.6333,2.0132ZM3.3333,9.3132L8.275,4.3715L10.6333,6.7298L5.6917,11.6715H3.3333V9.3132ZM15.8333,15.0048H0.8333C0.6123,15.0048 0.4004,15.0926 0.2441,15.2489C0.0878,15.4052 0,15.6172 0,15.8382C0,16.0592 0.0878,16.2711 0.2441,16.4274C0.4004,16.5837 0.6123,16.6715 0.8333,16.6715H15.8333C16.0543,16.6715 16.2663,16.5837 16.4226,16.4274C16.5789,16.2711 16.6667,16.0592 16.6667,15.8382C16.6667,15.6172 16.5789,15.4052 16.4226,15.2489C16.2663,15.0926 16.0543,15.0048 15.8333,15.0048Z" | ||
android:fillColor="#666666"/> | ||
</vector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="10dp" | ||
android:height="10dp" | ||
android:viewportWidth="10" | ||
android:viewportHeight="10"> | ||
<path | ||
android:pathData="M0.8074,0.8075C0.8655,0.7493 0.9344,0.7031 1.0103,0.6716C1.0863,0.6401 1.1677,0.6239 1.2499,0.6239C1.3321,0.6239 1.4135,0.6401 1.4894,0.6716C1.5654,0.7031 1.6343,0.7493 1.6924,0.8075L4.9999,4.1163L8.3074,0.8075C8.3655,0.7494 8.4345,0.7033 8.5104,0.6719C8.5863,0.6404 8.6677,0.6242 8.7499,0.6242C8.8321,0.6242 8.9135,0.6404 8.9894,0.6719C9.0653,0.7033 9.1343,0.7494 9.1924,0.8075C9.2505,0.8656 9.2966,0.9346 9.328,1.0105C9.3595,1.0865 9.3757,1.1678 9.3757,1.25C9.3757,1.3322 9.3595,1.4136 9.328,1.4895C9.2966,1.5654 9.2505,1.6344 9.1924,1.6925L5.8836,5L9.1924,8.3075C9.2505,8.3656 9.2966,8.4346 9.328,8.5105C9.3595,8.5865 9.3757,8.6678 9.3757,8.75C9.3757,8.8322 9.3595,8.9136 9.328,8.9895C9.2966,9.0654 9.2505,9.1344 9.1924,9.1925C9.1343,9.2506 9.0653,9.2967 8.9894,9.3282C8.9135,9.3596 8.8321,9.3758 8.7499,9.3758C8.6677,9.3758 8.5863,9.3596 8.5104,9.3282C8.4345,9.2967 8.3655,9.2506 8.3074,9.1925L4.9999,5.8838L1.6924,9.1925C1.6343,9.2506 1.5653,9.2967 1.4894,9.3282C1.4135,9.3596 1.3321,9.3758 1.2499,9.3758C1.1677,9.3758 1.0863,9.3596 1.0104,9.3282C0.9345,9.2967 0.8655,9.2506 0.8074,9.1925C0.7493,9.1344 0.7032,9.0654 0.6717,8.9895C0.6403,8.9136 0.6241,8.8322 0.6241,8.75C0.6241,8.6678 0.6403,8.5865 0.6717,8.5105C0.7032,8.4346 0.7493,8.3656 0.8074,8.3075L4.1161,5L0.8074,1.6925C0.7492,1.6345 0.703,1.5655 0.6715,1.4896C0.64,1.4136 0.6238,1.3322 0.6238,1.25C0.6238,1.1678 0.64,1.0864 0.6715,1.0105C0.703,0.9345 0.7492,0.8656 0.8074,0.8075Z" | ||
android:fillColor="#4B8EFF"/> | ||
</vector> |
Oops, something went wrong.