Browse Source

10/20/2026

master
osman160128 7 days ago
parent
commit
71829bc4f2
  1. 12
      app/src/main/AndroidManifest.xml
  2. 0
      app/src/main/java/com/example/dattingapp/EditMyProfileActivty.kt
  3. 903
      app/src/main/java/com/example/dattingapp/FriendProfile.kt
  4. 90
      app/src/main/java/com/example/dattingapp/LikeANdMatchActivity.kt
  5. 108
      app/src/main/java/com/example/dattingapp/ShowPostingActivity.kt
  6. 1027
      app/src/main/java/com/example/dattingapp/homes/MyProfile.kt
  7. 22
      app/src/main/java/com/example/dattingapp/homes/networkandapi/HomeApiService.kt
  8. 197
      app/src/main/java/com/example/dattingapp/homes/networkandapi/HomeViewModelClass.kt
  9. 14
      app/src/main/java/com/example/dattingapp/homes/profile/UserResponseData.kt
  10. 11
      app/src/main/java/com/example/dattingapp/homes/profile/ui/theme/Color.kt
  11. 58
      app/src/main/java/com/example/dattingapp/homes/profile/ui/theme/Theme.kt
  12. 34
      app/src/main/java/com/example/dattingapp/homes/profile/ui/theme/Type.kt
  13. 2
      app/src/main/java/com/example/dattingapp/registration/AuthApiService.kt
  14. 2
      app/src/main/res/values/strings.xml

12
app/src/main/AndroidManifest.xml

@ -145,6 +145,18 @@
android:label="@string/title_activity_matches"
android:theme="@style/Theme.DattingAPP"
android:windowSoftInputMode="adjustResize" />
<activity
android:name=".homes.profile.EditProfileActivity"
android:exported="false"
android:label="@string/title_activity_edit_profile"
android:theme="@style/Theme.DattingAPP"
android:windowSoftInputMode="adjustResize" />
<activity
android:name=".EditProfileActivty"
android:exported="false"
android:label="@string/title_activity_edit_profile_activty"
android:theme="@style/Theme.DattingAPP"
android:windowSoftInputMode="adjustResize" />
</application>
</manifest>

0
app/src/main/java/com/example/dattingapp/EditMyProfileActivty.kt

903
app/src/main/java/com/example/dattingapp/FriendProfile.kt

File diff suppressed because it is too large

90
app/src/main/java/com/example/dattingapp/LikeANdMatchActivity.kt

