Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //XML
- <EditText
- android:id="@+id/profileEditAbout"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:autofillHints="@string/about_me"
- android:background="@drawable/shape_edit_text"
- android:minHeight="300dp"
- android:hint="@string/about_me"
- android:gravity="start|top"
- android:padding="8dp"
- android:inputType="textAutoCorrect|textMultiLine|textCapSentences"/>
- //RETROFIT FUN
- @POST("upd_prof.php")
- @Multipart
- fun updateProfile(
- @Part("user_id") userId: Int,
- @Part("about")about: String?,
- @Part image: MultipartBody.Part?
- ) : Call<Void>
- //CODE
- val aboutText = view?.profileEditAbout?.text?.toString()
- AppMain.retrofitApi.updateProfile(
- userId,
- aboutText,
- null
- ).enqueue(someCallback)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement