Skip to content

Commit

Permalink
Improving Share card pt 2
Browse files Browse the repository at this point in the history
  • Loading branch information
shub39 committed Aug 17, 2024
1 parent cc8db97 commit ae3ea03
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 19 deletions.
Binary file modified app/release/app-release.apk
Binary file not shown.
Binary file modified app/release/baselineProfiles/0/app-release.dm
Binary file not shown.
Binary file modified app/release/baselineProfiles/1/app-release.dm
Binary file not shown.
48 changes: 31 additions & 17 deletions app/src/main/java/com/shub39/rush/page/SharePage.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import android.content.Context
import android.content.Intent
import android.graphics.Bitmap
import android.net.Uri
import androidx.compose.animation.AnimatedVisibility
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
Expand Down Expand Up @@ -209,11 +210,21 @@ fun SharePage(
text = it.value,
style = MaterialTheme.typography.bodyLarge,
fontWeight = FontWeight.Bold,
modifier = Modifier.padding(bottom = 8.dp)
modifier = Modifier.padding(bottom = 10.dp)
)
}
}
}

Spacer(modifier = Modifier.padding(8.dp))

AnimatedVisibility (logo == "Spotify") {
Icon(
painter = painterResource(id = R.drawable.spotify_logo_with_text),
contentDescription = null,
modifier = Modifier.width(100.dp)
)
}
}
}

Expand Down Expand Up @@ -273,22 +284,25 @@ fun SharePage(
)
}

// Spacer(modifier = Modifier.padding(4.dp))
//
// FloatingActionButton(
// onClick = {
// coroutineScope.launch {
// when (logo) {
// "Spotify" -> SettingsDataStore.updateLogo(context, "None")
// else -> SettingsDataStore.updateLogo(context, "Spotify")
// }
// }
// },
// containerColor = if (logo == "Spotify") MaterialTheme.colorScheme.primary else MaterialTheme.colorScheme.surface,
// shape = MaterialTheme.shapes.extraLarge
// ) {
//
// }
Spacer(modifier = Modifier.padding(4.dp))

FloatingActionButton(
onClick = {
coroutineScope.launch {
when (logo) {
"Spotify" -> SettingsDataStore.updateLogo(context, "None")
else -> SettingsDataStore.updateLogo(context, "Spotify")
}
}
},
containerColor = if (logo == "Spotify") MaterialTheme.colorScheme.primary else MaterialTheme.colorScheme.primaryContainer,
shape = MaterialTheme.shapes.extraLarge
) {
Icon(
painter = painterResource(id = R.drawable.spotify_logo_svgrepo_com),
contentDescription = null
)
}

Spacer(modifier = Modifier.padding(4.dp))

Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/drawable/spotify_logo_svgrepo_com.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="200dp"
android:height="200dp"
android:width="30dp"
android:height="30dp"
android:viewportWidth="186.85"
android:viewportHeight="186.85">
<path
Expand Down

0 comments on commit ae3ea03

Please sign in to comment.