@ -13,14 +13,16 @@ import androidx.compose.foundation.layout.*
import androidx.compose.foundation.lazy.grid.GridCells
import androidx.compose.foundation.lazy.grid.LazyVerticalGrid
import androidx.compose.foundation.lazy.grid.items
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.ArrowBack
import androidx.compose.material.icons.filled.Close
import androidx.compose.material.icons.filled.Favorite
import androidx.compose.material.icons.filled.LocationOn
import androidx.compose.material.icons.filled.Star
import androidx.compose.material3.*
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.collectAsState
import androidx.compose.runtime.getValue
import androidx.compose.runtime.remember
@ -35,6 +37,8 @@ import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.compose.LifecycleEventEffect
import androidx.lifecycle.viewmodel.compose.viewModel
import coil.compose.AsyncImage
import com.example.dattingapp.homes.networkandapi.LikedUiState
@ -62,7 +66,8 @@ class LikeANdMatchActivity : ComponentActivity() {
else -> likedViewModel.matchesUiState.collectAsState()
}
LaunchedEffect(Unit) {
// Runs on first open AND every time the user comes back to this screen
LifecycleEventEffect(Lifecycle.Event.ON_RESUME) {
likedViewModel.likedResponse(context, type)
}
@ -106,14 +111,19 @@ class LikeANdMatchActivity : ComponentActivity() {
is LikedUiState.Idle, is LikedUiState.Loading -> {
CircularProgressIndicator()
}
is LikedUiState.Success -> {
ProfileGrid(
context = context,
likedResponse = state.LikeData,
isLoading = false,
errorMessage = null
errorMessage = null,
onSwipe = { profile, direction ->
likedViewModel.swipeUser(context, type, profile.id, direction)
}
)
}
is LikedUiState.Error -> {
Column(
horizontalAlignment = Alignment.CenterHorizontally,
@ -144,6 +154,9 @@ fun ProfileCard(
likedProfile: LikedUserResponse,
modifier: Modifier = Modifier,
onNameClick: () -> Unit = {},
onCancel: (() -> Unit)? = null,
onSuperLike: (() -> Unit)? = null,
onLike: (() -> Unit)? = null
) {
Card(
shape = RoundedCornerShape(16.dp),
@ -165,7 +178,7 @@ fun ProfileCard(
onNameClick()
}
) {
// FIX: media can be null from the server, so use ?. here
// media can be null from the server, so use ?. here
AsyncImage(
model = likedProfile.profile_image_url?.takeIf { it.isNotBlank() }
?: likedProfile.media?.firstOrNull(),
@ -223,8 +236,6 @@ fun ProfileCard(
}
val nameAndAge = if (age != null) "$displayName, $age" else displayName
Log.d("user", "${likedProfile.id}")
Text(
text = nameAndAge,
color = Color.White,
@ -249,6 +260,57 @@ fun ProfileCard(
}
}
}
// Action buttons: Cancel (pass) / Super like / Like
if (onCancel != null && onSuperLike != null && onLike != null) {
Row(
modifier = Modifier
.fillMaxWidth()
.padding(start = 8.dp, end = 8.dp, bottom = 10.dp),
horizontalArrangement = Arrangement.SpaceEvenly,
verticalAlignment = Alignment.CenterVertically
) {
IconButton(
onClick = onCancel,
modifier = Modifier
.size(30.dp)
.clip(CircleShape)
.background(Color(0xFFEBEBEB))
) {
Icon(
Icons.Default.Close, "Pass",
tint = Color(0xFF555555),
modifier = Modifier.size(20.dp)
)
}
IconButton(
onClick = onSuperLike,
modifier = Modifier
.size(30.dp)
.clip(CircleShape)
.background(Color(0xFFEDE7F6))
) {
Icon(
Icons.Default.Star, "Super like",
tint = Color(0xFF7B1FA2),
modifier = Modifier.size(20.dp)
)
}
IconButton(
onClick = onLike,
modifier = Modifier
.size(30.dp)
.clip(CircleShape)
.background(Color(0xFFE91E63))
) {
Icon(
Icons.Default.Favorite, "Like",
tint = Color.White,
modifier = Modifier.size(20.dp)
)
}
}
}
}
}
}
@ -260,7 +322,8 @@ fun ProfileGrid(
isLoading: Boolean,
errorMessage: String?,
onRetry: () -> Unit = {},
modifier: Modifier = Modifier
modifier: Modifier = Modifier,
onSwipe: ((LikedUserResponse, String) -> Unit)? = null
) {
if (likedResponse.isEmpty() && !isLoading) {
Box(modifier = modifier.fillMaxSize(), contentAlignment = Alignment.Center) {
@ -276,8 +339,14 @@ fun ProfileGrid(
verticalArrangement = Arrangement.spacedBy(12.dp),
modifier = modifier.fillMaxSize()
) {
items(likedResponse) { profile ->
ProfileCard(context, likedProfile = profile)
items(likedResponse, key = { it.id }) { profile ->
ProfileCard(
context = context,
likedProfile = profile,
onCancel = onSwipe?.let { f -> { f(profile, "pass") } },
onSuperLike = onSwipe?.let { f -> { f(profile, "superlike") } },
onLike = onSwipe?.let { f -> { f(profile, "like") } }
)
}
}
}
@ -321,7 +390,8 @@ fun ProfileGridPreview() {
context = context,
likedResponse = sampleLikedUsers,
isLoading = false,
errorMessage = null
errorMessage = null,
onSwipe = { _, _ -> }
)
}
}

108
app/src/main/java/com/example/dattingapp/ShowPostingActivity.kt

@ -36,6 +36,7 @@ import androidx.compose.ui.layout.ContentScale
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.text.SpanStyle
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.buildAnnotatedString
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.style.TextAlign
@ -171,6 +172,24 @@ fun PostCard(
var showPostMenu by remember { mutableStateOf(false) }
var showDeleteDialog by remember { mutableStateOf(false) }
// In-place post editing
var isEditingPost by remember { mutableStateOf(false) }
var postEditText by remember { mutableStateOf("") }
val cancelPostEdit = {
isEditingPost = false
postEditText = ""
}
val savePostEdit = {
if (postEditText.isNotBlank() &&
postEditText.trim() != post.content.orEmpty().trim()
) {
showPostViewModel.updatePost(context, post.id, postEditText)
}
isEditingPost = false
postEditText = ""
}
Column(
modifier = modifier
.fillMaxWidth()
@ -254,7 +273,8 @@ fun PostCard(
text = { Text("Edit") },
onClick = {
showPostMenu = false
// TODO: edit post (empty for now)
postEditText = post.content.orEmpty()
isEditingPost = true
}
)
DropdownMenuItem(
@ -272,7 +292,29 @@ fun PostCard(
// --- 2. Media / text content ---
if (post.media.isNotEmpty()) {
if (!post.content.isNullOrEmpty()) {
// Post text: becomes an edit field in the same place
if (isEditingPost) {
BasicTextField(
value = postEditText,
onValueChange = { postEditText = it },
textStyle = MaterialTheme.typography.bodyMedium,
modifier = Modifier
.fillMaxWidth()
.padding(horizontal = 12.dp, vertical = 4.dp)
)
Row(
modifier = Modifier
.fillMaxWidth()
.padding(horizontal = 12.dp),
horizontalArrangement = Arrangement.End
) {
TextButton(onClick = cancelPostEdit) { Text("Cancel") }
TextButton(
enabled = postEditText.isNotBlank(),
onClick = savePostEdit
) { Text("Save", color = AccentPink) }
}
} else if (!post.content.isNullOrEmpty()) {
Text(
text = post.content,
style = MaterialTheme.typography.bodyMedium,
@ -281,6 +323,7 @@ fun PostCard(
.padding(horizontal = 12.dp, vertical = 4.dp)
)
}
Card(
shape = RoundedCornerShape(16.dp),
modifier = Modifier
@ -288,9 +331,7 @@ fun PostCard(
.padding(start = 10.dp, end = 10.dp)
.height(360.dp),
) {
// FIX: was AsyncImage(model = post.media.first().url) — showed ONLY
// the first media item, always as an image, with the raw URL.
// Now: swipeable pager over ALL media, images AND videos.
// Swipeable pager over ALL media, images AND videos
PostMediaPager(
media = post.media,
modifier = Modifier.fillMaxSize()
@ -299,29 +340,44 @@ fun PostCard(
} else {
Card(
shape = RoundedCornerShape(16.dp),
modifier = Modifier
.fillMaxWidth()
.padding(start = 10.dp, end = 10.dp)
.height(360.dp),
colors = CardDefaults.cardColors(containerColor = Color.White)
) {
Box(
modifier = Modifier.fillMaxSize(),
contentAlignment = Alignment.Center
) {
Text(
text = post.content.orEmpty(),
// Text-only post: no card, no background, just the text
val textSize = if ((post.content?.length ?: 0) > 120) 18.sp else 22.sp
if (isEditingPost) {
BasicTextField(
value = postEditText,
onValueChange = { postEditText = it },
textStyle = TextStyle(
color = TextPostTextColor,
fontSize = if ((post.content?.length ?: 0) > 120) 18.sp else 24.sp,
fontWeight = FontWeight.Bold,
textAlign = TextAlign.Center,
maxLines = 8,
overflow = TextOverflow.Ellipsis,
modifier = Modifier.padding(horizontal = 32.dp)
)
fontSize = textSize,
fontWeight = FontWeight.Medium
),
modifier = Modifier
.fillMaxWidth()
.padding(horizontal = 12.dp, vertical = 8.dp)
)
Row(
modifier = Modifier
.fillMaxWidth()
.padding(horizontal = 12.dp),
horizontalArrangement = Arrangement.End
) {
TextButton(onClick = cancelPostEdit) { Text("Cancel") }
TextButton(
enabled = postEditText.isNotBlank(),
onClick = savePostEdit
) { Text("Save", color = AccentPink) }
}
} else if (!post.content.isNullOrEmpty()) {
Text(
text = post.content,
color = TextPostTextColor,
fontSize = textSize,
fontWeight = FontWeight.Medium,
modifier = Modifier
.fillMaxWidth()
.padding(horizontal = 12.dp, vertical = 8.dp)
)
}
}

1027
app/src/main/java/com/example/dattingapp/homes/MyProfile.kt

File diff suppressed because it is too large

22
app/src/main/java/com/example/dattingapp/homes/networkandapi/HomeApiService.kt

@ -16,7 +16,10 @@ import retrofit2.http.Part
import com.example.dattingapp.homes.profile.UserResponse
import com.example.dattingapp.homes.profile.LikedUserResponse
import com.example.dattingapp.homes.profile.MatchListItem
import com.example.dattingapp.homes.profile.UpdateProfileRequest
import retrofit2.http.DELETE
import retrofit2.http.PATCH
import retrofit2.http.PUT
interface HomeApiService {
@ -163,4 +166,23 @@ interface HomeApiService {
suspend fun unlikePost(
@Path("post_id") postId: Int
): Response<LikePostResponse>
@PATCH("api/v1/explore/comments/{comment_id}") // use @PATCH if the backend needs it
suspend fun editComment(
@Path("comment_id") commentId: Int,
@Body request: CreateCommentRequest
): Response<CommentResponse>
@PATCH("api/v1/explore/posts/{post_id}")
suspend fun updatePost(
@Path("post_id") postId: Int,
@Body body: CreatePostRequest
): Response<CreatePostResponse>
@PATCH("api/v1/users/me") // @PUT if the backend needs it
suspend fun updateMyProfile(
@Body body: UpdateProfileRequest
): Response<UserResponse>
}

197
app/src/main/java/com/example/dattingapp/homes/networkandapi/HomeViewModelClass.kt

@ -26,6 +26,7 @@ import java.io.FileOutputStream
import java.lang.Exception
import com.example.dattingapp.homes.profile.LikedUserResponse
import com.example.dattingapp.homes.profile.MatchListItem
import com.example.dattingapp.homes.profile.UpdateProfileRequest
import kotlinx.coroutines.Job
import org.json.JSONObject
@ -666,6 +667,91 @@ class LikedViewModel : ViewModel() {
}
}
}
fun swipeUser(context: Context, type: String, userId: Int, direction: String) {
val appContext = context.applicationContext
val flow = when (type) {
"Likes" -> _likesUiState
"Liked" -> _likedUiState
else -> _matchesUiState
}
val before = flow.value as? LikedUiState.Success ?: return
val index = before.LikeData.indexOfFirst { it.id == userId }
if (index < 0) return
val removed = before.LikeData[index]
// 1. Remove the card immediately
flow.value = LikedUiState.Success(before.LikeData.filter { it.id != userId })
// 2. Send the swipe; put the card back if it fails
viewModelScope.launch {
fun restore() {
val now = flow.value as? LikedUiState.Success ?: return
if (now.LikeData.any { it.id == userId }) return
val list = now.LikeData.toMutableList()
list.add(index.coerceAtMost(list.size), removed)
flow.value = LikedUiState.Success(list)
Toast.makeText(appContext, "Action failed. Please try again.", Toast.LENGTH_SHORT).show()
}
try {
val response = HomeNetworkModule
.getApiService(appContext)
.sendSwipe(SwipeRequest(userId, direction))
if (!response.isSuccessful) {
Log.e("LikedSwipe", "HTTP ${response.code()}: ${response.errorBody()?.string()}")
restore()
}
} catch (e: kotlinx.coroutines.CancellationException) {
throw e
} catch (e: Exception) {
Log.e("LikedSwipe", "Swipe failed", e)
restore()
}
}
}
}
sealed interface EditProfileUiState {
object Idle : EditProfileUiState
object Saving : EditProfileUiState
object Saved : EditProfileUiState
data class Error(val message: String) : EditProfileUiState
}
class EditProfileViewModel : ViewModel() {
private val _state = MutableStateFlow<EditProfileUiState>(EditProfileUiState.Idle)
val state: StateFlow<EditProfileUiState> = _state.asStateFlow()
fun save(context: Context, request: UpdateProfileRequest) {
if (_state.value is EditProfileUiState.Saving) return
val appContext = context.applicationContext
viewModelScope.launch {
_state.value = EditProfileUiState.Saving
try {
val response = HomeNetworkModule.getApiService(appContext).updateMyProfile(request)
if (response.isSuccessful) {
_state.value = EditProfileUiState.Saved
} else {
val raw = try { response.errorBody()?.string() } catch (e: Exception) { null }
Log.e("EditProfile", "HTTP ${response.code()}: $raw url=${response.raw().request.url}")
_state.value = EditProfileUiState.Error(
when (response.code()) {
401 -> "Authentication failed. Please log in again."
422 -> "Invalid data: ${raw ?: "check the fields"}"
else -> "Save failed (${response.code()})"
}
)
}
} catch (e: kotlinx.coroutines.CancellationException) {
throw e
} catch (e: Exception) {
Log.e("EditProfile", "Save failed", e)
_state.value = EditProfileUiState.Error("Request failed: ${e.javaClass.simpleName}")
}
}
}
fun reset() { _state.value = EditProfileUiState.Idle }
}
sealed interface ShowPostUiState {
@ -734,6 +820,61 @@ class ShowPostViewModel : ViewModel() {
}
}
fun updatePost(context: Context, postId: Int, newContent: String) {
val appContext = context.applicationContext
val text = newContent.trim()
if (text.isEmpty()) return
// keep the existing post type and feeling, change only the text
val current = (_showPostUiState.value as? ShowPostUiState.Success)?.post
viewModelScope.launch {
try {
val api = HomeNetworkModule.getApiService(appContext)
val response = api.updatePost(
postId,
CreatePostRequest(
content = text,
post_type = current?.postType ?: "text",
content_format = "plain",
feeling = current?.feeling,
location = null
)
)
if (response.isSuccessful) {
// silent refresh: no spinner, the screen just shows the new text
val fresh = api.getPostById(postId)
if (fresh.isSuccessful && fresh.body() != null) {
val post = fresh.body()!!
PostInteractionStore.setFromServer(
post.id, post.liked_by_me, post.like_count, post.comment_count
)
_showPostUiState.value = ShowPostUiState.Success(post)
}
} else {
val raw = try { response.errorBody()?.string() } catch (e: Exception) { null }
Log.e("UpdatePost", "Failed ${response.code()}: $raw url=${response.raw().request.url}")
Toast.makeText(
appContext,
when (response.code()) {
403 -> "You can only edit your own posts."
404 -> "Post not found."
422 -> "Invalid post content."
else -> "Update failed (${response.code()})"
},
Toast.LENGTH_LONG
).show()
}
} catch (e: kotlinx.coroutines.CancellationException) {
throw e
} catch (e: Exception) {
Log.e("UpdatePost", "Exception while updating post", e)
Toast.makeText(appContext, "Update failed: ${e.javaClass.simpleName}", Toast.LENGTH_LONG).show()
}
}
}
fun addCommentLocallyAndServer(context: Context, postId: Int, content: String, currentUserName: String?) {
val appContext = context.applicationContext
@ -799,6 +940,62 @@ class ShowPostViewModel : ViewModel() {
}
}
fun editComment(context: Context, postId: Int, commentId: Int, newContent: String) {
val appContext = context.applicationContext
val text = newContent.trim()
if (text.isEmpty()) return
// Optimistic update: the new text shows immediately
val previousList = _commentsUiState.value
_commentsUiState.value = previousList.map {
if (it.id == commentId) it.copy(content = text) else it
}
viewModelScope.launch {
try {
val response = HomeNetworkModule
.getApiService(appContext)
.editComment(commentId, CreateCommentRequest(content = text))
if (response.isSuccessful) {
fetchComments(appContext, postId) // sync with the server
} else {
val rawError = try {
response.errorBody()?.string() ?: "(empty error body)"
} catch (e: Exception) {
"(failed to read error body)"
}
val detail = try {
JSONObject(rawError).optString("detail")
} catch (e: Exception) { "" }
Log.e(
"CommentError",
"Edit failed code=${response.code()} url=${response.raw().request.url} body=$rawError"
)
_commentsUiState.value = previousList // roll back
Toast.makeText(
appContext,
when (response.code()) {
403 -> "You can only edit your own comments."
404 -> "Comment not found."
405 -> "Edit method not allowed (try PATCH instead of PUT)."
else -> "Edit failed (${response.code()}): ${detail.ifBlank { rawError }}"
},
Toast.LENGTH_LONG
).show()
}
} catch (e: kotlinx.coroutines.CancellationException) {
throw e
} catch (e: Exception) {
Log.e("CommentError", "Exception while editing commentId=$commentId", e)
_commentsUiState.value = previousList
Toast.makeText(appContext, "Edit failed: ${e.javaClass.simpleName}", Toast.LENGTH_LONG).show()
}
}
}
// NEW: no longer depends on ShowPostUiState.Success, so it works from the feed too
fun toggleLikeLocallyAndServer(context: Context, postId: Int, currentlyLiked: Boolean) {
val appContext = context.applicationContext

14
app/src/main/java/com/example/dattingapp/homes/profile/UserResponseData.kt

@ -1,5 +1,8 @@
package com.example.dattingapp.homes.profile
import kotlinx.serialization.Serializable
@Serializable
data class UserResponse(
val id: Int,
val email_or_phone: String,
@ -130,4 +133,15 @@ data class MatchedUser(
val video_url: String? = null,
val distance_km: Double? = null,
val compatibility_percentage: Int? = null
)
data class UpdateProfileRequest(
val full_name: String? = null,
val gender: String? = null,
val birth_date: String? = null,
val city: String? = null,
val country: String? = null,
val relationship_goal: String? = null,
val bio: String? = null,
val interests: List<String>? = null
)

11
app/src/main/java/com/example/dattingapp/homes/profile/ui/theme/Color.kt

@ -0,0 +1,11 @@
package com.example.dattingapp.homes.profile.ui.theme
import androidx.compose.ui.graphics.Color
val Purple80 = Color(0xFFD0BCFF)
val PurpleGrey80 = Color(0xFFCCC2DC)
val Pink80 = Color(0xFFEFB8C8)
val Purple40 = Color(0xFF6650a4)
val PurpleGrey40 = Color(0xFF625b71)
val Pink40 = Color(0xFF7D5260)

58
app/src/main/java/com/example/dattingapp/homes/profile/ui/theme/Theme.kt

@ -0,0 +1,58 @@
package com.example.dattingapp.homes.profile.ui.theme
import android.app.Activity
import android.os.Build
import androidx.compose.foundation.isSystemInDarkTheme
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.darkColorScheme
import androidx.compose.material3.dynamicDarkColorScheme
import androidx.compose.material3.dynamicLightColorScheme
import androidx.compose.material3.lightColorScheme
import androidx.compose.runtime.Composable
import androidx.compose.ui.platform.LocalContext
private val DarkColorScheme = darkColorScheme(
primary = Purple80,
secondary = PurpleGrey80,
tertiary = Pink80
)
private val LightColorScheme = lightColorScheme(
primary = Purple40,
secondary = PurpleGrey40,
tertiary = Pink40
/* Other default colors to override
background = Color(0xFFFFFBFE),
surface = Color(0xFFFFFBFE),
onPrimary = Color.White,
onSecondary = Color.White,
onTertiary = Color.White,
onBackground = Color(0xFF1C1B1F),
onSurface = Color(0xFF1C1B1F),
*/
)
@Composable
fun DattingAPPTheme(
darkTheme: Boolean = isSystemInDarkTheme(),
// Dynamic color is available on Android 12+
dynamicColor: Boolean = true,
content: @Composable () -> Unit
) {
val colorScheme = when {
dynamicColor && Build.VERSION.SDK_INT >= Build.VERSION_CODES.S -> {
val context = LocalContext.current
if (darkTheme) dynamicDarkColorScheme(context) else dynamicLightColorScheme(context)
}
darkTheme -> DarkColorScheme
else -> LightColorScheme
}
MaterialTheme(
colorScheme = colorScheme,
typography = Typography,
content = content
)
}

34
app/src/main/java/com/example/dattingapp/homes/profile/ui/theme/Type.kt

@ -0,0 +1,34 @@
package com.example.dattingapp.homes.profile.ui.theme
import androidx.compose.material3.Typography
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.font.FontFamily
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.sp
// Set of Material typography styles to start with
val Typography = Typography(
bodyLarge = TextStyle(
fontFamily = FontFamily.Default,
fontWeight = FontWeight.Normal,
fontSize = 16.sp,
lineHeight = 24.sp,
letterSpacing = 0.5.sp
)
/* Other default text styles to override
titleLarge = TextStyle(
fontFamily = FontFamily.Default,
fontWeight = FontWeight.Normal,
fontSize = 22.sp,
lineHeight = 28.sp,
letterSpacing = 0.sp
),
labelSmall = TextStyle(
fontFamily = FontFamily.Default,
fontWeight = FontWeight.Medium,
fontSize = 11.sp,
lineHeight = 16.sp,
letterSpacing = 0.5.sp
)
*/
)

2
app/src/main/java/com/example/dattingapp/registration/AuthApiService.kt

@ -30,4 +30,6 @@ interface AuthApiService {
suspend fun login(
@Body request: LoginRequest
): Response<LoginResponse>
}

2
app/src/main/res/values/strings.xml

@ -92,6 +92,8 @@
<string name="title_activity_like_and_match">LikeANdMatchActivity</string>
<string name="title_activity_show_posting">ShowPostingActivity</string>
<string name="title_activity_matches">MatchesActivity</string>
<string name="title_activity_edit_profile">EditProfileActivity</string>
<string name="title_activity_edit_profile_activty">EditProfileActivty</string>
</resources>
Loading…
Cancel
Save