-
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.
[feat] #139 Modify Project & Modify View My Info API
- Loading branch information
Showing
43 changed files
with
640 additions
and
404 deletions.
There are no files selected for viewing
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
@@ -1,13 +1,16 @@ | ||
package com.example.infraandroid.myinfo | ||
|
||
import android.content.Intent | ||
import android.net.Uri | ||
import android.os.Bundle | ||
import android.view.LayoutInflater | ||
import android.view.View | ||
import android.view.ViewGroup | ||
import android.widget.Toast | ||
import androidx.fragment.app.Fragment | ||
import androidx.navigation.findNavController | ||
import androidx.navigation.fragment.findNavController | ||
import com.bumptech.glide.Glide | ||
import com.example.infraandroid.util.InfraApplication | ||
import com.example.infraandroid.R | ||
import com.example.infraandroid.databinding.FragmentMyInfoBinding | ||
|
@@ -34,6 +37,15 @@ class MyInfoFragment : Fragment() { | |
|
||
mBinding = binding | ||
mBinding?.myInfoUserNameTv?.text = getString(R.string.my_info_name).format(InfraApplication.prefs.getString("userNickName","null")) | ||
|
||
mBinding?.myInfoUserProfileIv?.let { | ||
Glide.with(requireActivity()) | ||
.load(InfraApplication.prefs.getString("userProfileImg", "null")) | ||
.circleCrop() | ||
.error(R.drawable.user_photo) | ||
.into(it) | ||
} | ||
|
||
return mBinding?.root | ||
} | ||
|
||
|
@@ -75,6 +87,17 @@ class MyInfoFragment : Fragment() { | |
val intent = Intent(this.context, OssLicensesMenuActivity::class.java) | ||
startActivity(intent) | ||
} | ||
|
||
mBinding!!.csLinearLayout.setOnClickListener { | ||
Toast.makeText(requireActivity(), "인프라 고객센터 이메일\n" + | ||
"[email protected]", Toast.LENGTH_LONG).show() | ||
} | ||
|
||
mBinding!!.serviceLinearLayout.setOnClickListener { | ||
val intent = Intent(Intent.ACTION_VIEW, Uri.parse("https://chrome-fortnight-803.notion.site/41f70ebd4eed4b40928815e7e1796466")) | ||
startActivity(intent) | ||
} | ||
|
||
} | ||
|
||
override fun onDestroyView() { | ||
|
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
19 changes: 11 additions & 8 deletions
19
app/src/main/java/com/example/infraandroid/myinfo/myinfomodify/model/MyInfoService.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,22 +1,25 @@ | ||
package com.example.infraandroid.myinfo.myinfomodify.model | ||
|
||
import okhttp3.MultipartBody | ||
import okhttp3.RequestBody | ||
import retrofit2.Call | ||
import retrofit2.http.Header | ||
import retrofit2.http.PATCH | ||
import retrofit2.http.Path | ||
import retrofit2.http.* | ||
|
||
interface MyInfoService { | ||
@PATCH("/user/profile/info/{id}") | ||
@GET("/user/profile/info/{id}") | ||
fun viewMyInfo( | ||
@Header("X-ACCESS-TOKEN") jwt: String, | ||
@Path("id") userId : String | ||
): Call<ResponseViewMyInfoData> | ||
|
||
@Multipart | ||
@PATCH("/user/profile/info/{id}") | ||
fun ModifyMyInfo( | ||
fun modifyMyInfo( | ||
@Header("X-ACCESS-TOKEN") jwt: String, | ||
@Path("id") userId : String | ||
): Call<RequestModifyMyInfoData> | ||
|
||
@Path("id") userId : String, | ||
@Part("user_nickname") userNickName : RequestBody, | ||
@Part("user_prPhoto") userProfileStatus : RequestBody, | ||
@Part images: MultipartBody.Part? | ||
): Call<ResponseModifyMyInfoData> | ||
|
||
} |
2 changes: 1 addition & 1 deletion
2
...fomodify/model/RequestModifyMyInfoData.kt → ...omodify/model/ResponseModifyMyInfoData.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
Oops, something went wrong.